translate-assets

translate-assets is a skill for Claude Code, Codex from LienJack/learn-agent. It costs 22 tokens per session (744 once invoked), scanned A, original, MIT.

A project workflow for translating Mermaid diagrams and ordinary images through a central translation system. Mermaid is a text format for diagrams such as flowcharts and sequence diagrams.

In plain words
What is it for?
Use it to preview or run English or Japanese localization of Mermaid text and images, create prompt and result records, and run the final translation checks.
Why use it?
It separates diagram translation from image translation and checks for missing files, configuration problems, path conflicts, and review blockers before generating assets.

Skill for Claude CodeCodex

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 skills/lienjack/learn-agent/translate-assets
Any agent
npx skills add LienJack/learn-agent --skill translate-assets
Clone the repo
git clone --depth 1 https://github.com/LienJack/learn-agent

Made for: Claude Code, Codex.

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 translate-assets

README.md
[![agentmods](https://agentmods.dev/badge/skills/lienjack/learn-agent/translate-assets.svg)](https://agentmods.dev/skills/lienjack/learn-agent/translate-assets)
Your own site
<a href="https://agentmods.dev/skills/lienjack/learn-agent/translate-assets"><img src="https://agentmods.dev/badge/skills/lienjack/learn-agent/translate-assets.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 744 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.00022 $0.00744
Opus 5 $0.00011 $0.00372
Sonnet 5 $0.00004 $0.00149
Haiku 4.5 $0.00002 $0.00074

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

Security

Grade A, and why

translate-assets 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.

translate/skills/translate-assets/SKILL.md · 43 lines

What it actually says

翻译资产 Skill

本 skill 只能通过显式引用本文件路径触发,不依赖全局安装、symlink 或 $skill-name 自动发现。

输入要求

  • 用户必须提供目标语言:--language en--language ja
  • 用户可以指定 --stage mermaid--stage images;未指定时 dry-run 两个阶段并展示分流摘要。
  • 默认执行方式是 dry-run 后读取自动审查结果;审查通过才运行真实命令,正常路径不再要求人工二次确认。
  • 如果用户要求图片资产库、prompt 版本管理或完整人工审核平台,说明这超出 V1 范围。

执行流程

  1. 阅读 translate/README.mdtranslate/workflows/claude-code-series.mdtranslate/workflows/image-localization.md 和目标语言 prompt。
  2. 先运行 translate/bin/translate-assets --dry-run --pipeline claude-code-series --language <en|ja> [--stage ...] [--only ...]
  3. 展示 Mermaid 图数量、普通图片数量、目标 assets 目录、自动审查状态、缺失依赖、缺失源文件、prompt 清单路径、debug mmd 路径和运行记录。
  4. 如果 stage 是 Mermaid,确认只处理 Mermaid block,不复用中文 PNG,不覆盖普通图片。
  5. 如果 stage 是 images,确认排除 Mermaid 命名模式,检查 provider/API key、源图、尺寸和目标格式。
  6. 如果自动审查有 blocker、缺少真实图片 provider 配置、源文件缺失、目标路径冲突或语言/分流错误,停止真实生成并输出阻断原因。
  7. 自动审查通过后运行真实资产命令;真实 Mermaid 可能调用模型和 mermaid-cli,真实图片可能调用图片 API。
  8. 真实阶段必须写入 prompt manifest、执行结果、失败原因、复核状态和 post-assets check。
  9. 完成后运行 translate/bin/translate-check --language <en|ja> --pipeline claude-code-series

Mermaid 规则

  • 只翻译节点标签、subgraph 标题、participant alias、状态/边标签等可见人类文本。
  • 保留 Mermaid 语法、节点 id、箭头、缩进、HTML 标记、英文技术标识和代码符号。
  • 模型输出必须清理成纯 Mermaid 源;渲染失败时保留 .mmd 调试产物并写入 run record。

普通图片规则

  • 普通 PNG/JPG 只走图片本地化阶段,Mermaid 命名模式的 PNG 必须排除。
  • 尽量保持原图构图、纹理、线稿、尺寸、格式和视觉密度。
  • prompt 清单记录 source、target、width、height、output_format、目标语言标签和 prompt_origin。
  • 真实阶段缺少 provider 配置时必须阻断,不允许把普通图片伪标为已生成。
  • 运行记录只保留可重跑线索,不保存 API key、cookie、token 或私密响应。
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 · 43 lines · 22 tokens per session scan A 97edfa716064

Subscribe to this mod's changes

translate-assets is a skill published in the GitHub repository LienJack/learn-agent (23 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 744 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.

Related

Other skills, from other repositories