More screenshots
Works with the AI Agents you already use
Keep Secrets Out of Claude Code Context and Outputs
For developers running Claude Code around local credentials: block recognizable secret-file reads before execution and keep raw values out of assistant context and logs. Includes a key-only inspector for safe diagnosis.
$25
Keep Secrets Out of Claude Code Context and Outputs
Example session with this skill installed
Run the starter checks from the secrets-safeguards package on its fabricated examples: show me what the guard does with the sample payload, and list the keys in the sample .env without any values.
- Read your context and instructions
- Compiled the keep secrets out
Summary
Ran the two README starter commands on the fabricated examples. The guard blocked the simulated secret-file read with exit code 2, and the inspector listed the sample .env keys with empty values. No value was printed.
Command 1 - hook guard on examples/sample_block_payload.json:
BLOCKED: Secret display command stopped. Inspect key names only with: python3 scripts/show_config_keys.py <file> (or count lines with grep -c). [cat reads protected file]
{"decision": "block", "reason": "recognizable protected file read"}
exit=2
Command 2 - key-only inspector on examples/sample.env:
APP_ENV=
DEMO_API_TOKEN=
DEMO_WEBHOOK_SECRET=
| Task | Input | Output |
|---|---|---|
| List dotenv keys | .env-style text | Key names with empty values |
| Check a likely secret read | PreToolUse JSON payload | Exit 2 and generic block guidance |
| Review tool output | PostToolUse payload | Generic warning only; never echoes scanned content |
Next steps
- Review each hook and adapt protected paths and event names to your client.
- Test in a disposable repository with fabricated values before using real settings.
- Add a host permission boundary, because the hook is a fence, not a cage: a script can open a protected file internally.
- Rotate any credential that may have been exposed.
Connects securely to your tools. The creator never sees your data.
About this skill
For developers running Claude Code in repositories with local configuration and credentials: block recognizable secret reads before execution and keep raw values out of assistant context and tool logs. Use a value-free configuration inspector to diagnose settings without exposing their contents.
What you get
- Four guides: threat model, pre-execution checks, output monitoring, and exposure review.
- Hook starters (Python and shell) for recognizable secret-file reads, risky literals, environment dumps, and output review.
scripts/show_config_keys.py: prints keys only for dotenv-style, JSON, and common TOML files.- Offline tests that use fabricated input only (
python3 scripts/run_starter_checks.py). - Fabricated examples: configuration files and hook payloads you can run safely.
What the starter tools do
| Task | Input | Output |
|---|---|---|
| List dotenv keys | .env-style text | Key names with empty values |
| Inspect JSON structure | JSON object or list | Nested key paths only |
| Inspect common TOML structure | Section and key assignments | Section/key paths only |
| Check a likely secret read | PreToolUse JSON payload | Exit 2 and generic block guidance |
| Check benign metadata | ls, stat, or line counts | Allowed by the sample guard when no composition is present |
| Review tool output | PostToolUse payload | Generic warning only; never echoes scanned content |
How to use it
- Run the two README commands on the fabricated examples and compare with
examples/expected_output.txt. - Review every hook and adapt protected paths and event names to your client.
- Test in a disposable repository with fabricated values only.
- Add a host permission boundary (a Claude Code settings example is in the README), then rotate any credential that may already have been exposed.
Limits
The hook is a fence, not a cage. For example, cat "$CONFIG_PATH" hides the resolved filename, and a script can open a protected file internally; a pattern hook cannot prove what those programs will read. PostToolUse monitoring runs after output exists and cannot retract content already shown. The TOML inspector recognizes common section and key assignments, not every TOML feature. These tools are defense in depth, not a guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
The hook is a fence, not a cage: cat "$CONFIG_PATH" hides the resolved filename and a script can open a protected file internally, so a pattern hook cannot prove what those programs will read. PostToolUse monitoring runs after output exists and cannot retract content already shown. The TOML inspector recognizes common section and key assignments, not every TOML feature. Hook event names and protected paths must be adapted to your client.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
Python 3