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/linfee/spec-kit-cn/translation-detectgit clone --depth 1 https://github.com/Linfee/spec-kit-cnWrote 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/linfee/spec-kit-cn/translation-detect)<a href="https://agentmods.dev/commands/linfee/spec-kit-cn/translation-detect"><img src="https://agentmods.dev/badge/commands/linfee/spec-kit-cn/translation-detect.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.00026 | $0.01336 |
| Opus 5 | $0.00013 | $0.00668 |
| Sonnet 5 | $0.00005 | $0.00267 |
| Haiku 4.5 | $0.00003 | $0.00134 |
Grade A, and why
translation-detect 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 5d 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 — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
用户输入可以直接由代理提供或作为命令参数提供给你 - 你必须考虑它(如果不为空).
用户输入: $ARGUMENTS
目标: 将 spec-kit 更新到最新正式版本, 检测与当前中文版的差异, 制定同步和翻译计划.
第一阶段: 更新原版与准备
1. 更新 spec-kit 到最新正式版本
- 确认 spec-kit 目录存在, 不存在则克隆:
git clone https://github.com/github/spec-kit.git spec-kit - 获取最新版本:
cd spec-kit && git fetch --tags - 查看可用版本:
git tag --sort=-v:refname | head -10 - 切换到最新正式版本:
git checkout <latest-tag> - 记录当前版本: 记录 spec-kit 版本号和对应的 commit hash
2. 准备工作
- 版本对齐: 对比原版和本地
pyproject.toml版本号, 禁止本地版本自增 - 创建工作分支:
git checkout -b sync/v<version> - 备份翻译文件:
BACKUP_DIR=".backup/translation-$(date +%Y%m%d-%H%M%S)" mkdir -p "$BACKUP_DIR" cp -r templates/ "$BACKUP_DIR/" cp -r memory/ "$BACKUP_DIR/" 2>/dev/null || true cp -r docs/ "$BACKUP_DIR/" 2>/dev/null || true git stash push -m "pre-sync-backup" -- templates/ memory/ docs/ 2>/dev/null || true
第二阶段: 差异检测
3. 同步完全同步目录
以下目录与原版完全一致, 可直接 rsync:
# 完全同步(可使用 rsync --delete)
rsync -avp spec-kit/scripts/ scripts/
rsync -avp spec-kit/.devcontainer/ .devcontainer/
rsync -avp spec-kit/media/ media/
# tests/ 按需同步(本项目有自定义测试)
4. 检测翻译目录差异
对以下目录进行增量差异检测(禁止 --delete):
templates/— 对比每个文件, 标记新增/修改/删除docs/— 对比每个文件memory/— 对比每个文件- 根目录 md 文件 — 逐文件对比
对每个文件执行:
- 读取原版文件和中文版文件
- 分类: 未翻译(与原版相同) / 需更新(原版有改动) / 已翻译且最新 / 新增文件
- 标记差异点和变更范围
5. 检测 src/ 差异
- 对比
src/specify_cli/下所有文件 - 标记功能变更和需要重新翻译的文案
- 注意保护本地化标记(repo_owner, repo_name, name="specify-cn")
第三阶段: 输出同步计划
6. 生成同步计划
输出结构化同步计划, 包含:
同步操作清单(按优先级):
- 完全同步目录(步骤3已列出命令)
- 需要翻译的文件清单:
- 新增文件(需要首次翻译)
- 修改文件(需要更新翻译)
- 未翻译文件(需要首次翻译)
- 需要重新本地化的代码变更
- 风险评估(大范围变更 vs 小范围修改)
版本信息:
- 原版版本:
- 当前中文版版本: 读取 pyproject.toml 中的版本
- 是否需要版本号更新
rsync 安全规则(提醒):
- 禁止同步:
.github/目录 - 禁止 --delete:
templates/,docs/,memory/翻译目录 - 完全同步目录需确认后执行
第四阶段: 工作流衔接
7. 根据检测结果决定后续操作
- 无差异: 告知用户当前已是最新, 无需操作
- 有差异: 使用 AskUserQuestion 询问用户:
"检测到 N 个文件需要处理(新增: X, 修改: Y, 未翻译: Z). 是否执行 /translation-execute 进行翻译?"
- 用户确认 → 使用 Skill 工具执行 /translation-execute, 将同步计划作为参数传入
- 用户拒绝 → 输出计划供手动处理
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.
- 5d ago First seen · 119 lines · 26 tokens per session scan A 2b21d54fb46a
translation-detect is a command published in the GitHub repository Linfee/spec-kit-cn (695 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 1,336 once invoked, about $0.0001 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-30.
Other commands, from other repositories
wp-polylang
Translate an existing WordPress site into a second language using Polylang.
auto
Manage language auto-detection settings.
translate-docs
翻译项目文档到指定语言.
plan-localization
Plan localisation covering extraction, translation workflow, and the layout and format issues that follow.
growth-localization
Localization strategy and international expansion.
pentester
AIOSON — Evidence-driven adversarial review, bounded hardening, and localized security coverage reports.