Agent skill

Localization Validator

by shenjingnan in shenjingnan/xiaozhi-client

“本地化验证技能,用于验证项目的本地化质量”

— description from SKILL.md by shenjingnan
MITAuto-check passedFrontend & Design

Install Localization Validator

skills CLI
$ npx skills add shenjingnan/xiaozhi-client --skill localization-validator -a claude-code

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

GitHub CLI
$ gh skill install shenjingnan/xiaozhi-client localization-validator --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/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/localization-validator .claude/skills/localization-validator && 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
localization-validator
GitHub stars
341
Token cost
~631 tokens
SKILL.md length
156 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

  • Works in 4 steps: 代码注释检查 → 测试用例描述检查 → 硬编码字符串检查 → …
  • SKILL.md covers 技能描述, 检查项目, 验证规则 and 验证流程, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Localization Validator is a skill in shenjingnan/xiaozhi-client (341 stars). Its SKILL.md is about 631 tokens. Licence: MIT.

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 代码注释检查
  2. 测试用例描述检查
  3. 硬编码字符串检查
  4. 技术标识符例外

What it can do on your machine

Read from SKILL.md and the folder at commit fe3c382. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and bash).

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

  • Network

    No URLs in SKILL.md.

    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

Localization Validator loads about 631 tokens when it runs. Until then it costs about 11 tokens; SKILL.md has 156 words of instructions outside code blocks.

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

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 shenjingnan/xiaozhi-client at commit fe3c382, republished under its MIT licence (© shenjingnan). 156 words, ~631 tokens.

Download SKILL.mdSave it as .claude/skills/localization-validator/SKILL.md (or your agent's skills folder).
name
localization-validator
description
本地化验证技能,用于验证项目的本地化质量

本地化验证技能

技能描述

该技能用于验证项目的本地化质量,确保所有面向中文开发者和用户的内容都符合项目的本地化标准,同时遵循务实开发理念。

技能使用原则
  • 保证本地化质量,但避免过度严格:确保用户可见内容本地化,但不追求完美的本地化标准
  • 实用功能优先,理论完美次之:解决实际的本地化问题比预防所有可能更重要
  • 简单解决方案优于复杂方案:优先选择直接有效的本地化检查方式
  • 务实开发指导:评估本地化的必要性,避免过度本地化

检查项目

  1. 代码注释本地化 - 检查是否还有英文注释
  2. 测试用例描述本地化 - 检查测试文件中的 describe 和 it 语句是否使用中文
  3. 用户界面字符串本地化 - 检查硬编码的英文字符串
  4. 错误信息本地化 - 检查面向用户的错误信息
  5. 文档和注释一致性 - 确保所有文档都使用中文

验证规则

1. 代码注释检查
typescript
// ❌ 错误 - 英文注释
// Get user data from API

// ✅ 正确 - 中文注释
// 从 API 获取用户数据
2. 测试用例描述检查
typescript
// ❌ 错误 - 英文描述
describe("User Component", () => {
  it("should render user name correctly", () => {
    // ...
  });
});

// ✅ 正确 - 中文描述
describe("用户组件", () => {
  it("应该正确渲染用户名称", () => {
    // ...
  });
});
3. 硬编码字符串检查
typescript
// ❌ 错误 - 硬编码英文字符串
const serviceName = "unknown";
const status = "loading";

// ✅ 正确 - 使用中文常量
const UNKNOWN_SERVICE = "未知服务";
const LOADING_STATUS = "加载中";
4. 技术标识符例外

以下情况可以保留英文:

  • 技术标识符(如 "coze", "mcp", "stdio")
  • API 路径参数
  • 配置键名
  • 函数和变量名(遵循编程惯例)

验证流程

自动检查
  1. 使用 grep 查找英文注释模式:

    bash
    grep -r "//.*[A-Z][a-z].*" --include="*.ts" --include="*.tsx" src/
  2. 查找英文测试描述:

    bash
    grep -r "describe\|it(" --include="*.test.ts" --include="*.test.tsx" src/
  3. 查找硬编码英文字符串:

    bash
    grep -r '"[a-zA-Z]\{3,\}"' --include="*.ts" --include="*.tsx" src/
手动验证
  1. 检查自动检查的结果
  2. 确认技术标识符的例外情况
  3. 验证翻译的准确性和一致性

修复建议

优先级 1:高优先级
  • 用户界面中的硬编码英文字符串
  • 测试用例中的英文描述
  • 面向用户的错误信息
优先级 2:中优先级
  • 代码注释中的英文
  • 文档中的英文内容
优先级 3:低优先级
  • 开发者工具中的英文(如调试信息)
  • 技术标识符(如服务名称)

常见翻译对照

英文中文
unknown未知
loading加载中
error错误
success成功
failed失败
pending待处理
completed已完成
configuration配置
parameter参数
component组件
service服务
server服务器
client客户端

使用方法

当需要对项目进行本地化验证时:

  1. 运行自动检查:执行上述 grep 命令查找英文内容
  2. 分类问题:将发现的问题按优先级分类
  3. 制定修复计划:根据优先级制定修复顺序
  4. 执行修复:逐一修复发现的问题
  5. 验证修复:确保修复后没有引入新问题

长期维护

代码审查检查点
  • 所有新代码注释使用中文
  • 所有新增测试用例使用中文描述
  • 用户界面字符串已本地化
  • 错误信息已本地化
CI/CD 集成建议

可以将部分检查集成到 CI/CD 流程中,确保新代码符合本地化标准。

经验记录

xiaozhi-client 项目经验

在 xiaozhi-client 项目的本地化过程中发现:

  1. 大部分用户界面已经中文化,主要问题集中在测试文件和代码注释
  2. 技术标识符(如 "coze", "mcp")应该保持英文,便于技术交流
  3. 常量定义是处理硬编码字符串的好方法
  4. 测试用例描述中文化对团队协作很重要
最佳实践
  1. 在代码审查时加入本地化检查项
  2. 使用常量定义用户可见的字符串
  3. 保持技术标识符的英文形式
  4. 定期运行本地化验证工具

© shenjingnan, 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/localization-validator of shenjingnan/xiaozhi-client.

Open the folder on GitHubat commit fe3c382

Compare with similar skills

Localization Validator 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.

Localization Validator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Localization Validator this skillshenjingnan/xiaozhi-client341—~631Automated safety check: PassMIT
Frontend Build Timing Auditopenops-cloud/openops1.1k—~2.3kAutomated safety check: PassCustom licence
Impeccablebestofjs/bestofjs3.1k27 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

Similar skills

  • Frontend Build Timing Audit

    openops-cloud/openops

    Detects and diagnoses chunk-evaluation timing bugs in the Vite/rolldown production build of react-ui (works-in-dev / broken-in-build i18n regressions, missing UI labels, module-scope t()…

    1.1k GitHub stars~2.3k tokensUpdated today
    Frontend & DesignAuto-check passed
  • 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 27 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 14 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 3 days ago
    Frontend & DesignAuto-check passed

More from shenjingnan/xiaozhi-client

All 16 skills in this repo
  • E2E Coverage Analyzer

    shenjingnan/xiaozhi-client

    分析当前分支 git 改动,检查 e2e 测试用例覆盖情况,并可补充缺失的测试用例. An agent skill from shenjingnan/xiaozhi-client.

    341 GitHub stars~954 tokensUpdated 1 mo ago
    Auto-check passed
  • Fix Comment

    shenjingnan/xiaozhi-client

    GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题. An agent skill from shenjingnan/xiaozhi-client.

    341 GitHub stars~873 tokensUpdated 1 mo ago
    Auto-check passed
  • API Docs

    shenjingnan/xiaozhi-client

    文档自动生成

    341 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • CI Validator

    shenjingnan/xiaozhi-client

    CI检查验证和质量保障

    341 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Commit

    shenjingnan/xiaozhi-client

    生成代码评审友好的 commit 信息

    341 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Workflow Checker

    shenjingnan/xiaozhi-client

    开发流程检查技能,确保代码修改后执行必要的质量检查

    341 GitHub stars~464 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Localization Validator

How do I install Localization Validator in Claude Code?

Run `npx skills add shenjingnan/xiaozhi-client --skill localization-validator -a claude-code`. Or copy the skill folder (.agents/skills/localization-validator in shenjingnan/xiaozhi-client) into .claude/skills/localization-validator in your project. Claude Code loads it when a task matches its description.

How do I install Localization Validator in Codex?

Run `npx skills add shenjingnan/xiaozhi-client --skill localization-validator -a codex`. Or copy the skill folder (.agents/skills/localization-validator in shenjingnan/xiaozhi-client) into .agents/skills/localization-validator in your project. Codex loads it when a task matches its description.

Can I use Localization Validator 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 shenjingnan/xiaozhi-client --skill localization-validator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/localization-validator, .gemini/skills/localization-validator, .github/skills/localization-validator and .opencode/skills/localization-validator in your project.

What does Localization Validator need to run?

SKILL.md names no scripts, command-line tools or credentials: Localization Validator is instructions for the agent only.

Does Localization Validator 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 Localization Validator 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 Localization Validator use?

Localization Validator 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 Localization Validator use?

About 631 tokens (SKILL.md is roughly 2.5k 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 Localization Validator?

Skills that share tags, products or a category with Localization Validator: Frontend Build Timing Audit (openops-cloud/openops, 1.1k stars), Impeccable (bestofjs/bestofjs, 3.1k stars), Chatbox i18n Translator (chatboxai/chatbox, 42k stars) and Internationalization Workflow with i18n (iOfficeAI/AionUi, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Localization Validator?

shenjingnan (a GitHub user) maintains it in shenjingnan/xiaozhi-client, which has 341 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 3, 2026.

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