agentdryrun harden: rules from your Claude Code history

    1

    Scans your own history, ranks your real risks, and prints copy-paste ask/deny rules in Claude Code's documented syntax. Never edits your settings.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    agentdryrun harden: rules from your Claude Code history

    Example session with this skill installed

    /agentdryrun-harden

    • Read your context and instructions
    • Compiled the agentdryrun harden

    Illustrative answer. The numbers come from a real run of the scanner on a small invented demo project (not a real history). The rules come from the skill's reference file. The wording your model uses will vary a little.

    HARDENING REVIEW (last 30 days, from your own Claude Code history)

    What I read

    • The Claude Code transcripts on this machine. Command text was not included. The scanner made no network connection; this summary is part of your Claude Code session.

    Your numbers

    • 34 actions judged. 13 would pass, 16 would need a human decision, 5 the starter rules would refuse.
    • Tool output the model read: about 11,190 tokens; 3 of 34 calls failed.

    Your top risks (most to least)

    1. Infrastructure or cloud deletes: 3 times (2 need a decision, 1 refused). A wrong target can take a live system down.
    2. Recursive deletes: 4 times (3 need a decision, 0 refused). One rm -rf on the wrong path cannot be undone.
    3. Writes to settings, CI and startup files: 3 times (2 need a decision, 1 refused). A changed startup file or workflow can run code later without you noticing.

    Rules to paste

    {
      "permissions": {
        "ask": [
          "Bash(rm -rf *)", "Bash(rm -fr *)", "Bash(rm -r *)", "Bash(rm -R *)",
          "Bash(sudo *)", "Bash(chmod *)",
          "Bash(git push --force *)", "Bash(git push -f *)", "Bash(git push --force-with-lease *)", "Bash(git push --delete *)", "Bash(git push * --delete *)",
          "Bash(git reset --hard *)", "Bash(git clean *)", "Bash(git checkout -- *)", "Bash(git checkout .)",
          "Bash(psql *)", "Bash(mysql *)", "Bash(sqlite3 *)", "Bash(mongosh *)", "Bash(redis-cli *)",
          "Bash(terraform destroy *)", "Bash(terraform apply *)", "Bash(pulumi destroy *)", "Bash(kubectl delete *)",
          "Bash(aws * delete*)", "Bash(aws * terminate*)", "Bash(aws s3 rm *)", "Bash(gcloud * delete *)", "Bash(az * delete *)",
          "Bash(npm publish *)", "Bash(pnpm publish *)", "Bash(docker push *)", "Bash(twine upload *)", "Bash(cargo publish *)", "Bash(poetry publish *)", "Bash(uv publish *)", "Bash(gh release create *)",
          "Bash(scp *)", "Bash(rsync *)", "Bash(curl *)", "Bash(wget *)",
          "Bash(ssh *)", "Bash(nc *)", "Bash(ncat *)", "Bash(telnet *)",
          "Bash(printenv *)", "Bash(env)",
          "Edit(**/.github/workflows/**)", "Edit(~/.bashrc)", "Edit(~/.zshrc)", "Edit(~/.profile)", "Edit(~/.ssh/**)"
        ]
      }
    }
    
    • ask = Claude Code stops and asks you each time.
    • No deny rules: 34 actions is too little history to say what you never do (it needs 200).
    • MCP tools: tell me which servers you use (claude mcp list) and I will add mcp__<server> ask rules.

    Where to put it

    • ~/.claude/settings.json (every project) or .claude/settings.json (one project). Merge into any permissions arrays you already have; do not replace them.
    • Restart the session, then run claude doctor to see whether any rule was rejected.

    What this does not catch

    • A Bash rule matches the program as typed. It does not match /bin/rm, sh -c 'rm -rf x' or git -C . push.
    • SQL inside psql -c "..." cannot be matched reliably; for databases the real fix is credentials that cannot DROP anything.
    • A Read rule stops Claude's file tools, not cat .env in a shell.
    • Rules are a guard rail, not a wall: pair them with Claude Code's sandbox.
    • PowerShell users: these are Bash patterns. Check the official documentation for PowerShell rules.

    Next

    • Run /agentdryrun-harden again in two weeks. It shows what the agent attempted then, not whether a rule blocked it.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Runs the agentdryrun scanner on your own Claude Code history (read-only, local), then builds a short plan from your own numbers: your top three risks and one block of permissions.ask and permissions.deny rules for your settings.json. A kind of action you use gets an ask rule; a kind you never used in at least 200 judged actions gets a deny. With less history it proposes no deny rules and says the history is too short. The rules are checked against Claude Code's permissions documentation (2026-11-01), and the known bypasses (/bin/rm, sh -c, git -C . push) are stated in every answer.

    What you pay for: the hardening workflow and the rule reference. The scanner itself is open source (Apache-2.0) and also free as agentdryrun-scan; this skill adds the ranking, the choice of rules and the written plan.

    What it reads and writes: your Claude Code transcripts in ~/.claude/projects (or the folder named in CLAUDE_CONFIG_DIR), and three files in ~/agentdryrun-harden/: summary.json (numbers), my-rules.json and agent-report-card.html (written without command text). The scanner makes no network connection; the short summary it prints appears in your Claude Code session like any command output. It prints rules and never edits your settings or any other file.

    Honest limits: it cannot make an agent safe; it is a guard rail, not a sandbox. The scan is pattern matching on commands, so it misses things and flags a few harmless ones. The rules are written for Claude Code's Bash tool; PowerShell-specific rules are not covered. Needs Python 3.9+.

    Open source scanner: github.com/ntinosgkiou-code/agentdryrun

    Needs Python 3.9+. Reads Claude Code transcripts only. The scan is pattern matching on commands: it misses scripts, python -c and paths built at run time, and it flags a few harmless things. The rules cannot stop /bin/rm, sh -c '...', git -C . push or SQL inside psql -c. Written for Claude Code's Bash tool; PowerShell-specific rules are not covered. A guard rail, not a sandbox.

    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 any payment.

    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 15 days ago

    Requires

    Python
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables

    File Scopes

    ~/.claude/projects/**/*.jsonl
    ~/agentdryrun-harden/*

    Reads only the Claude Code transcripts in ~/.claude/projects (or the folder named in the CLAUDE_CONFIG_DIR environment variable) and writes three files in ~/agentdryrun-harden/: summary.json, my-rules.json and agent-report-card.html. It makes no network connection: urllib is imported only for urllib.parse, which splits web addresses that appear inside commands. Words such as .ssh, api_key, .env or password appear in the code and in reference/fixes.md as rule patterns and as rules printed for the user's settings.json; the scanner never opens those files. It never edits settings.json or any other file, starts no other program and installs nothing.

    Listed15 days ago

    What's inside

    Frequently Asked Questions

    No. The rules are a guard rail, not a sandbox. A Bash rule matches the program as typed, so `/bin/rm`, `sh -c '...'` and `git -C . push` get past it. Pair the rules with Claude Code's sandbox and with least-privilege credentials.

    No. It prints a block of `permissions.ask` and `permissions.deny` rules for you to paste into `settings.json`. You decide what goes in. After pasting, restart the session and run `claude doctor` to see whether Claude Code rejected any rule.

    The scanner itself makes no network connection: it reads the transcripts on your machine and writes three files in ~/agentdryrun-harden/. But it runs inside your Claude Code session, so the short summary it prints (counts and kinds of action, no command text) appears in that session like any command output, and your model provider sees it as part of the conversation.

    The hardening workflow and the rule reference. The scanner is open source (Apache-2.0) and free as agentdryrun-scan. This skill ranks your risks from your own numbers, picks ask or deny rules by a fixed rule (a deny only for a kind you never used in at least 200 judged actions) and writes the plan. SKILL.md and the reference files are all rights reserved, for the buyer's own use.

    It runs on any amount, but with fewer than 200 judged actions it proposes only ask rules and says the history is too short to say what you never do. Run it again in two weeks to compare the counts. A drop can come from different work rather than from the rules.

    New in LLM Ops