i18n

i18n is a command for coding agents from skymanbp/cc-enforcer. It costs 40 tokens per session (1,367 once invoked), scanned A, original, MIT.

A command that checks translated rule and prompt files against their English source files. It verifies matching files, heading structure, and required command tokens in enforcement lines.

In plain words
What is it for?
Use it in multilingual projects to detect missing or extra translation files, changed section structure, and omitted commands that agents must recognize.
Why use it?
Translations can quietly lose sections or important commands while still looking complete. This check reports those differences and returns a failure status when they exist.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the cc-enforcer plugin — 2 skills, 6 commands, 1 agent, 4 hooks shipped together

Install

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.

agentmods
npx agentmods add commands/skymanbp/cc-enforcer/i18n
Clone the repo
git clone --depth 1 https://github.com/skymanbp/cc-enforcer

Or install cc-enforcer, the plugin that ships this one along with the rest of its 2 skills, 6 commands, 1 agent, 4 hooks.

Wrote 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.

agentmods badge for i18n

README.md
[![agentmods](https://agentmods.dev/badge/commands/skymanbp/cc-enforcer/i18n.svg)](https://agentmods.dev/commands/skymanbp/cc-enforcer/i18n)
Your own site
<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>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,367 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash 9ad209aa8a56, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

commands/i18n.md · 94 lines

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/ 下的每个翻译子目录,与其英文骨架比对:

  1. 文件集对齐 —— 骨架每个 *.md 都有同名翻译(缺失 = missing_file), 翻译没有骨架里不存在的文件(多余 = orphan_file)。
  2. 章节结构对齐 —— 每个共有文件的 ATX 标题层级序列(如 [1, 2, 2, 3]) 必须逐项相同。只比结构,不比标题文字(文字本来就翻译过了); 代码围栏(```/~~~)内的 # 注释不算标题。
  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 省掉。

Read the full file on GitHub · 94 lines

Changes

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.

  1. 4d ago First seen · 94 lines · 40 tokens per session scan A 9ad209aa8a56

Subscribe to this mod's changes

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.