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 commands/skymanbp/cc-enforcer/edictgit clone --depth 1 https://github.com/skymanbp/cc-enforcerWrote 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/commands/skymanbp/cc-enforcer/edict)<a href="https://agentmods.dev/commands/skymanbp/cc-enforcer/edict"><img src="https://agentmods.dev/badge/commands/skymanbp/cc-enforcer/edict.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.00029 | $0.00735 |
| Opus 5 | $0.00015 | $0.00367 |
| Sonnet 5 | $0.00006 | $0.00147 |
| Haiku 4.5 | $0.00003 | $0.00073 |
Grade D, and why
edict scanned grade D with 2 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.
/cc-enforcer:edict add G01 "永不 sudo rm -rf root paths" --must --global --deny-bash 'rm\s+-rf?\s+/' Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
/cc-enforcer:edict add G01 "永不 sudo rm -rf root paths" --must --global --deny-bash 'rm\s+-rf?\s+/' What it actually says
/cc-enforcer:edict
圣旨 = 用户为本项目自定义的硬规则,优先级高于通用 12 条。 默认文件:
${CLAUDE_PROJECT_DIR}/.claude/cc-enforcer/edicts.toml(项目级,可入 git 团队共享)。--global(v0.14):写入~/.claude/cc-enforcer/edicts.toml(个人全局,跨项目生效)。
子命令
| 子命令 | 行为 |
|---|---|
list |
列出当前所有圣旨(来源文件 / id / severity / 硬拦截规则数)。优先 project,无则 fallback 到 global |
add ID "TEXT" [...] |
追加一条圣旨。默认 --must,支持 --deny-edit / --deny-bash 多次 + --note + --global |
remove ID [--global] |
删除圣旨。默认先找 project 再 fallback global;--global 限定只删 global 文件 |
reload |
重读并打印当前生效圣旨(验证配置) |
path |
打印 edicts.toml 实际/将创建的路径 |
用法(agent 应当如此执行)
请把用户的 $ARGUMENTS 传给 manage_edicts.py:
python "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/manage_edicts.py" $ARGUMENTS
执行后向用户报告:
- 该操作是否成功;
- 圣旨文件路径;
- 当前生效圣旨数量与 id 列表(运行
list子命令获取)。
示例
/cc-enforcer:edict list
/cc-enforcer:edict add E01 "禁止使用 mongoose,统一用 prisma" --must --deny-edit 'from\s+["'"'"']mongoose["'"'"']' --deny-bash 'npm\s+(i|install)\s+mongoose'
/cc-enforcer:edict add E02 "所有 API 必须经过 src/api/client.ts" --should --note "见 PR #142"
/cc-enforcer:edict add G01 "永不 sudo rm -rf root paths" --must --global --deny-bash 'rm\s+-rf?\s+/'
/cc-enforcer:edict remove E01
/cc-enforcer:edict path
设计契约
- 必须(must):违反即被
PreToolUse(Edit|Write|Bash)物理 DENY。 - 建议(should):仅注入软提醒,不 DENY。
- 圣旨不能绕过插件内置的 12 条规则;内置守卫先跑、圣旨后跑。
- 文件改动即时生效(hooks 每次重读)。
完整设计 → docs/EDICTS.md。
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 · 54 lines · 29 tokens per session scan D 64222d961232
edict is a command published in the GitHub repository skymanbp/cc-enforcer (5 stars, last pushed 8d ago), licensed MIT. It adds 29 tokens to every session and 735 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
brooks-audit
Run a Brooks-Lint architecture audit.
export
Export the wiki (or architecture model) to markdown, HTML, JSON, or Structurizr DSL.
todo
The quality-gated task list: tasks with real descriptions, testable acceptance criteria, and evidence — a task only closes when the controller agrees it is done.
release
The pre-tag controller: version sync, changelog, clean tree, gate, and suite — every failure listed, the tag printed, never run.
security
The security pass: secrets (blocking), SAST, dependency vulns — plus the index's entry points to review from.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.