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/i18ngit 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/i18n)<a href="https://agentmods.dev/commands/skymanbp/cc-enforcer/i18n"><img src="https://agentmods.dev/badge/commands/skymanbp/cc-enforcer/i18n.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.00040 | $0.01367 |
| Opus 5 | $0.00020 | $0.00683 |
| Sonnet 5 | $0.00008 | $0.00273 |
| Haiku 4.5 | $0.00004 | $0.00137 |
Grade A, and why
i18n scanned grade A with 0 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 4d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/cc-enforcer:i18n
本插件的规则文本与注入文案是多语言的:英文(root)是骨架 (source of truth),每种翻译放在语言码子目录(
rules/zh/、prompts/zh/、rules/<code>/…)。翻译必须逐节跟随骨架。本命令调用hooks/scripts/i18n_check.py检测任何 结构漂移。设计与契约见docs/I18N.md。
检查什么
对 rules/ 与 prompts/ 下的每个翻译子目录,与其英文骨架比对:
- 文件集对齐 —— 骨架每个
*.md都有同名翻译(缺失 =missing_file), 翻译没有骨架里不存在的文件(多余 =orphan_file)。 - 章节结构对齐 —— 每个共有文件的 ATX 标题层级序列(如
[1, 2, 2, 3]) 必须逐项相同。只比结构,不比标题文字(文字本来就翻译过了); 代码围栏(```/~~~)内的#注释不算标题。 - 强制 token 对齐(v0.26)—— 骨架里凡是陈述物理强制结果的行(含
DENY/BLOCK/拒绝/拦截),该行内那些长得像 agent 会敲的命令的反引号 code span,必须在翻译文件里也出现(缺失 =enforcement_tokens)。散文本来 就要翻译、结构上一条已经比过,但"告诉 agent 哪些会被拦"的 token 不是散文, 是契约 —— 中文注入曾只列出 bash_guard 七条拦截模式里的四条,而前两项检查 全绿。两条刻意的边界:只扫强制行(比对全部 code span 会在rules/里冒出 24 处合法的翻译差异),且只认机器形态的 token。它不验证那句强制语句本身 翻没翻,只验证它的 token 在译文里出现过。
你(receiving agent)要做的
python "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/i18n_check.py"
或只要退出码(用于脚本/CI 判定):
python "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/i18n_check.py" --quiet
参数解释:
- 无参数:打印完整报告,有漂移 → 退出码 1,无漂移 → 退出码 0。
--quiet:只给退出码,不打印报告。
输出契约
同步时:
cc-enforcer i18n: all translations in sync with the English skeleton.
有漂移时(退出码 1):
cc-enforcer i18n: <N> drift(s) vs the English skeleton:
[missing_file] rules/zh/07-task-fidelity.md: skeleton file has no translation here
[header_structure] prompts/zh/session-start.md: skeleton has 5 headers [1,2,2,2,2], zh has 4 [1,2,2,2]
...
English is the skeleton (source of truth). On drift, update the
translation to match the skeleton — see docs/I18N.md.
修漂移的方向
永远改翻译去追骨架,不要改骨架去迁就翻译。 英文是 source of truth:
missing_file→ 在rules/<lang>/补上同名翻译文件。orphan_file→ 该翻译文件在骨架里没有对应;删除它,或先给骨架补上英文源。header_structure→ 翻译的章节数/层级/顺序与骨架不一致;对照骨架增删/调整 翻译里的#标题(只动结构,标题文字仍用目标语言)。enforcement_tokens→ 翻译没提到骨架声称会被拦截的某些 token;把 detail 里 列出的每个 token 原样(反引号里的命令 / 标志保持英文)补进译文对应那一行, 别只翻译描述、把 token 省掉。
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.
- 4d ago First seen · 94 lines · 40 tokens per session scan A 9ad209aa8a56
i18n is a command published in the GitHub repository skymanbp/cc-enforcer (5 stars, last pushed 9d ago), licensed MIT. It adds 40 tokens to every session and 1,367 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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-health
Run a Brooks-Lint codebase health dashboard across all four dimensions.
zh
切换 Claude Code 为简体中文(/chinese 的短别名).
simplify
The over-engineering review: five tags (delete, stdlib, native, yagni, shrink), a mandatory replacement per finding, and a real null result when there is nothing to cut.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
test
Run the repository's actual test suite: every ecosystem's canonical runner — NOT run is never green.
init
Install the formatters this repository needs, with every command visible before it runs.