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.
git clone --depth 1 https://github.com/AIGNE-io/doc-smith-skillsnpx agentmods add skills/aigne-io/doc-smith-skills/doc-smith-localizeWrote 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/skills/aigne-io/doc-smith-skills/doc-smith-localize)<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.
<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>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.1 | $0.00041 | $0.02459 |
| Opus 5 | $0.00020 | $0.01229 |
| Sonnet 5 | $0.00008 | $0.00492 |
| Haiku 4.5 | $0.00004 | $0.00246 |
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`(重建目录,清空旧状态) 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.yaml和planning/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/overview→en=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 - 此步骤是语言切换功能生效的关键,绝不能跳过
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.
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.
- 10d ago First seen · 229 lines · 41 tokens per session scan C 5bff363c88dc
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.
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.
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".
azure-ai-translation-document-py
Client library for Azure AI Translator document translation service for batch document translation with format preservation.
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.
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.
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…