agentdryrun harden: rules from your Claude Code history
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
Works with the AI Agents you already use
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)
- Infrastructure or cloud deletes: 3 times (2 need a decision, 1 refused). A wrong target can take a live system down.
- Recursive deletes: 4 times (3 need a decision, 0 refused). One
rm -rfon the wrong path cannot be undone. - 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
denyrules: 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 addmcp__<server>ask rules.
Where to put it
~/.claude/settings.json(every project) or.claude/settings.json(one project). Merge into anypermissionsarrays you already have; do not replace them.- Restart the session, then run
claude doctorto 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'orgit -C . push. - SQL inside
psql -c "..."cannot be matched reliably; for databases the real fix is credentials that cannotDROPanything. - A
Readrule stops Claude's file tools, notcat .envin 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-hardenagain 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
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 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
Permissions
File Scopes
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.