translation-fix

translation-fix is a command for Claude Code from Linfee/spec-kit-cn. It costs 29 tokens per session (1,019 once invoked), scanned A, original, MIT.

A command for finding and fixing translation problems, including formatting, terminology, grammar, technical accuracy, and consistency across files.

In plain words
What is it for?
Use it on translation files or specified paths to repair Markdown, links, image paths, terms, wording, CLI examples, file references, placeholders, and related consistency problems.
Why use it?
It reduces the manual work of correcting translation defects and then checking whether the fixes introduced new issues.

Command for Claude Code

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/linfee/spec-kit-cn/translation-fix
Clone the repo
git clone --depth 1 https://github.com/Linfee/spec-kit-cn

Made for: Claude Code.

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 translation-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/linfee/spec-kit-cn/translation-fix.svg)](https://agentmods.dev/commands/linfee/spec-kit-cn/translation-fix)
Your own site
<a href="https://agentmods.dev/commands/linfee/spec-kit-cn/translation-fix"><img src="https://agentmods.dev/badge/commands/linfee/spec-kit-cn/translation-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 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,019 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.00029 $0.01019
Opus 5 $0.00015 $0.00509
Sonnet 5 $0.00006 $0.00204
Haiku 4.5 $0.00003 $0.00102

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

Security

Grade A, and why

translation-fix 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.

.claude/commands/translation-fix.md · 103 lines

What it actually says

用户输入可以直接由代理提供或作为命令参数提供给你 - 你必须考虑它(如果不为空).

用户输入: $ARGUMENTS

目标: 智能识别和修复翻译中的各种问题, 包括格式错误, 术语不一致, 表达不准确等.

调用方式

独立使用

直接执行 /translation-fix 修复所有检测到的问题, 或传入参数指定修复范围:

/translation-fix templates/commands/implement.md

由 /translation-review 自动调用

当 review 发现问题并经用户确认后, review 会自动调用本命令:

  • review 的问题列表会作为参数传入
  • 修复完成后应重新执行关键修复点专项检查验证效果
  • 将修复结果反馈给用户

执行步骤

  1. 问题检测和分类

    • 扫描所有翻译文件(或参数指定的文件), 识别问题类型:
      • 格式问题(Markdown语法, 链接, 图片)
      • 术语问题(不一致, 错误翻译)
      • 表达问题(语法, 流畅度, 准确性)
      • 技术问题(CLI命令, 路径, 代码)
    • 按严重程度对问题分类
    • 生成问题修复优先级
  2. 自动修复执行

    • 格式修复:

      • 修复 Markdown 语法错误
      • 更新失效链接和引用
      • 修正图片路径和显示
      • 统一格式和样式
    • 术语修复:

      • 统一术语使用(对照术语表)
      • 修正错误的技术术语翻译
      • 更新过时的术语表达
      • 保持品牌名称一致性
    • 表达优化:

      • 修正语法错误
      • 改善表达流畅度
      • 提高语言准确性
      • 优化中文表达习惯
  3. 技术准确性验证

    • 验证 CLI 命令翻译正确性
    • 检查路径和文件引用
    • 确保代码示例完整性
    • 验证占位符和变量格式
    • 确保 yaml.dump/yaml.safe_dump 使用 allow_unicode=True
  4. 上下文一致性检查

    • 检查相关文件间的翻译一致性
    • 验证相同概念在不同文件中的表达
    • 确保文档间的交叉引用正确
    • 维护整体翻译风格统一
  5. 质量验证和测试

    • 运行关键修复点专项检查(translation-review 步骤2)
    • 验证修复效果, 检查是否引入新问题
    • 运行 uv run specify-cn --help 等命令验证 CLI 输出
    • 生成修复报告
  6. 人工审核标记

    • 标记需要人工审核的修复
    • 提供修复建议和替代方案
    • 记录修复决策和理由

智能修复特性

  • 模式识别: 基于常见问题模式进行批量修复
  • 上下文感知: 考虑文件间关系进行智能修复
  • 渐进式修复: 按优先级逐步修复, 避免引入新问题

安全机制

  • 分阶段修复, 每阶段验证
  • 关键修复需要确认
  • 详细的修复日志

行为规则

  • 优先修复影响功能的问题
  • 保持翻译的原意和准确性
  • 避免过度修复, 保持翻译风格
  • 记录修复决策, 便于审计
  • 在不确定时选择保守修复策略
  • 参考 @TRANSLATION_STANDARDS.md 和 @TERMINOLOGY.md
  • 由 review 调用时, 优先处理 review 报告中的问题
  • 修复完成后必须重新执行关键修复点专项检查
  • 技术标记(NEEDS CLARIFICATION, N/A, TODO, TKTK, ???)绝对不能翻译
  • 路径保持原版格式, 不添加 .specify/ 前缀
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. 5d ago First seen · 103 lines · 29 tokens per session scan A 8a2b01a2d731

Subscribe to this mod's changes

translation-fix is a command published in the GitHub repository Linfee/spec-kit-cn (695 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,019 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.