Agent skill

I18n

by pa001024 in pa001024/dna-builder

管理 dna-builder 的翻译文件(public/i18n/<locale/translation.json)。当需要新增/覆盖/删除某条界面文案的翻译、按语言批量插键、查询某个 i18n 键在各语言下的值、导出与导入缺失翻译、或扫描代码里引用了但翻译文件缺失的键时使用本技能。触发场景:新增界面文案要补多语言、报「键名泄漏/界面还是中文」、i18n 检查、语言包漏翻、给某个 key 加…

MITAuto-check passedFrontend & Design

Install I18n

skills CLI
$ npx skills add pa001024/dna-builder --skill i18n -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pa001024/dna-builder i18n --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/i18n .claude/skills/i18n && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
i18n
GitHub stars
137
Token cost
~1.1k tokens
SKILL.md length
207 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

管理 dna-builder 的翻译文件(public/i18n/<locale/translation.json)。当需要新增/覆盖/删除某条界面文案的翻译、按语言批量插键、查询某个 i18n 键在各语言下的值、导出与导入缺失翻译、或扫描代码里引用了但翻译文件缺失的键时使用本技能。触发场景:新增界面文案要补多语言、报「键名泄漏/界面还是中文」、i18n 检查、语言包漏翻、给某个 key 加…

  • Works in 2 steps: 顶层扁平键(中文原文):"编辑": "Edit"。游戏数据术语、属性名等。无点号… → 命名空间键(英文点号):char-build.*、database.*、commo…
  • Tasks that involve Internationalization
  • SKILL.md covers Overview, When to use, Commands and 键的两种形式(决定 add 怎么写), plus 2 more sections
  • Calls bun and pnpm

What it does

I18n is an agent skill from pa001024/dna-builder. 管理 dna-builder 的翻译文件(public/i18n/<locale/translation.json)。当需要新增/覆盖/删除某条界面文案的翻译、按语言批量插键、查询某个 i18n 键在各语言下的值、导出与导入缺失翻译、或扫描代码里引用了但翻译文件缺失的键时使用本技能。触发场景:新增界面文案要补多语言、报「键名泄漏/界面还是中文」、i18n 检查、语言包漏翻、给某个 key 加 jp/kr/fr 译文。

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Internationalization. The repository describes itself as: 二重螺旋构筑模拟器 Duet Night Abyss Builder. The licence is MIT.

When your agent uses it

  • Tasks that involve Internationalization

Example prompts

  • “/i18n”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. 顶层扁平键(中文原文):"编辑": "Edit"。游戏数据术语、属性名等。无点号 ⇒ 自动写顶层。
  2. 命名空间键(英文点号):char-build.*、database.*、common.* 等界面文案。

What it can do on your machine

Read from SKILL.md and the folder at commit 3ed567f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

I18n loads about 1.1k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 207 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pa001024/dna-builder at commit 3ed567f, republished under its MIT licence (© pa001024). 207 words, ~1,062 tokens.

Download SKILL.mdSave it as .claude/skills/i18n/SKILL.md (or your agent's skills folder).
name
i18n
description
管理 dna-builder 的翻译文件(public/i18n/<locale>/translation.json)。当需要新增/覆盖/删除某条界面文案的翻译、按语言批量插键、查询某个 i18n 键在各语言下的值、导出与导入缺失翻译、或扫描代码里引用了但翻译文件缺失的键时使用本技能。触发场景:新增界面文案要补多语言、报「键名泄漏/界面还是中文」、i18n 检查、语言包漏翻、给某个 key 加 jp/kr/fr 译文。

dna-builder i18n 工具

Overview

所有翻译文件操作统一走 bun i18n(= bun tools/i18n.ts),取代旧的 tools/i18n-tool.ts 与 tools/i18n-check.ts。不要手改 public/i18n/*/translation.json:该文件必须整体按 localeCompare 排序,手工插入极易破坏顺序并在 commit 时被 hook 重排。

翻译文件共 6 个语言目录:en fr ja ko zh-CN zh-TW(zh-CN 是 fallbackLng)。

When to use

  • 新增界面文案,需要为多个语言补译文 / 覆盖已有译文(默认补齐全部 6 语言、各语言书写)。
  • 查询某个 i18n 键在 6 种语言下现有值(确认是否已翻、值是否对);可用 --lang cn,en 只看部分。
  • 删除某个废弃键。
  • 导出缺失翻译表格交给翻译、翻好后导回。
  • 排查「代码里 t("x") 引用了但文件里没有」的漏配键。

Commands

add — 插入 / 覆盖(核心)

默认一次补齐全部 6 种语言,且每种语言用该语言本身书写(不要 6 个语言参数都塞中文原文, 否则模型会加漏或理解错意思):

bash
# 例:新增「生成式AI」这条文案
bun i18n add setting.generative_ai \
  -cn "生成式AI" -tw "生成式AI" -en "Generative AI" -jp "生成AI" -kr "생성형 AI" -fr "IA générative"
  • 语言参数用单横线短名,支持别名:-cn/-zh → zh-CN、-en → en、-jp/-ja → ja、 -kr/-ko → ko、-fr → fr、-tw/-tc → zh-TW。也接受双横线与目录名(--zh-CN), 以及 -en=Value 内联写法。完整别名表见 bun i18n langs。
  • 未指定的语言不写入,运行期由 i18next 的 fallbackLng(zh-CN) 回落。
  • ⚠ 完整度 warning(按实际文件内容判断):命令结束后检查该键在 6 个语言文件里是否都有值, 只要有一门缺就输出 ⚠ warning: 键「x」缺少 N 种语言的译文:…。 只改一门语言的译文、但该键在文件里本就 6 门齐全的情况下不会告警——所以 「只想改中文」直接 -cn "新值" 即可,不会误报。
  • 已存在且值相同 → 报「未变化」,不写文件;已存在但值不同 → 覆盖。
  • --dry-run 只预览(也做完整性检查)不落盘;--flat 强制写顶层扁平键。
其他子命令
bash
bun i18n get <key> [--lang cn,en] [--json]
                                 # 打印该键的值,默认全部 6 种语言;--lang 逗号过滤(别名可用)
bun i18n rm <key>                # 从所有语言删除该键(会清理因此变空的父命名空间)
bun i18n langs                   # 列出语言目录与全部别名
bun i18n export                  # 导出「zh-CN 有值、其它语言缺值」的键 → tools/i18n-diff.json
bun i18n import                  # 把 tools/i18n-diff.json 的译文写回并删除该文件
bun i18n check [--json] [--locale-gap]   # 扫描代码静态引用但 zh-CN 未配置的键

键的两种形式(决定 add 怎么写)

翻译文件里同时存在两类键,add 按 key 是否含 . 自动判定:

  1. 顶层扁平键(中文原文):"编辑": "Edit"。游戏数据术语、属性名等。无点号 ⇒ 自动写顶层。
  2. 命名空间键(英文点号):char-build.*、database.*、common.* 等界面文案。 含 . ⇒ 自动按嵌套结构写入(char-build.foo → {"char-build":{"foo":...}})。

⚠️ 新键一律优先用命名空间键(<模块>.snake_case)。理由:$t("库名.键名") 形式会与顶层点号 扁平键冲突;纯中文原文键仅用于「游戏数据术语」这类本就以原文为键的场景。

顶层扁平键场景(前端自造展示名,直接中文做 key),同样补齐 6 门、各语言书写:

bash
# 例:补「限时任务」这类上游没有、前端自己维护的展示名
bun i18n add "限时任务" \
  -cn "限时任务" -tw "限時任務" -en "Limited-time Quest" -jp "期間限定クエスト" -kr "기간 한정 퀘스트" -fr "Quête à durée limitée"

⚠️ 游戏术语(角色名 / 物品名 / 副本名等)已随数据包下发,不要用本工具往 public/i18n 塞; 本工具只处理界面文案命名空间键与「前端自造展示名」这两类。

Hard rules / 坑

  • 新增文案默认补齐 6 种语言,且每种用自己的语言书写(不要 6 个参数都填中文原文)。 漏了没关系:add 结束会按实际文件内容报 ⚠ warning 指出缺哪几门。
  • 落盘顺序 = 全文件递归 localeCompare 排序 + 4 空格缩进 + 结尾换行,与 .husky/update-version.js 的 sortJson 一致。工具已保证;不要手工编辑该文件。
  • 不要自己拼 writeFile 写翻译文件,直接用 bun i18n add,否则会打乱排序。
  • 验证必须真跑:bun i18n get <key> 看到值、bun i18n check 无缺失,才算完成。
  • 数据包术语(角色名 / 物品名 / 副本名等)已由 src/data/d/translations.data.ts 随包下发, 不要往 public/i18n 塞这类中文键(见 .agents/docs/dev-tools.md 的「游戏文本包」); 只有「上游没有的前端自造展示名」才补进来(走 tools/import-i18n-data.ts 的 SUPPLEMENTAL_TRANSLATIONS 或直接 bun i18n add 顶层中文键)。
  • 带插值的文案保留 {{var}} 占位符,add 会原样写入,不做转义。
  • 属性名 / 属性说明由 pnpm iattr(tools/import-attr-i18n.ts)维护,不走本工具。

典型流程

新增一条界面文案(6 语言都填,推荐)

bash
bun i18n add setting.generative_ai \
  -cn "生成式AI" -tw "生成式AI" -en "Generative AI" -jp "生成AI" -kr "생성형 AI" -fr "IA générative"
bun i18n get setting.generative_ai   # 确认 6 门都到位,无 warning

只改一门语言的已有译文(其余门保持不动,不会 warning,因为文件里本就齐全)

bash
# 假如要把 setting.ai 的中文再修订一版,只给 -cn 即可,其余 5 门不受影响
bun i18n add setting.ai -cn "AI 助手"
bun i18n get setting.ai --lang cn,en # 只看关心的语言

新增时只先填部分语言(会 warning,属有意为之)

bash
bun i18n add some-module.tip -cn "提示" -en "Tip"
# ⚠ warning: 键「some-module.tip」缺少 4 种语言的译文:fr, ja, ko, zh-TW

翻译外包:导出 → 翻 → 导回

bash
bun i18n export                      # 得到 tools/i18n-diff.json(键 → {en,fr,ja,ko,zh-CN,zh-TW})
# 交给翻译填值
bun i18n import                      # 写回并删除 diff 文件

排查键名泄漏

bash
bun i18n check --locale-gap          # 主检测缺失键 + 各语言相对 zh-CN 的缺失计数

© pa001024, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/i18n of pa001024/dna-builder.

Open the folder on GitHubat commit 3ed567f

Compare with similar skills

I18n next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

I18n compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
I18n this skillpa001024/dna-builder137—~1.1kAutomated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k26 repos~2.6kAutomated safety check: PassMIT
Chatbox i18n Translatorchatboxai/chatbox42k—~508Automated safety check: PassGPL-3.0
Internationalization Workflow with i18niOfficeAI/AionUi33k1 repos~1.9kAutomated safety check: PassApache-2.0
Enforce Rules For I18nmoeru-ai/airi50k—~1.5kAutomated safety check: PassMIT
Claude Desktop Chinese Localizationjavaht/claude-desktop-zh-cn7.5k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 26 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Chatbox i18n Translator

    chatboxai/chatbox

    Translates new or changed i18n keys from a Chatbox Pro diff, staged changes or a commit range, writing the locale JSON files directly with a built-in glossary.

    42k GitHub stars~508 tokensUpdated 15 days ago
    Frontend & DesignAuto-check passed
  • Standards for keeping all user-facing text translatable: read the i18n config first, use namespaced keys, reuse shared strings and follow the key naming rules.

    33k GitHub starsUsed in 1 repo~1.9k tokens
    Frontend & DesignAuto-check passed
  • Review pending AIRI translations on Crowdin in a batch, then sync them into the repository.

    50k GitHub stars~1.5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Claude Desktop Chinese Localization

    javaht/claude-desktop-zh-cn

    Adds missing Simplified and Traditional Chinese translations to the Claude Desktop Chinese patch across three layers, then checks how many mappings actually hit.

    7.5k GitHub stars~1.6k tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed
  • Taro UI Guide

    jd-opensource/taro-ui

    Guides installing, configuring, styling and using taro-ui (At* components) in Taro apps for WeChat, Alipay, H5 and React Native.

    4.7k GitHub stars~1.3k tokensUpdated 15 days ago
    Frontend & DesignAuto-check passed

More from pa001024/dna-builder

All 14 skills in this repo
  • Fmodel Unpack

    pa001024/dna-builder

    This skill documents how to use the fmodel-mcp toolkit (a CUE4Parse-based .NET CLI plus a thin Python MCP server) to inspect and export Unreal Engine game assets — pak files, textures, meshes…

    137 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Bun Webview Test

    pa001024/dna-builder

    使用 Bun 1.4 内置的 Bun.WebView 无头浏览器对前端页面(Vue/Vite 等)做端到端冒烟与交互测试。当需要加载页面、真实点击、读取 DOM/应用状态、做断言、截图归档,或对本地开发服务器/静态站点做零依赖的浏览器级验证、可视化巡检、交互回归测试时,应使用本技能。

    137 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Ue4 Pak Mod

    pa001024/dna-builder

    制作与调试 Unreal Engine 4.27 游戏的 pak 模组(模型/网格/资产换皮,如《二重螺旋》Duet Night Abyss)。两条路线:编辑器烘焙(Blender 自由改模型 → UE4.27 cook → pak)与二进制替换(改写已烘焙 .uasset 的导出名/载荷)。当需要「把 A 的模型换成 B 的模型」「让模型能自由导入 Blender…

    137 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Build Creator

    pa001024/dna-builder

    给 dna-builder 里任意角色从零推一套「最优构筑」(BD)的通用方法论:读角色机制 → 辅助候选排列组合 → buff 组(含光环型海妖 / 角色专属如大冲击)→ 定计算方向 → 魔灵与潜质 → 必带 MOD → 用 autoBuild 跑一遍并剔除不合理件 → 消融实验。当需要「给某个角色配一套最优 BD」「这个角色带什么辅助/队友最强」「跑一下 XX…

    137 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Perf Hotspot Profiling

    pa001024/dna-builder

    用 V8 CPU profile 定位 JS/TS 热点函数,并用「同进程交替 A/B + best(min) 统计量 + checksum 锚点」的微基准方法安全地做性能优化。当需要优化计算热点、怀疑某函数耗时占比高、想评估某个优化(含 Wasm/SIMD 等加速路径)是否真有收益、或要建立可回归的性能基准时使用。

    137 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • For Beginer

    pa001024/dna-builder

    《二重螺旋》新手开荒指南(校对至 1.6 版本)。含分阶段开荒流程(历练 35 前 / 35~45 / 45~60 / 60 后)、前期角色与武器获取清单、角色获取循环(深渊→周本→密函商店)、魔之楔六大系列与金 Mod 升级口径、减负活动、灾厄武器四把(棘刺绝响 / 无止无休 / 权火将熄 / 血染织羽)的两条刷取路线与 1.6 配队(暗队 /…

    137 GitHub stars~2.1k tokensUpdated today
    Auto-check passed

Questions about I18n

What does I18n do?

管理 dna-builder 的翻译文件(public/i18n/<locale/translation.json)。当需要新增/覆盖/删除某条界面文案的翻译、按语言批量插键、查询某个 i18n 键在各语言下的值、导出与导入缺失翻译、或扫描代码里引用了但翻译文件缺失的键时使用本技能。触发场景:新增界面文案要补多语言、报「键名泄漏/界面还是中文」、i18n 检查、语言包漏翻、给某个 key 加…. I18n is an agent skill from pa001024/dna-builder.

When should I use I18n?

I18n fits situations like: tasks that involve Internationalization.

How do I install I18n in Claude Code?

Run `npx skills add pa001024/dna-builder --skill i18n -a claude-code`. Or copy the skill folder (.agents/skills/i18n in pa001024/dna-builder) into .claude/skills/i18n in your project. Claude Code loads it when a task matches its description.

How do I install I18n in Codex?

Run `npx skills add pa001024/dna-builder --skill i18n -a codex`. Or copy the skill folder (.agents/skills/i18n in pa001024/dna-builder) into .agents/skills/i18n in your project. Codex loads it when a task matches its description.

Can I use I18n in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pa001024/dna-builder --skill i18n -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/i18n, .gemini/skills/i18n, .github/skills/i18n and .opencode/skills/i18n in your project.

What does I18n need to run?

Going by SKILL.md and its folder, I18n needs the command-line tools its instructions call (bun and pnpm).

Does I18n access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is I18n safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does I18n use?

I18n is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does I18n use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to I18n?

Skills that share tags, products or a category with I18n: Impeccable (bestofjs/bestofjs, 3.1k stars), Chatbox i18n Translator (chatboxai/chatbox, 42k stars), Internationalization Workflow with i18n (iOfficeAI/AionUi, 33k stars) and Enforce Rules For I18n (moeru-ai/airi, 50k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains I18n?

pa001024 (a GitHub user) maintains it in pa001024/dna-builder, which has 137 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 10, 2026.

Source: pa001024/dna-builder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.