claude-code-zh-cn: Instructions file for Codex

AGENTS.md

claude-code-zh-cn AGENTS.md is an instructions file for Codex, OpenCode from taekchef/claude-code-zh-cn. It costs 940 tokens per session, scanned B, original, MIT.

Project instructions for maintaining a Claude Code Chinese-localization plug-in. They describe its files, translation data flow, patching process, and maintenance rules.

In plain words
What is it for?
They help maintain CLI patches, translated spinner text, installation scripts, settings overlays, language-switching hooks, and change tracking.
Why use it?
They give contributors a shared reference for changing translations and installation behavior without duplicating data or breaking the setup.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code.

This is taekchef/claude-code-zh-cn's own configuration. It tells Codex and OpenCode how to work on claude-code-zh-cn itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-zh-cn configures →

Reuse

Borrowing it

Nothing to install: this file belongs to taekchef/claude-code-zh-cn. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/taekchef/claude-code-zh-cn/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/taekchef/claude-code-zh-cn

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for claude-code-zh-cn AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/taekchef/claude-code-zh-cn/agents-md/github.svg)](https://agentmods.dev/instructions/taekchef/claude-code-zh-cn/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/taekchef/claude-code-zh-cn/agents-md"><img src="https://agentmods.dev/badge/instructions/taekchef/claude-code-zh-cn/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-code-zh-cn AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/taekchef/claude-code-zh-cn/agents-md"><img src="https://agentmods.dev/badge/instructions/taekchef/claude-code-zh-cn/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 940 This file is loaded in full into every session.
When invoked 940 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00940 $0.00940
Opus 5.5 $0.00376 $0.00376
Sonnet 5.5 $0.00188 $0.00188
Haiku 4.5 $0.00094 $0.00094

Measured 17d ago against content hash 3df1fd18af6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

claude-code-zh-cn AGENTS.md scanned grade B with 1 finding 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 17d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- `install.sh` 安装时从上述两个 JSON 文件动态读取,现场组装合并到 `~/.claude/settings.json`
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

claude-code-zh-cn

Claude Code CLI 中文本地化插件。

项目结构

  • patch-cli.sh — CLI 硬编码文字 patch(被 install.sh 和 session-start hook 调用)
  • cli-translations.json — 2314 条 UI 翻译对照表(英文→中文),patch-cli.sh 从此文件读取
  • install.sh / uninstall.sh — 安装/卸载脚本
  • compute-patch-revision.sh — patch 规则指纹计算,供 install.sh 和 session-start hook 共用
  • settings-overlay.json — 合并到 settings.json 的中文设置(只含 language、spinnerTipsEnabled 等独有配置,不含 verbs 和 tips 数据)
  • plugin/ — 插件(manifest、hooks、commands 命令 stub、output-styles;hooks/user-prompt-submit.js 实现 /chinese /english 切换)
  • verbs/zh-CN.json — 187 个 spinner 动词翻译(唯一数据源)
  • tips/zh-CN.json — 41 条 spinner 提示翻译(唯一数据源)
  • CHANGELOG.md — 版本变更记录

数据流

翻译数据单一来源,不允许重复维护:

  • verbs/zh-CN.json 是动词的唯一数据源
  • tips/zh-CN.json 是提示的唯一数据源
  • settings-overlay.json 不重复存放 verbs 和 tips 数据
  • install.sh 安装时从上述两个 JSON 文件动态读取,现场组装合并到 ~/.claude/settings.json

禁止把 verbs 或 tips 的内容复制到 settings-overlay.json 里。如果要修改翻译,只改 verbs/ 或 tips/ 里的文件。

技术要点

  • patch-cli.sh 使用内容匹配(匹配英文原文),不依赖变量名,跨版本稳定
  • 从 cli-translations.json 批量读取翻译,按字符串长度降序替换(长字符串优先,避免子串冲突)
  • cli.js 里的 … 是真实 U+2026 字符,不是 \u2026 转义序列
  • node -e 在 bash 单引号里,用 Unicode 转义(\uXXXX)写中文,避免引号嵌套问题
  • Hook 等技术术语保留英文(Hook 不是"钩子",同 API、PR)
  • Windows 兼容:NTFS 上 fs.renameSync 先 unlink 再 rename

维护流程规则

  • 除非用户明确说“直接推 main”或“绕过 PR”,否则所有代码改动默认走新分支、推分支、开 PR,不直接 push main。
  • PR 合并或关闭后要做收尾清理:先 git fetch origin --prune,再检查 git worktree list、git branch -vv 和 PR 状态;确认无用且工作区干净的 worktree、本地分支、远端残留分支都要清掉。
  • squash merge 后不能只按 git branch --merged 判断是否可删;如果本地分支仍显示有独立提交,要结合 GitHub PR 已合并/已关闭状态和 worktree 干净状态再决定。

版本发布流程

每完成一批有意义的改动后,按以下步骤发布新版本:

  1. 升版本号 — 修改 plugin/manifest.json 里的 version(语义化版本)
  2. 更新 CHANGELOG — 在 CHANGELOG.md 顶部新增版本段落,分"新增/改进/修复"
  3. 提交 — git commit,提交信息带上版本号
  4. 打 tag — git tag vX.Y.Z
  5. 推送 — git push origin main --tags
  6. 发 Release — gh release create vX.Y.Z --title "vX.Y.Z" --notes "变更摘要"
  7. 发布状态校验 — bash scripts/preflight.sh --release-state,确认 manifest / CHANGELOG / tag / GitHub Release 对齐

Read the full file on GitHub · 54 lines

Changes

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.

  1. 17d ago Changed 3df1fd18af6a
  2. 22d ago Changed 9b64cf2c16e2
  3. 27d ago Changed 043bd2749c6b
  4. 1mo ago Changed a807ea7e110d
  5. 1mo ago Changed 8f9fca76b6a2
  6. 1mo ago First seen · 54 lines · 940 tokens per session scan B 58aba42d2b77

Subscribe to this mod's changes

claude-code-zh-cn AGENTS.md is an instructions file published in the GitHub repository taekchef/claude-code-zh-cn (827 stars, last pushed 13d ago), licensed MIT. It adds 940 tokens to every session, about $0.0038 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,786 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens