Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Singh-APv1.0.0MITIn 1 marketplace
Keeps secrets out of Claude's context: API keys, tokens, private keys and passwords in tool output are replaced with [REDACTED:kind] before the model or the transcript ever sees them.
Trending plugins
7-day copy clicks
Code that runs inside Claude Code on every session, as you, unsandboxed.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Redact promptsredactPrompts
Also redact secrets you paste into your own prompts. Off by default, since a pasted key is usually meant for Claude.
booleandefault false
Block secret filesblockSecretFiles
Also refuse Read, Edit and Write on files that usually hold secrets (.env, *.pem, id_rsa, ~/.aws/credentials, .npmrc...). .env.example and friends stay readable.
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude never sees your keys. API keys, tokens, private keys and passwords in tool output are swapped for
[REDACTED:kind]before they reach the model or your transcript file.
● Bash(cat build.log)
⎿ step 1: checkout ok
step 2: push with [REDACTED:github-token] ok
step 3: done
╭──────────────────────────────────────────────╮
│ secret-shield │
│ secret-shield hid 1 GitHub token from Bash │
│ output │
╰──────────────────────────────────────────────╯
cat .env, env, aws sts get-session-token, a stack trace with a connection string, a log line with a bearer token: one tool call is all it takes for a live secret to land in the model's context, in your ~/.claude/projects transcript, and in whatever you paste next. secret-shield scrubs every tool result on its way in.
tool.call, so the model reads the redacted text and the transcript keeps no copy, display record included. A session.append hook is the second net, for file attachments, settings-hook context and anything else that enters the conversation.ghp_, gho_, ghs_, github_pat_…) · Anthropic · OpenAI · Slack tokens and webhooks · Stripe live/test keys and whsec_ · Google API keys · JWTs · npm · PyPI · Hugging Face · SendGrid · Authorization: Bearer … headers · PEM private keys, even half-printed ones · passwords in URLs (`[REDACTED:DB Connection String] user and host kept)..env, shell export, YAML, TOML, JSON and JS/TS/Python lines like API_KEY=…, password: …, "client_secret": "…" or const apiKey = "…" keep the name and lose the value. Lookalikes are left alone: MAX_TOKENS=1024, TOKEN_URL=https://…, tokenizer = "bert-base", password = get_password(), ${DB_PASSWORD} and <your-api-key>./secret-shield shows what was hidden this session and all time. /secret-shield test <text> dry-runs any text.blockSecretFiles on, Read, Edit and Write are refused on .env*, *.pem/*.key, id_rsa/id_ed25519, ~/.ssh/*, ~/.aws/credentials, .npmrc, .netrc, .git-credentials, ~/.kube/config and service-account JSON. .env.example and its friends stay readable./plugin marketplace add Singh-AP/awesome-claude-mods
/plugin install secret-shield@awesome-claude-mods
Requires Claude Code 2.1.287 or later.
| Option | Default | What it does |
|---|---|---|
blockSecretFiles | false | Also refuse Read, Edit and Write on files that usually hold secrets. |
redactPrompts | false | Also redact secrets you paste into your own prompts. Off by default, because a key you paste is usually meant for Claude. |
| Event | Why |
|---|---|
tool.call (every tool) | await next(e), then deep-redact the tool's structured result and answer { result }, so core re-maps it for the model and records the redacted copy. Also the optional secret-file lockout. |
session.append on tool-result, tool-message, attachment, hook-context, delivery | Redacts text blocks and tool_result content of every row stored from outside the conversation. Its .catch withholds a row's text rather than storing it unscanned. |
command.run | /secret-shield status and dry-run |
$.store | All-time counts by kind |
The detectors (hooks/patterns.ts) are pure TypeScript with no $, so you can import them into your own mod.
claude plugin test mods/safety/secret-shield # 96 tests
A live headless run (claude -p --plugin-dir …) had Claude cat and Read a log line holding a fake GitHub token. The model quoted it back as [REDACTED:github-token], and the session's .jsonl transcript held no copy of the token.
7-day copy clicks
npx claudepluginhub singh-ap/awesome-claude-mods --plugin secret-shieldBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground