一键导入
update-json-localization-file
Use when modifying a JSON i18n file with additions, updates, or deletions while preserving formatting and writing atomically.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when modifying a JSON i18n file with additions, updates, or deletions while preserving formatting and writing atomically.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when filing a detailed bug report against a GitHub repo with evidence, optionally adding it to a GitHub Project (v2), setting milestone from current branch, and marking initial status. Reads repo/project metadata from .local-projects.json so the skill is repo-agnostic.
Use when building a translation task manifest for an i18n project — produces per-language lists of missing keys with their source values by running the bundled check-i18n.py script.
Use when filtering localization keys, validating translation files, or deciding whether a string value should be translated or left as-is. Returns a boolean and the matched pattern.
Use when translating UI strings, i18n values, or short localized content into a specific target language while preserving placeholders, formatting, capitalization, and tone.
Use when auditing i18n translation completeness across all target locales or identifying locales below a coverage threshold. Produces a per-locale and summary coverage report.
Use when reviewing a translated string or validating an i18n file update, to verify placeholder preservation, length, encoding, and common translation errors.
| name | update-json-localization-file |
| description | Use when modifying a JSON i18n file with additions, updates, or deletions while preserving formatting and writing atomically. |
Safely add, update, or remove keys in a JSON i18n file while preserving formatting and writing atomically.
{ "dot.notation.key": value } pairs to add or update.true): Keep existing key order vs. sort alphabetically.{
"file_path": "<path>",
"keys_added": 5,
"keys_updated": 3,
"keys_deleted": 2,
"total_keys": 450
}
{} (create on write).Preserve nested structure. Track existing keys so adds vs. updates can be distinguished.
For each key in deletions:
Example: deleting about.opensource.paragraph3 removes only that leaf.
For each entry in additions:
updated.added.preserve_formatting: false → recursive case-sensitive alphabetical sort at every nesting level.
preserve_formatting: true → keep existing keys' relative order; place new keys at the end of their respective objects.
Formatting requirements:
\n)Safe write:
<file_path>.bak (if it exists).<file_path>.tmp.rename(<tmp>, <file_path>) for atomic replacement.| Error | Behavior |
|---|---|
| File not found | Create new file with additions. |
| Permission denied | Error, do not modify. |
| Disk full | Error, backup preserved. |
| Invalid JSON in source | Error with detail. |
| Delete key that doesn't exist | Skip silently (idempotent). |
| Invalid dot-notation key | Error. |
Same key in both additions and deletions | Delete first, then add. |
file_path: "<locales_dir>/es-ES.json"
additions: {
"common.save": "Guardar",
"common.cancel": "Cancelar",
"errors.network": "Error de red"
}
deletions: []
→ {keys_added: 3, keys_updated: 0, keys_deleted: 0, total_keys: 453}
additions: { "common.save": "Sauvegarder" }
deletions: []
→ {keys_added: 0, keys_updated: 1, keys_deleted: 0, total_keys: 450}
additions: {}
deletions: ["deprecated.oldFeature", "legacy.button"]
→ {keys_added: 0, keys_updated: 0, keys_deleted: 2, total_keys: 448}
additions: { "new.feature.title": "新機能", "common.ok": "はい" }
deletions: ["old.feature.title"]
→ {keys_added: 1, keys_updated: 1, keys_deleted: 1, total_keys: 450}
.bak. Use timestamped backups only when explicitly required.about (object) is not counted; about.title (string) is.a..b) and leading/trailing dots are invalid.