Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/hex/claude-guard/guard-rulesnpx skills add hex/claude-guard --skill guard-rulesgit clone --depth 1 https://github.com/hex/claude-guardWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hex/claude-guard/guard-rules)<a href="https://agentmods.dev/skills/hex/claude-guard/guard-rules"><img src="https://agentmods.dev/badge/skills/hex/claude-guard/guard-rules.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00190 | $0.03382 |
| Opus 5 | $0.00095 | $0.01691 |
| Sonnet 5 | $0.00038 | $0.00676 |
| Haiku 4.5 | $0.00019 | $0.00338 |
Grade D, and why
Guard Rules scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- **Pipe-to-interpreter**: `... | bash`, `| bash -s`, `| sudo bash`, `| python3` (which read stdin as code) are blocked; piping *data* into a script file (`cat data | python3 app.py`) is allowed Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
description: This skill should be used when a command is blocked by claude-guard, when the response contains "BLOCKED by claude-guard", when the user asks "why was my command blocked", "what commands are blocked", "guard Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **Process substitution downloads**: `bash <(curl ...)`, `source <(wget ...)` — executes arbitrary remote code How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Guard Rules
The claude-guard plugin enforces a three-tier safety model that prevents destructive operations before they execute and warns about credential exposure after file writes. Understanding these tiers enables working effectively within the safety boundaries and selecting safe alternatives without triggering blocks.
Three-Tier Safety Model
Tier 1: Hard Deny
Catastrophic, irreversible commands that must never be executed by an AI agent. When a command is blocked at this tier, inform the user that the command must be run manually if truly needed. Do not attempt to find workarounds or alternative phrasings.
Categories:
- Filesystem catastrophe:
rm -rf /,rm -rf ~,rm -rf $HOME - Disk destruction:
ddwriting to block devices,mkfs,fdisk - Database catastrophe:
DROP DATABASE,DROP SCHEMA - Kubernetes catastrophe:
kubectl delete namespace,kubectl delete --all - AWS catastrophe:
aws s3 rb --force,aws ec2 terminate-instances,aws rds delete-db-instance,aws rds delete-db-cluster - GCP catastrophe:
gcloud projects delete - GitHub CLI catastrophe:
gh repo delete - DNS catastrophe:
aws route53 delete-hosted-zone
Tier 2: Confirm with User
Dangerous commands that have a safer alternative. The user is prompted for confirmation before execution. If the user approves, the command proceeds. If denied, suggest the safer alternative listed below.
Git Operations:
| Blocked Command | Safe Alternative |
|---|---|
git push --force / -f |
git push --force-with-lease |
git reset --hard |
git stash first, then reset |
git reset --merge |
git stash first, then reset |
git checkout -- . or git checkout -- <path> |
git stash or git diff first |
git restore (not --staged) |
git restore --staged or git stash |
git clean -f |
git clean -n (dry run) first |
git branch -D |
git branch -d (merge check) |
git stash drop/clear |
git stash list first |
git commit --no-verify |
Remove flag, fix hook failures |
git push --no-verify |
Remove flag, fix hook failures |
git checkout . / git checkout <path> |
git stash or git diff first |
git filter-branch, git reflog expire, git gc --prune=now |
Irreversible history rewrite/prune — confirm intent |
git update-ref -d, git push --mirror |
Deletes/overwrites refs — confirm scope first |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 251 lines · 190 tokens per session scan D dd90b97a1069
Guard Rules is a skill published in the GitHub repository hex/claude-guard (2 stars, last pushed 1mo ago), licensed MIT. It adds 190 tokens to every session and 3,382 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
wordpress-plugin-fundamentals
Modern WordPress plugin development with PHP 8.3+, OOP architecture, hooks system, database interactions, and Settings API.
dsh-hooks-authoring
编写或调试已安装的 dsh-hooks-plugin 的 hook 脚本。配置在 /.dsh/hooks.json,事件挂 PreToolUse/PostToolUse/UserPromptSubmit/SessionStart 等;命令从 toolinput.command 读,决策只能通过 stdout JSON 表达(permissionDecision deny/ask/allow),退出码不 gate,hookEventName 必须回填,Windows 上 command 由 PowerShell 解释且可能被沙箱拦外部 exe。.
rules
Show all active rules. Use when the user says "/rules", "show rules", "list rules", "what are my rules", or wants to see their current persistent instructions.
forget
Remove a rule. Use when the user says "/forget", "forget rule", "remove rule", "delete rule", or wants to stop a rule from being enforced.
claude-automation-recommender
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what…
remember
Save a rule that Claude must follow. Use when the user says "/remember", "remember this", "save this rule", or wants to save a persistent instruction that should be enforced across sessions.