claude-howto-zh-cn
CLAUDE.md2.3k starsChanged 4 months agoMITView on GitHub
这个文件给 Claude Code 提供“如何在这个仓库里协作”的工作说明。 claude-howto-zh-cn 是一个 documentation-as-code 仓库。 EPUB 的 Mermaid 图使用本地 mmdc 渲染,不再访问 Kroki。由于 mmdc 依赖的 Chromium 在 arm64 开发机上没有可用构建,EPUB 构建不属于 pre-commit hook,而是由主 CI、自动化测试和标签发布 workflow 强制验证。只有本机已有可用 mmdc 时才运行上面的命令。 1. 先保兼容,再谈翻译 任何会被 Claude Code 直接读取或执行的标识,优先保留原样。 2. 先讲用途,再讲命令 中文读者更容易先理解“这是什么 / 什么时候用 / 为什么有价值”,再接受 CLI、配置和脚本细节。 3. 不要把正文写成翻译腔 优先自然中文表达;必要时保留 skills、CLI、hooks、MCP、subagents 这类英文术语。 4. 高风险文件少改、谨慎改 .sh、.py、.json、.yml 默认只同步必要的兼容性变化;注释能不动就不动。 优先使用 conventional commits,例如:
In this repository2 other files it gives its agents.
- lesson-quizSkill
- self-assessmentSkill
The file
Files
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/ -qEPUB 构建
uv run scripts/build_epub.py --lang zhEPUB 的 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/ 校验、构建、测试脚本修改文档时的核心原则
- 先保兼容,再谈翻译 任何会被 Claude Code 直接读取或执行的标识,优先保留原样。
- 先讲用途,再讲命令 中文读者更容易先理解“这是什么 / 什么时候用 / 为什么有价值”,再接受 CLI、配置和脚本细节。
- 不要把正文写成翻译腔
优先自然中文表达;必要时保留
skills、CLI、hooks、MCP、subagents这类英文术语。 - 高风险文件少改、谨慎改
.sh、.py、.json、.yml默认只同步必要的兼容性变化;注释能不动就不动。
修改示例文件时要特别注意
以下内容默认不要翻译:
- 文件名、目录名
- slash command 名称
- skill / subagent / plugin 名称
- YAML frontmatter key
- JSON / YAML key
- CLI flags
- 环境变量名
- MCP server 名
- 代码块里的可执行命令
推荐提交流程
- 改文档或示例
- 跑
uv run python scripts/validate_localization.py - 跑
uv run pytest scripts/tests/ -q - 如果改了 EPUB 构建,在支持
mmdc的环境运行uv run scripts/build_epub.py --lang zh,并确认远端 EPUB 构建 jobs 通过 - 在
README.md、UPSTREAM.md、CHANGELOG.md里记录最近同步内容
提交信息风格
优先使用 conventional commits,例如:
docs(readme): sync upstream April 2026 updatesfeat(subagents): add performance-optimizer examplefix(hooks): switch shell hooks to stdin JSON protocolrefactor(epub): polish zh-cn cover and reading experience
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

