LeakStop

Stops Claude Code from leaking secrets before it does.
When an AI agent works in your terminal it can, without meaning to, copy an API key from .env into your code, print your whole environment into the conversation, or git add . a private key. LeakStop watches what Claude is about to do and steps in before it happens: it asks you, or blocks the action, and tells Claude how to do it safely (for example, "read the key from an environment variable instead").
It runs entirely on your machine. No network, no AI model, no accounts. It never reads your environment variables, and it never shows or stores a full secret: only a short prefix and the last three characters.

That is a real session: Claude is asked to show a .env file, LeakStop holds the read, and the choice is Cancel. A write that would put a secret into your code looks like this:
LeakStop · CRITICAL
Anthropic API key in Write → src/config.ts:12
sk-ant-••••••3fA
This file is not ignored by git, so the secret would end up in the repository.
How do you want to handle it?
1. Use environment variable
2. Allow once
3. Cancel
Install
You need Claude Code 2.1.287 or later (check with claude --version). LeakStop is a Claude Code mod, a kind of plugin that is on by default from that version. Every change is tested against the oldest supported version and the newest one.
Inside Claude Code
Run these three commands:
/plugin marketplace add AlexandreMartinezOlmos/claude-code-leakstop
/plugin install leakstop@leakstop
/reload-plugins
From your terminal
claude plugin marketplace add AlexandreMartinezOlmos/claude-code-leakstop
claude plugin install leakstop@leakstop
Then start Claude Code (or run /reload-plugins in a session that is already open).
Check that it is on
Open /plugin: LeakStop should be listed as active. Then run /leakstop: it opens a panel with this session's findings (empty at first). If LeakStop is ever missing from /plugin, nothing is protecting you (see Limitations).
After installing you may see a note that "1 userConfig option is not yet set". That is fine: until you choose a protection level, LeakStop runs in standard mode.
Update
Third-party marketplaces do not update on their own by default. To get a new version:
claude plugin marketplace update leakstop
claude plugin update leakstop@leakstop
and restart Claude Code. To make it automatic, open /plugin, go to Marketplaces, select leakstop and choose Enable auto-update. The changelog lists what each version changes.
Uninstall
claude plugin uninstall leakstop@leakstop
The marketplace stays registered until you run claude plugin marketplace remove leakstop.
For a team
To give everyone who works in one repository the same protection, run this once inside it and commit the .claude/settings.json it writes:
claude plugin marketplace add AlexandreMartinezOlmos/claude-code-leakstop --scope project
claude plugin install leakstop@leakstop --scope project
Each teammate is asked to trust the folder, and then has the marketplace and the plugin. The protection level is not part of that file on purpose: it is read only from each person's own settings, so a repository cannot lower anyone's protection.
For a whole organisation, an administrator can require it with extraKnownMarketplaces and enabledPlugins in Claude Code's managed settings; see Manage plugins for your organization.
Try it in one minute
This needs no secret and does not depend on what the model decides to do. In a throwaway folder, create a file that looks like the kind LeakStop guards, and ask Claude to read it:
mkdir leakstop-demo && cd leakstop-demo
echo 'DEMO_TOKEN=not-a-real-secret' > .env
claude
Then, in Claude Code:
Show me what is in .env