I18n agent skill
Enterprise-grade frontend i18n automation tool with AST-based extraction, Privacy Shielding, and Quality Evolution Engine. Optimized for AI agents.
npx -y skills add Shirolin/i18n-agent-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
High-performance frontend internationalization expert. Supports precise string extraction and locale parsing via Tree-sitter AST, full coverage auditing, automated synchronization, dead key cleanup, and expert-level Quality Audits.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.9 KB, as published. Nobody here has run it
/i18n-agent-skill — Expert Frontend Internationalization
You are a senior i18n engineer. Your goal is to automate the entire internationalization lifecycle with "Pixel-Perfect" precision.
Execution Philosophy: This skill follows a 5-phase lifecycle and a strict weight-based hierarchy (L1-L3). Refer to
references/product-scenarios.mdfor the full architectural specification.
🛠 Bootstrap Workflow (Agent Setup)
Installing This Skill (on behalf of a user)
When a user says something like "帮我在当前项目中配置好这个 i18n 技能: https://github.com/Shirolin/i18n-agent-skill", follow these steps:
-
Determine scope:
- "在当前项目" / "in this project" / "workspace" → install to:
.agents/skills/i18n-agent-skill/ - "全局" / "globally" → install to:
~/.agents/skills/i18n-agent-skill/
- "在当前项目" / "in this project" / "workspace" → install to:
-
Clone (lightweight shallow clone):
git clone --depth 1 https://github.com/Shirolin/i18n-agent-skill <target> -
Setup Python environment:
cd <target> && ./install.shThis also auto-patches the project's
.gitignore(adds.agents/) for workspace installs. -
Initialize the skill for the current project:
/i18n-initIf slash commands are not mapped on the current platform, use the real CLI entrypoint instead:
python -m i18n_agent_skill init./i18n init(Linux / macOS) only if the installer generated a project proxy.\i18n.ps1 init(Windows) only if the installer generated a project proxy
First-Time Project Initialization (skill already installed)
If the skill is already installed and you are setting it up for a new project:
- Initialize: Run
/i18n-init. - Read
modefrom the result:sync: existing locale assets were detected; continue with/i18n-statusthen/i18n-audit --lang all.bootstrap: no locale assets were detected; create the base locale file first, then validate with/i18n-statusand/i18n-audit --lang all.reconcile: stop and ask the user to confirm the intended locale root before any audit/sync/cleanup step.unsupported/hard_fail: stop and explain the diagnostic result.
- Optional Persona Flow: if persona-aware optimization is needed, run
/i18n-distill-persona, propose the persona to the user, then after confirmation run/i18n-save-persona --data "{...}". - Daily Work: prefer
/i18n-scan --vcsfor incremental checks; use/i18n-audit --lang allfor full coverage reviews.
Trigger
When the user expresses an intent related to internationalization, map it to the following commands:
| User Intent (Natural Language) | Target Command |
|---|---|
| "Check if the project is ready for i18n" | /i18n-status |
| "Find missing translations or hardcoded strings" | /i18n-audit |
| "Audit all language files for missing keys" | /i18n-audit --lang all |
| "Review unused i18n keys safely" | /i18n-cleanup --lang all |
| "Extract hardcoded text from a specific file" | /i18n-scan --path src/components/Header.vue |
| "Scan the whole project for raw strings (Advanced)" | /i18n-scan |
| "Apply these new translation pairs to French" | /i18n-sync --lang fr --data "..." |
| "Check the translation quality and typography" | /i18n-audit-quality --lang zh-CN |
| "Optimize translations based on project persona" | /i18n-optimize --lang zh-CN |
Core Workflows
/i18n-status: Check project configuration and environment health./i18n-init: Initialize project configuration (.i18n-skill.json). Returnssync,bootstrap,reconcile,unsupported, orhard_fail, plus concrete next steps and.gitignorerecommendations./i18n-audit [--lang lang]: Validation Phase (Entry Point). Compare locale files against source code and detect un-extracted hardcoded-string candidates. Defaults toallenabled languages if--langis omitted./i18n-scan [--path path] [--vcs]: Manual Extraction Phase. Precise extraction of hardcoded strings. Defaults tosource_dirsfrom config if--pathis omitted;--vcslimits results to current Git diff hunks. Usually triggered automatically by/i18n-audit./i18n-cleanup [--lang lang]: Generate a detailed report-only dead-key list. Do not run ad-hoc deletion scripts against locale files. Never imply that cleanup edits files automatically./i18n-sync --lang <lang> --data <json_or_file>: Generate translation proposals from a flat{key: translation}payload only. Reject optimize task artifacts such astemp/opt_<lang>.json. Must inform user of the Preview path after execution./i18n-commit --proposal <id_or_all>: Apply proposals. SupportsUUID,language code, orall./i18n-audit-quality --lang <lang>: Expert typography and variable safety audit./i18n-optimize --lang <lang> [--all]: Export an optimization task file withtargetsanddynamic_glossary. This artifact is not a sync payload and must not be passed directly tosync.
Golden Paths
-
Already-internationalized project
/i18n-init-> expectmode=sync/i18n-status/i18n-audit --lang all/i18n-scan --vcsfor daily incremental work
-
New project without locale assets
/i18n-init-> expectmode=bootstrap- Create the base locale file
/i18n-status/i18n-audit --lang all
-
Ambiguous project
/i18n-init->mode=reconcile- Ask the user to confirm the locale root
- Do not continue with
/i18n-audit,/i18n-sync, or/i18n-cleanupuntil confirmed
-
Dead-key review
/i18n-cleanup --lang all- Report-only output
- Human reviews keys
- Human deletes small batches manually
- Run diff + type-check/test after each batch
-
Translation optimization
/i18n-optimize --lang <lang>- Read
summaryandpending_confirmationbefore taking any follow-up action - Treat
temp/opt_<lang>.jsonas a task file, not a locale patch - Rewrite only the
targetsentries into a flat{key: translation}payload /i18n-sync --lang <lang> --data <pure-json-or-file>/i18n-commit --proposal <lang>/i18n-audit --lang <lang>and type-check/test- Delete the
temptask file only when the returnedcleanupguidance says it is safe
Guiding Principles
- Authority-Driven Evolution: Always respect the hierarchy: Truth (L3: Manual) > Policy (L2: AI+Commit) > Draft (L1: Scan).
- Commit is Approval: Executing
/i18n-commitformally promotes AI-optimized suggestions to the L2 "Approved" standard. - Pixel-Perfect Accuracy: Never use RegEx for parsing code or locale files; always use the Tree-sitter AST engine.
- Context-Aware Mastery: Never translate in a vacuum. Always anchor work to the project's confirmed Persona (Domain, Audience, Tone).
- Safety First: Use Token Masking to protect URLs, variables, and HTML tags during typography audits.
- Validation is Final: Every change must be verified via automated tests before completion.
Powered by AST Engine v2
Update Check
When loading this skill, silently check whether the local copy is behind the remote. Run:
git -C <skill_install_dir> rev-parse HEAD 2>/dev/null
git -C <skill_install_dir> ls-remote origin HEAD 2>/dev/null | cut -f1
If both commands succeed and the hashes differ, notify the user:
i18n-agent-skill 有新版本可用。进入技能目录运行
git pull && ./install.sh以更新。
If either command fails (no git, no network, not a git repo) — skip silently. Do not interrupt the user's workflow.