All shelves / Mods / Safety
secret-guard
By vumichien
secret-guard is a Claude Code safety mod by vumichien.
Hides secret values from your env files and secret-shaped text in tool results, tells Claude to use $NAME instead, and refuses commands that print them.
DrawsHolds a command
Install
The marketplace name is chien-mods.
claude plugin marketplace add vumichien/claude-code-mods-kit claude plugin install secret-guard@chien-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
- 4
- Last change
- 2026-10-10
What it can reach
- Draws in the session
- Holds a command
- Sees tool calls
Start a new session after installing. Tested on Claude Code 2.1.296 on Windows 11; mods are an early-access feature, so the API can change between versions. It starts on, unlike the other seven mods in the marketplace. It reads the env files at session start, so a value added later is protected from the next session, and a file outside the folders above the session is read only when secretFiles names its path. The README says it is not a security boundary: in the author's tests it missed a base64-encoded copy of a value, and a secret printed bare, in no env file, is not recognised. The mode option is value by default; command instead refuses any call whose command or path names a protected env file. To try it for one session without installing, git clone the repository and start claude with --plugin-dir pointing at the mod's folder.
The install name is secret-guard, which another listed mod already has, so this page adds the author's name. The marketplace, chien-mods, also holds plan-meter, done-gate, context-meter, idea-shelf, session-monitor, prompt-enhancer, and assumption-check, each installed on its own. Keeping secrets 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. secrets-guard, by BioInfo, denies writes of secret files and credential-shaped content, and Bash that would print those secrets. This one reads every .env and .env.* from the session's folder up to the drive root when a session starts, hides those values and anything that looks like a secret in every tool result, and tells Claude in every conversation to use $DB_PASSWORD instead of printing the value. It refuses a bare env or printenv, cat and its kin on a protected file, aws ssm with decryption, and kubectl get secret as YAML or JSON unless the output goes to a file or a variable. It never refuses loading a file, as source .env does. In the source, the status line reads secret-guard: N hidden this session.
Demo

What it hooks into
session.startWhen a session startsprompt.contextA Claude Code eventcommand.runWhen you run its slash command/secret-guardtool.callAround a tool call, where it can hold oneprompt.attachmentA Claude Code eventsession.sendA Claude Code event
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/secret-guardShow which env files and keys secret-guard protects (/secret-guard on or off switches it)
Files
The author's source, 3 files. They load when you open them.
Facts
- Author
- vumichien
- Category
- Safety
- Marketplace
- chien-mods
- Folder
- plugins/secret-guard
- Version
- 0.4.0
- License
- MIT
- Repo stars
- 4
- Last change
- 2026-10-10
- Language
- TypeScript
- Files
- 9