Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/claudate/project-multilevel-index/set-languagegit clone --depth 1 https://github.com/Claudate/project-multilevel-indexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/claudate/project-multilevel-index/set-language)<a href="https://agentmods.dev/commands/claudate/project-multilevel-index/set-language"><img src="https://agentmods.dev/badge/commands/claudate/project-multilevel-index/set-language.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01361 |
| Opus 5 | $0.00000 | $0.00681 |
| Sonnet 5 | $0.00000 | $0.00272 |
| Haiku 4.5 | $0.00000 | $0.00136 |
Grade A, and why
set-language scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
命令: /set-language - 切换语言
🎯 使用场景
快速切换索引系统的界面语言(中文 ↔ 英文)。
📋 执行步骤
步骤 1: 询问用户选择语言
显示双语提示:
Choose your language / 选择语言:
1. 简体中文 (zh-CN)
2. English (en-US)
Please enter 1 or 2 / 请输入 1 或 2:
步骤 2: 验证选择
根据用户输入:
1→ 设置为zh-CN2→ 设置为en-US- 其他 → 提示错误,重新询问
步骤 3: 创建/更新配置文件
配置文件路径: .claude/locale-config.json
配置内容:
{
"language": "{用户选择}",
"fallback": "zh-CN",
"description": "项目多级索引系统语言配置 / Language configuration for project multi-level index system",
"availableLanguages": ["zh-CN", "en-US"]
}
操作步骤:
- 检查
.claude/目录是否存在- 不存在 → 使用 Bash 工具创建:
mkdir -p .claude
- 不存在 → 使用 Bash 工具创建:
- 使用 Write 工具创建或覆盖
locale-config.json
步骤 4: 验证语言文件
检查对应语言文件是否存在:
必需文件:
locales/{language}/messages.json
locales/{language}/skill.json
locales/{language}/templates.json
locales/{language}/hooks.json
使用 Read 工具尝试读取,如果任一文件缺失:
⚠️ 警告: 语言文件不完整
缺失文件: locales/{language}/messages.json
索引系统将使用备用语言 (zh-CN)
步骤 5: 确认切换成功
成功消息(中文选择):
✅ 语言已切换为简体中文 (zh-CN)
配置文件已创建: .claude/locale-config.json
下次运行 /init-index, /update-index 或 /check-index 时将使用中文界面。
成功消息(英文选择):
✅ Language switched to English (en-US)
Configuration file created: .claude/locale-config.json
Next time you run /init-index, /update-index, or /check-index, the English interface will be used.
🔄 切换方式对比
| 方式 | 优点 | 缺点 | 适用场景 |
|---|---|---|---|
/set-language 命令 |
快速、交互式 | 需手动执行 | 偶尔切换 |
| 手动编辑配置文件 | 灵活、可批量 | 需了解JSON格式 | 高级用户 |
环境变量 CLAUDE_LOCALE |
全局生效 | 需配置环境 | CI/CD |
| 初始化时询问 | 首次友好 | 只在初始化时 | 新项目 |
📝 配置文件示例
切换到英文
{
"language": "en-US",
"fallback": "zh-CN"
}
切换到中文(默认)
{
"language": "zh-CN",
"fallback": "zh-CN"
}
🌍 支持的语言
当前支持:
- zh-CN: 简体中文(默认)
- en-US: 美国英语
未来扩展(预留):
- ja-JP: 日语
- ko-KR: 韩语
- de-DE: 德语
- fr-FR: 法语
🔧 环境变量方式
如果用户更喜欢使用环境变量:
Linux/macOS
# 临时设置
export CLAUDE_LOCALE=en-US
# 永久设置(添加到 ~/.bashrc 或 ~/.zshrc)
echo 'export CLAUDE_LOCALE=en-US' >> ~/.bashrc
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 236 lines · 0 tokens per session scan A 4476832eaa02
set-language is a command published in the GitHub repository Claudate/project-multilevel-index (139 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,361 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
translation-review
全面审核翻译质量: 对比原版、专项检查、质量评分与发布验证, 发现问题时自动衔接修复流程.
wp-polylang
Translate an existing WordPress site into a second language using Polylang.
auto
Manage language auto-detection settings.
translate-docs
翻译项目文档到指定语言.
plan-localization
Plan localisation covering extraction, translation workflow, and the layout and format issues that follow.
growth-localization
Localization strategy and international expansion.