Game Localization — Security skill for Claude Code
Engine-agnostic game localization pipeline for AI agents: detect engine -> extract text -> translate with control codes frozen -> write back fail-closed -> audit against backup.
How to install Game Localization
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open pcmxiao/game-localization and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Game Localization does
Engine-agnostic game localization pipeline for AI agents: detect engine -> extract text -> translate with control codes frozen -> write back fail-closed -> audit against backup. Beyond RPG Maker: Ren'Py, Unity, Godot, gettext, binary VN engines.
Alternatives in Security
- Competitive Audit — Capture a competitor website with Playwright and extract its color system, typography, layout patterns, and 's 309 ★
- Text Integrity Audit.Skill — text-integrity-audit.skill.md 265 ★
- Senior Engineering Partner — A stack-agnostic Claude Code skill: strict code reviewer, pair programmer, debugger, and mentor (Python/Bash/A 148 ★
README
game-localization
[](https://www.python.org/) [](LICENSE) [](https://agentskills.io/)
把任何类型的单机游戏改成你的语言 —— 不只 RPG Maker。
一套给 AI Agent 用的**游戏本地化流程**:识别引擎 → 抽出文本 → 保护控制码翻译 → fail-closed 写回 → 对照备份验收。附四个能直接跑的 Python 脚本。
**核心主张**:引擎只影响「文本在哪、语法长什么样」,不影响流程。 引擎特有的部分被压缩成一张小档案,加新引擎 = 加一个档案,不用重写流水线。
为什么不用现成工具
现成的游戏汉化工具不少([RPGMTL](https://github.com/MizaGBF/RPGMTL)、 [rvpacker-txt-rs](https://github.com/RPG-Maker-Translation-Tools/rvpacker-txt-rs)、 [RPGMLocalizer](https://github.com/Lord0fTurk/RPGMLocalizer)、RuneTranslate…), 它们解决的问题是真问题。这套流程补的是它们没覆盖或做得不够的地方:
| # | 差异点 | 别人怎么做 | 这里怎么做 |
|---|---|---|---|
| 1 | 控制码保护范围 | 只保护 \V \C \N \I 等通用码 |
正则覆盖引擎该有的全部控制码。实测某游戏 83% 的控制码是 \m[n](表情差分)和 \z[n](立绘姿态)——通用保护完全漏掉这两类,改错必崩 |
| 2 | 写入语义 | 路径找不到就新建 | fail-closed:路径不存在就抛异常。理由见下 |
| 3 | 完成度判据 | 「还含假名吗」 | 与原始备份同路径逐条对比。理由见下 |
| 4 | Excel 粘贴 | 多数不提 | 内建检测,dry-run 能精确定位到行号 |
| 5 | 内容分级 | 要么全翻要么不过滤 | 系统层 / 敏感内容分开处理,跳过项留记录 |
| 6 | 发布前清理 | 多数不提 | 独立清单,含「绝不删」列表 |
关于第 2 条
早先的写入函数用 `re.findall(r'([^\[\]]+)|\[(\d+)\]', path)` 解析路径。 对 `terms.messages.autosave` 这种没有方括号的键,它会把**整串**当成一个键, 然后在根字典里静默新建这个键。**JSON 依然合法,不抛异常,不报错** —— 直到 diff 才发现。
`fail-closed` 的意思就是:宁可吵一点,也不要静默写坏。
关于第 3 条
用「还含假名吗」判断翻没翻完,会同时犯两个方向的错:
- 漏 —— 全汉字的外语词一个都检测不到。「勉強」「料理」「元気」「statistics」通篇汉字, 假名为零,看起来是「翻好了」,其实一个字没动。
- 误 —— 目标语言里合法的内容会报警。中文的间隔号「李·爱铃」、日文长音符「ーーー」、 有意保留的角色原名,全都会被当成「没翻」。
实测:某次扫描残留 73 条,逐条核实后**只有 35 条是真漏翻**,其余 38 条是保留的原名、 名字前缀、中点和长音符。**「残留 N 条」不等于「漏翻 N 条」。**
`audit.py` 报的是候选,不是判决,而且会把明显不用管的先自动排除掉 (实测把 25,175 条「一致」压到 545 条待看,24,627 条是纯 ASCII 资源标识符)。
安装
这个仓库同时是标准 Agent Skill 和一组独立 CLI 脚本,用法二选一。
作为 Agent Skill
your-skills-dir/
└── game-localization/
├── SKILL.md
├── references/
├── scripts/
└── ass
Related Skills
Gws 2sv Reset
Get a locked-out user back through Google 2-Step Verification — backup codes first (routine), then a lost secu
Sieve
A fully local LLM-traffic security proxy for crypto-native developers — redacts secrets outbound, blocks dange
Reviewgate
Fail-closed independent review loop for Claude Code and Codex. Native hooks, six reviewer paths (Codex, Gemini
Agent Advisor
Hub for selective AI-agent routing across Codex, Claude Code & Antigravity: auditable solo/delegate/audit/full
iOS Localize
Audit localization & RTL — unlocalized strings, missing locale values, formatting, xcstrings gaps
Goalpost
Your agent says “All tests pass!” The hidden tests say 28/34. goalpost makes Claude Code's /goal prove it: fro
Related Agents
Translate Senior
The domain-prose translator ("Senior" tier of the panel). Spawned per batch by the translate-lead. Translates
API Contract Guardian
Use this agent to detect breaking API changes in a diff — removed fields, renamed fields, changed types, narro
Game Analyst
Game-design feasibility analyst. Takes game-researcher output + project context (Godot 4, solo dev, tactical R