claude-howto-zh-cn: Instructions file for Claude Code

CLAUDE.md

claude-howto-zh-cn CLAUDE.md is an instructions file for Claude Code from lhfer/claude-howto-zh-cn. It costs 990 tokens per session, scanned A, original, MIT.

Project instructions for a Chinese documentation repository that adapts a Claude Code guide for beginners.

In plain words
What is it for?
They guide localization checks, tests, EPUB book builds, Python checks, and work across tutorials for commands, skills, agents, MCP, hooks, and other features.
Why use it?
They protect commands, configuration keys, links, and file formats from being changed incorrectly during translation or editing.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is lhfer/claude-howto-zh-cn's own configuration. It tells Claude Code how to work on claude-howto-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-howto-zh-cn configures →

About the project

Claude Code 中文全面上手指南 is a Chinese-language learning guide for using Claude Code and combining features such as commands, memory, skills, hooks, MCP, subagents, and plugins. It is aimed at Chinese beginners and provides learning paths, examples, and compatibility guidance, while the catalogue entries package parts of that guidance as agent resources.

lhfer/claude-howto-zh-cn · 2,295 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to lhfer/claude-howto-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/lhfer/claude-howto-zh-cn/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/lhfer/claude-howto-zh-cn

Made for: Claude Code.

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-howto-zh-cn CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lhfer/claude-howto-zh-cn/claude-md/github.svg)](https://agentmods.dev/instructions/lhfer/claude-howto-zh-cn/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lhfer/claude-howto-zh-cn/claude-md"><img src="https://agentmods.dev/badge/instructions/lhfer/claude-howto-zh-cn/claude-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-howto-zh-cn CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lhfer/claude-howto-zh-cn/claude-md"><img src="https://agentmods.dev/badge/instructions/lhfer/claude-howto-zh-cn/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 990 This file is loaded in full into every session.
When invoked 990 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00990 $0.00990
Opus 5 $0.00495 $0.00495
Sonnet 5 $0.00198 $0.00198
Haiku 4.5 $0.00099 $0.00099

Measured 12d ago against content hash 3dd623a3927f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

claude-howto-zh-cn CLAUDE.md 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 12d 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.

CLAUDE.md · 110 lines

How it starts

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

CLAUDE.md

这个文件给 Claude Code 提供“如何在这个仓库里协作”的工作说明。

项目定位

claude-howto-zh-cn 是一个 documentation-as-code 仓库。

  • 主体产物是 Markdown 教程与示例,不是可执行应用
  • 核心目标是把上游 luongnv89/claude-howto 做成更适合中国小白的中文主线指南
  • 兼容性优先级很高:命令名、frontmatter、JSON/YAML key、环境变量、路径约定都不能被本地化改坏

你最常用的命令

本地化校验

uv run python scripts/validate_localization.py

检查重点包括:

  • frontmatter 是否可解析
  • 关键保留词是否被误翻
  • Markdown 链接是否有效
  • JSON / YAML / shell 脚本是否还能正常解析

测试脚本

uv run pytest scripts/tests/ -q

EPUB 构建

uv run scripts/build_epub.py --lang zh

EPUB 的 Mermaid 图使用本地 mmdc 渲染,不再访问 Kroki。由于 mmdc 依赖的 Chromium 在 arm64 开发机上没有可用构建,EPUB 构建不属于 pre-commit hook,而是由主 CI、自动化测试和标签发布 workflow 强制验证。只有本机已有可用 mmdc 时才运行上面的命令。

Python 质量检查

uv run ruff check scripts/
uv run ruff format scripts/

仓库结构

01-slash-commands/      slash commands 教程与模板
02-memory/              CLAUDE.md / memory 教程与模板
03-skills/              skills 教程与示例
04-subagents/           subagents 教程与示例
05-mcp/                 MCP 教程与配置示例
06-hooks/               hooks 教程与脚本示例
07-plugins/             plugins 教程与完整样例
08-checkpoints/         checkpoints / rewind 教程
09-advanced-features/   高级能力说明
10-cli/                 CLI 指南
.claude/skills/         仓库内置的教学 skills
scripts/                校验、构建、测试脚本

修改文档时的核心原则

  1. 先保兼容,再谈翻译 任何会被 Claude Code 直接读取或执行的标识,优先保留原样。

  2. 先讲用途,再讲命令 中文读者更容易先理解“这是什么 / 什么时候用 / 为什么有价值”,再接受 CLI、配置和脚本细节。

  3. 不要把正文写成翻译腔 优先自然中文表达;必要时保留 skillsCLIhooksMCPsubagents 这类英文术语。

  4. 高风险文件少改、谨慎改 .sh.py.json.yml 默认只同步必要的兼容性变化;注释能不动就不动。

修改示例文件时要特别注意

以下内容默认不要翻译:

  • 文件名、目录名
  • slash command 名称
  • skill / subagent / plugin 名称
  • YAML frontmatter key
  • JSON / YAML key
  • CLI flags
  • 环境变量名
  • MCP server 名
  • 代码块里的可执行命令

推荐提交流程

  1. 改文档或示例
  2. uv run python scripts/validate_localization.py
  3. uv run pytest scripts/tests/ -q
  4. 如果改了 EPUB 构建,在支持 mmdc 的环境运行 uv run scripts/build_epub.py --lang zh,并确认远端 EPUB 构建 jobs 通过
  5. README.mdUPSTREAM.mdCHANGELOG.md 里记录最近同步内容

Read the full file on GitHub · 110 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. 12d ago First seen · 110 lines · 990 tokens per session scan A 3dd623a3927f

Subscribe to this mod's changes

claude-howto-zh-cn CLAUDE.md is an instructions file published in the GitHub repository lhfer/claude-howto-zh-cn (2,295 stars, last pushed 1mo ago), licensed MIT. It adds 990 tokens to every session, about $0.0049 per session on Opus 5. 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 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,469 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens