All shelves / Mods / Safety
secret-guard
By arasovic
secret-guard is a Claude Code safety mod by arasovic.
Hides API keys and private keys before the model or the transcript sees them, blocks credential files and commands that print secrets, and shows what it caught.
DrawsHolds a command
Install
The marketplace name is claude-code-mods.
claude plugin marketplace add arasovic/claude-code-mods claude plugin install secret-guard@claude-code-mods
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.4.0
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-10-25
What it can reach
- Draws in the session
- Holds a command
- Sees tool calls
Tested on Claude Code 2.1.296. Restart after installing. The marketplace name is claude-code-mods, the same string hamzafer uses. Add arasovic/claude-code-mods. Known key formats in what tools return, and in your own messages, become a [secret-guard: rule] tag before Claude reads them, and the transcript on disk keeps the hidden form: AWS, GitHub, GitLab, Slack, Stripe, Google, Anthropic, OpenAI, and other keys, private key blocks, JWTs, secret-named values, connection URL passwords, Authorization values, and URL credentials. It blocks reading or editing credential files such as .env, SSH and GPG private keys, ~/.aws/credentials, shell history, browser cookie and password stores, and password manager data, while templates such as .env.example and public keys stay readable. It blocks commands that print secrets, such as printenv, gh auth token, or an echo of a token variable, and any command, web request, or MCP call that would send a key out. Claude can call its env_check tool to learn whether an env file sets a variable, without seeing the value. A status light under the prompt is green for nothing seen, yellow for something hidden, and red for something blocked, and says env scrub off until you set CLAUDE_CODE_SUBPROCESS_ENV_SCRUB to 1 in the env block of ~/.claude/settings.json.
The marketplace, arasovic's claude-code-mods, also holds guardrails, loop-guard, pin-board, and other mods by the same author. This one installs on its own; to update, run claude plugin marketplace update claude-code-mods, then claude plugin update secret-guard@claude-code-mods. Keeping keys out of the conversation is why this page files it under safety. secret-shield, by Singh-AP, replaces API keys, tokens, private keys, and passwords in tool output with a redaction marker before the model or the transcript sees them. transcript-redactor, by ray-amjad, swaps secrets and email addresses in the session for stable placeholders, and puts the real value back on the way into Bash, Write, and Edit. This one also blocks credential files and commands that print secrets, and refuses a write that would put a hidden tag back over the real value. The author lists what gets through: where Claude Code's built-in Security default plugin runs first, files added with @, summaries, skill text, and some other rows reach Claude unhidden; a script Claude writes can open any file; commands are read in sh, bash, and zsh form only; and a secret in a format it does not know passes. If a check itself fails, the call is refused. Its plugin.json names Mehmet Aras as its author.
Demo

What it hooks into
session.startWhen a session startstool.callAround a tool call, where it can hold onesession.appendWhen an entry is written to the transcript
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- arasovic
- Category
- Safety
- Marketplace
- claude-code-mods
- Folder
- secret-guard
- Version
- 0.4.0
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-10-25
- Language
- TypeScript
- Files
- 9