doc-smith-localize

doc-smith-localize is a skill for Claude Code from AIGNE-io/doc-smith-skills. It costs 41 tokens per session (2,459 once invoked), scanned C, original, Apache-2.0.

A workflow for translating DocSmith-generated documentation into one or more other languages. It can process documents and, when enabled, their images.

In plain words
What is it for?
Use it to translate all documentation or selected paths, choose several target languages, force a fresh translation, or skip image translation.
Why use it?
It avoids translating every page manually and can skip documents whose source content has not changed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node skills/doc-smith-build/scripts/build.mjs \.

Part of the doc-smith plugin — 6 skills shipped together

Good fit Use it to translate all documentation or selected paths, choose several target languages, force a fresh translation, or skip image translation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/AIGNE-io/doc-smith-skills
agentmods
npx agentmods add skills/aigne-io/doc-smith-skills/doc-smith-localize

Made for: Claude Code.

Or install doc-smith, the plugin that ships this one along with the rest of its 6 skills.

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 doc-smith-localize

README.md
[![agentmods](https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-localize/github.svg)](https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-localize)
Your own site
<a href="https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-localize"><img src="https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-localize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc-smith-localize

Your own site · 80×15
<a href="https://agentmods.dev/skills/aigne-io/doc-smith-skills/doc-smith-localize"><img src="https://agentmods.dev/badge/skills/aigne-io/doc-smith-skills/doc-smith-localize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,459 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00041 $0.02459
Opus 5 $0.00020 $0.01229
Sonnet 5 $0.00008 $0.00492
Haiku 4.5 $0.00004 $0.00246

Measured 10d ago against content hash 5bff363c88dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

doc-smith-localize scanned grade C with 1 finding 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 10d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

1. `rm -rf .aigne/doc-smith/cache/task-status && mkdir -p .aigne/doc-smith/cache/task-status`(重建目录,清空旧状态)
skills/doc-smith-localize/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Doc-Smith 文档翻译

将文档翻译成多种语言,支持批量翻译和术语一致性。

用法

/doc-smith-localize --lang en                    # 翻译所有文档到英文
/doc-smith-localize -l en -l ja                  # 翻译到多个语言
/doc-smith-localize -l en -p /overview           # 只翻译指定文档
/doc-smith-localize -l en --force                # 强制重新翻译
/doc-smith-localize -l en --skip-images          # 跳过图片翻译

选项

选项 别名 说明
--lang <code> -l 目标语言代码(可多次使用)
--path <docPath> -p 指定文档路径(可多次使用)
--force -f 强制重新翻译,覆盖已有
--skip-images 跳过图片翻译

约束

以下约束在任何操作中都必须满足。

1. Workspace 约束

  • .aigne/doc-smith/config.yamlplanning/document-structure.yaml 必须存在
  • 不存在时提示用户先使用 /doc-smith 生成文档

2. 参数验证约束

  • 目标语言不能与源语言(config.yaml 的 locale)相同
  • --path 指定的路径必须存在于 document-structure.yaml
  • 过滤后无有效语言时报错

3. 增量翻译约束

  • 基于源 HTML 的 SHA256 hash(sourceHash)判断是否需要翻译
  • hash 未变化的文档自动跳过(除非 --force
  • 翻译失败时不覆盖已有翻译、不修改 .meta.yaml

4. Task 分发约束

  • 每个文档到每种语言为一个独立翻译任务
  • 通过 Task(references/translate-document.md) 分发,所有翻译 Task 必须使用 run_in_background: true,避免执行日志回流到主 agent 上下文
  • 每批最多并行 5 个 Task,超过时分批执行
  • 如有术语表(.aigne/doc-smith/glossary.yaml.md),传递给每个 Task

信号文件机制:

  • 每个 Task 完成时在 .aigne/doc-smith/cache/task-status/ 写入 {slug}.status 文件
  • slug 规则:docPath 去除 / 前缀后以 - 替换 /,再拼接 -{targetLang}(如 /api/overviewen = api-overview-en
  • 状态文件内容为 1 行摘要(如 /overview → en: 成功 | hash: abc123
  • 主 agent 通过轮询 .status 文件判断 Task 是否完成(见"批次执行流程")

5. 图片翻译约束

  • 未指定 --skip-images 时,扫描 assets 中的图片资源
  • 跳过条件(满足任一):generation.shared: true、目标语言已存在、源语言图片不存在
  • 使用 /doc-smith-images --update 翻译图片文字
  • 翻译后将图片同步到 dist/assets/{key}/images/ 发布目录
  • 翻译后更新图片 .meta.yaml 的 languages 和 translations

6. Config 更新约束

  • 翻译完成后,将目标语言添加到 config.yaml 的 translateLanguages 数组
  • 避免重复添加已存在的语言
  • 更新后验证 config.yaml 正确

7. nav.js 重建约束

  • Config 更新后必须执行 nav.js 重建:
    node skills/doc-smith-build/scripts/build.mjs \
      --nav --workspace .aigne/doc-smith --output .aigne/doc-smith/dist
    
  • 验证 dist/assets/nav.js 包含所有目标语言的 code
  • 此步骤是语言切换功能生效的关键,绝不能跳过

Read the full file on GitHub · 229 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 229 lines · 41 tokens per session scan C 5bff363c88dc

Subscribe to this mod's changes

doc-smith-localize is a skill published in the GitHub repository AIGNE-io/doc-smith-skills (9 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 41 tokens to every session and 2,459 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

translate-book

Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents. Converts input -> Markdown chunks -> translated chunks -> HTML/DOCX/EPUB/PDF.

deusyu/translate-book · 42 tokens

pdf_translator

Extract text from PDF files, translate it to a target language, and save the result as a Markdown file. Use this skill when the user wants to translate a PDF document or asks to "convert PDF to Chinese".

ForceInjection/AI-fundamentals · 47 tokens

azure-ai-translation-document-py

Client library for Azure AI Translator document translation service for batch document translation with format preservation.

benjaminasterA/antigravity-awesome-skills · 0 tokens

docutranslate

Use when translating documents locally via LLM — PDF, Word, Excel, Markdown, SRT subtitles with format preservation. DocuTranslate: LLM-powered multi-format local file translation tool with MCP server support.

znlgis/opengis-skills · 47 tokens

lov-academic-translator

A tool for translating English research papers, journal or conference articles, arXiv papers, and technical PDFs into Chinese PDFs or publishable Chinese Markdown. It can preserve requested images, formulas, page matching, and layout details.

lovstudio/skills · 87 tokens

hebrew-document-generator

Generate Hebrew documents (PDF, DOCX/Word, PPTX) with correct right-to-left layout, mixed Hebrew-and-English bidi handling, and Hebrew typography. Use whenever the output is a Hebrew or mixed Hebrew/English Word document, Hebrew PDF, or Hebrew PowerPoint ("Hebrew Word document", "מסמך Word בעברית", "create a .docx in…

skills-il/localization · 247 tokens