More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Keep Secrets Out of Claude Code Context and Outputs

    1

    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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Keep Secrets Out of Claude Code Context and Outputs

    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=
    
    TaskInputOutput
    List dotenv keys.env-style textKey names with empty values
    Check a likely secret readPreToolUse JSON payloadExit 2 and generic block guidance
    Review tool outputPostToolUse payloadGeneric 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

    TaskInputOutput
    List dotenv keys.env-style textKey names with empty values
    Inspect JSON structureJSON object or listNested key paths only
    Inspect common TOML structureSection and key assignmentsSection/key paths only
    Check a likely secret readPreToolUse JSON payloadExit 2 and generic block guidance
    Check benign metadatals, stat, or line countsAllowed by the sample guard when no composition is present
    Review tool outputPostToolUse payloadGeneric warning only; never echoes scanned content

    How to use it

    1. Run the two README commands on the fabricated examples and compare with examples/expected_output.txt.
    2. Review every hook and adapt protected paths and event names to your client.
    3. Test in a disposable repository with fabricated values only.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    Recognizable secret-file reads in a PreToolUse payload, such as `cat` on a protected file. It exits with code 2 and prints generic guidance that points to the key-only inspector. Benign metadata such as `ls`, `stat`, or line counts is allowed by the sample guard when no composition is present.

    No. 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. Add a host permission boundary (the README shows a Claude Code settings example), and rotate any credential that may have been exposed.

    The hooks are written for Claude Code PreToolUse and PostToolUse payloads. Review every hook and adapt the event names and protected paths to your client before installing, and test in a disposable repository with fabricated values first.

    Four guides (threat model, pre-execution checks, output monitoring, exposure review), hook starters for secret-file reads, risky literals, environment dumps and output review, the key-only inspector `scripts/show_config_keys.py`, offline tests with fabricated input, fabricated example files, a LICENSE, and a README.

    No. All examples and tests use fabricated values, and the examples intentionally do not access operating-system secret stores or external services. Start with the two README commands and compare the output with `examples/expected_output.txt`.

    Dotenv-style, JSON, and common TOML files. It prints key names (dotenv), nested key paths (JSON), or section/key paths (TOML), never values. It recognizes common TOML section and key assignments, not every TOML feature.

    New in Security