Agent skill

CLAUDE.md Writer (Chinese)

by luongnv89 in luongnv89/claude-howto

Chinese edition of the CLAUDE.md skill: create, update or audit the file, keep it within a line budget, and move detail into agent_docs references instead of code snippets.

MITAuto-check passedAgent Workflows

SKILL.md written in Chinese; this summary is our English description.

Install CLAUDE.md Writer (Chinese)

skills CLI
$ npx skills add luongnv89/claude-howto --skill claude-md -a claude-code

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

GitHub CLI
$ gh skill install luongnv89/claude-howto claude-md --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/luongnv89/claude-howto.git skills-src && mkdir -p .claude/skills && cp -r skills-src/zh/03-skills/claude-md .claude/skills/claude-md && 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
claude-md
GitHub stars
42k
Token cost
~934 tokens
SKILL.md length
297 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

Chinese edition of the CLAUDE.md skill: create, update or audit the file, keep it within a line budget, and move detail into agent_docs references instead of code snippets.

  • Works in 7 steps: 项目分析 → 内容策略(WHAT, WHY, HOW) → 渐进式披露策略 → …
  • Creating a compact CLAUDE.md for a Chinese-speaking team's repository
  • SKILL.md covers 用户输入, 核心原则, 执行流程 and 输出格式, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Three modes are available, create, update and audit, plus a path argument for a directory-level file, and the skill argues that CLAUDE.md is the only file auto-included in every conversation. It sets quality limits: under 300 lines and ideally under 100, no style rules, no task-specific instructions, no code snippets (use file:line references), and no repeating of package.json or README content.

For large projects it recommends an agent_docs folder with files such as building_the_project.md and running_tests.md, referenced from CLAUDE.md. It lists required sections, anti-patterns to avoid including generic advice and long TODO lists, and an eight-point checklist. Create mode drafts and shows the file before writing, update mode proposes cuts and additions for approval, and audit mode only reports on line count, how much applies to every session, and anti-patterns found. It also has a section for requests to create or update AGENTS.md.

When your agent uses it

  • Creating a compact CLAUDE.md for a Chinese-speaking team's repository
  • Checking a CLAUDE.md against a line budget and an anti-pattern list
  • Splitting a long CLAUDE.md into agent_docs reference files

Example prompts

  • “Audit our CLAUDE.md and report its line count and any anti-patterns, without editing it.”
  • “Update the CLAUDE.md so it uses file references instead of pasted code.”

Workflow steps

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

  1. 项目分析
  2. 内容策略(WHAT, WHY, HOW)
  3. 渐进式披露策略
  4. 质量约束
  5. 必备章节
  6. 需要避免的反模式
  7. 验证清单

What it can do on your machine

Read from SKILL.md and the folder at commit 556af8d. 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 markdown).

    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

CLAUDE.md Writer (Chinese) loads about 934 tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 297 words of instructions outside code blocks.

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

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 luongnv89/claude-howto at commit 556af8d, republished under its MIT licence (© luongnv89). 297 words, ~934 tokens.

Download SKILL.mdSave it as .claude/skills/claude-md/SKILL.md (or your agent's skills folder).
name
claude-md
description
按最佳实践创建或更新 CLAUDE.md 文件,以便为 AI agent 提供最优的项目入门上下文

用户输入

text
$ARGUMENTS

在继续之前,你必须先考虑用户输入(如果不为空)。用户可能会指定:

  • create - 从零创建新的 CLAUDE.md
  • update - 改进已有的 CLAUDE.md
  • audit - 分析并报告当前 CLAUDE.md 的质量
  • 一个具体路径,用于创建或更新(例如 src/api/CLAUDE.md 代表目录级说明)

核心原则

LLM 是无状态的:CLAUDE.md 是每次对话中唯一会自动包含的文件。它是让 AI agent 了解代码库的主要入门文档。

黄金法则
  1. 少即是多:前沿 LLM 大约能遵循 150-200 条指令。Claude Code 的系统提示词本身已经占了大约 50 条,因此 CLAUDE.md 必须聚焦且简洁。

  2. 只放通用信息:只包含每次会话都适用的内容。任务特定的说明应该放在单独文件里。

  3. 不要把 Claude 当成 lint 工具:风格指南会膨胀上下文并降低指令遵循效果。应改用确定性工具(如 prettier、eslint 等)。

  4. 绝不自动生成:CLAUDE.md 是 AI harness 中杠杆最高的位置。应该经过认真思考后手工编写。

执行流程

1. 项目分析

首先分析当前项目状态:

  1. 检查是否存在已有的 CLAUDE.md 文件:

    • 根目录:./CLAUDE.md 或 .claude/CLAUDE.md
    • 目录级:**/CLAUDE.md
    • 全局用户配置:~/.claude/CLAUDE.md
  2. 识别项目结构:

    • 技术栈(语言、框架)
    • 项目类型(monorepo、单体应用、库)
    • 开发工具(包管理器、构建系统、测试运行器)
  3. 查看已有文档:

    • README.md
    • CONTRIBUTING.md
    • package.json、pyproject.toml、Cargo.toml 等
2. 内容策略(WHAT, WHY, HOW)

围绕三个维度组织 CLAUDE.md:

WHAT - 技术与结构
  • 技术栈概览
  • 项目组织方式(对 monorepo 尤其重要)
  • 关键目录及其用途
WHY - 目的与背景
  • 项目是做什么的
  • 为什么做出这些架构决策
  • 每个主要组件负责什么
HOW - 工作流与约定
  • 开发流程(bun vs node、pip vs uv 等)
  • 测试流程和命令
  • 验证与构建方法
  • 关键“坑点”或非显而易见的要求
3. 渐进式披露策略

对于较大的项目,建议创建 agent_docs/ 文件夹:

text
agent_docs/
  |- building_the_project.md
  |- running_tests.md
  |- code_conventions.md
  |- architecture_decisions.md

在 CLAUDE.md 中引用这些文件,并写明:

markdown
关于详细的构建说明,请参考 `agent_docs/building_the_project.md`

重要:使用 file:line 引用,而不是代码片段,以避免上下文过时。

4. 质量约束

创建或更新 CLAUDE.md 时:

  1. 目标长度:少于 300 行,理想情况下少于 100 行
  2. 不要写风格规则:移除任何 lint/format 相关说明
  3. 不要写任务特定说明:移到单独文件中
  4. 不要写代码片段:改用文件引用
  5. 不要重复信息:不要重复 package.json 或 README 中已有内容
5. 必备章节

一个结构良好的 CLAUDE.md 应包含:

markdown
# 项目名称

一句简短的项目描述。

## 技术栈
- 主语言和版本
- 关键框架/库
- 数据库/存储(如有)

## 项目结构
[仅适用于 monorepo 或复杂结构]
- `apps/` - 应用入口
- `packages/` - 共享库

## 开发命令
- 安装:`command`
- 测试:`command`
- 构建:`command`

## 关键约定
[只保留非显而易见、高影响的约定]
- 约定 1,简要说明
- 约定 2,简要说明

## 已知问题 / 坑点
[经常让开发者踩坑的内容]
- 问题 1
- 问题 2
6. 需要避免的反模式

不要包含:

  • 代码风格指南(交给 lint 工具)
  • 如何使用 Claude 的说明
  • 对显而易见模式的冗长解释
  • 复制粘贴的代码示例
  • 泛泛而谈的最佳实践(例如“写干净的代码”)
  • 特定任务的说明
  • 自动生成内容
  • 大量 TODO 列表
7. 验证清单

在最终确定前,检查:

  • 少于 300 行(最好少于 100 行)
  • 每一行都适用于所有会话
  • 没有风格/格式规则
  • 没有代码片段(使用文件引用)
  • 命令已经验证可用
  • 对复杂项目使用了渐进式披露
  • 已记录关键坑点
  • 没有与 README.md 重复

输出格式

对于 create 或默认模式:
  1. 分析项目
  2. 按上述结构起草 CLAUDE.md
  3. 向用户展示草稿以供审阅
  4. 在获得批准后写入相应位置
对于 update:
  1. 读取现有 CLAUDE.md
  2. 按最佳实践进行审计
  3. 识别:
    • 需要删除的内容(风格规则、代码片段、任务特定内容)
    • 需要压缩的内容
    • 缺失的重要信息
  4. 向用户展示修改建议
  5. 在获得批准后应用修改
对于 audit:
  1. 读取现有 CLAUDE.md
  2. 生成报告,包括:
    • 当前行数与目标的对比
    • 可通用于所有会话内容的百分比
    • 发现的反模式列表
    • 改进建议
  3. 不要修改文件,只做报告

AGENTS.md 处理

如果用户请求创建或更新 AGENTS.md:

从 v2.1.277 起,Claude Code 会直接把 AGENTS.md 作为项目指令读取。 但前提是工作目录以及它上面的每一级目录都没有 CLAUDE.md、.claude/CLAUDE.md 或 CLAUDE.local.md。~/.claude/CLAUDE.md、受管理的 CLAUDE.md 和 .claude/rules/ 不计入这项检查,它们仍会一并加载。该行为由 /config 中的 Project instructions 控制:claude-md-or-agents-md(默认)、claude-md-and-agents-md、claude-md、managed-only。在无法直接读取的环境中 — v2.1.277 之前的版本(在 Bedrock/Vertex/Foundry、LLM 网关或关闭遥测的情况下为 v2.1.281 之前),或升级后的第一个会话 — 退回到在 CLAUDE.md 中用 @AGENTS.md 导入,或者把 CLAUDE.md 软链接到它。

AGENTS.md 是一个跨工具的项目上下文文件 — 和 CLAUDE.md 属于同一类文档,而不是 agent 定义格式。它的存在是为了让多个编码 agent 共用同一套项目约定:

  • 构建、测试和 lint 命令
  • 代码风格与架构约定
  • 仓库结构以及各部分所在位置

Subagents 是单独定义的,放在 .claude/agents/*.md 里 — 不在 AGENTS.md 中。

同样适用以下原则:

  • 保持聚焦和简洁
  • 使用渐进式披露
  • 用外部文档引用代替内联内容

备注

  • 在写入前始终验证命令是否可用
  • 不确定时就不要写,少即是多
  • 系统提醒会告诉 Claude,CLAUDE.md “可能相关,也可能不相关” - 噪音越多,越容易被忽略
  • monorepo 最需要清晰的 WHAT/WHY/HOW 结构
  • 目录级 CLAUDE.md 应该更聚焦

© luongnv89, 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 zh/03-skills/claude-md of luongnv89/claude-howto.

Open the folder on GitHubat commit 556af8d

Compare with similar skills

CLAUDE.md Writer (Chinese) 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.

CLAUDE.md Writer (Chinese) compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLAUDE.md Writer (Chinese) this skillluongnv89/claude-howto42k—~934Automated safety check: PassMIT
Context Engineeringabashev/vfs-s31069 repos~2.6kAutomated safety check: NotesApache-2.0
Harness Engineering10xChengTu/harness-engineering1021 repos~1kAutomated safety check: PassNone
Cc Dev Agentsangrokjung/claude-forge852—~771Automated safety check: PassMIT
Caveman Learn Token FixesJuliusBrussee/caveman111k—~2.8kAutomated safety check: PassApache-2.0
Context Routing Auditwithkynam/vibecode-pro-max-kit1.1k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Context Engineering

    abashev/vfs-s3

    Optimizes agent context setup. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 9 repos~2.6k tokens
    Agent WorkflowsAuto-check: notes
  • Harness Engineering

    10xChengTu/harness-engineering

    Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.

    102 GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check passed
  • Cc Dev Agent

    sangrokjung/claude-forge

    A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.

    852 GitHub stars~771 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Caveman Learn Token Fixes

    JuliusBrussee/caveman

    Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.

    111k GitHub stars~2.8k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Routing Audit

    withkynam/vibecode-pro-max-kit

    Audits a project's context routing, skill discoverability and skill wiring by running a chain of validator scripts and fixing whatever they report.

    1.1k GitHub stars~1.2k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Context Budget Check

    poshan0126/dotclaude

    Estimates the per-turn token cost of a project's .claude folder and CLAUDE.md, split into always-loaded, path-scoped and invoked-only files, and flags what runs over budget.

    870 GitHub stars~1.4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from luongnv89/claude-howto

All 25 skills in this repo
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 10 days ago
    Auto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated 10 days ago
    Auto-check passed
  • Blog Post Drafting

    luongnv89/claude-howto

    Guides drafting a blog post from an idea and optional source material: research, brainstorming, outlining and version-tracked drafts, with user approval at each step.

    42k GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check passed
  • Brand Voice Guide

    luongnv89/claude-howto

    Ensure all communication matches brand voice and tone guidelines. Use when creating marketing copy, customer communications, public-facing content, or when…

    42k GitHub stars~609 tokensUpdated 10 days ago
    Auto-check passed
  • Code Review Specialist

    luongnv89/claude-howto

    Reviews code for security, performance, quality and maintainability, using a checklist, a finding template and two metrics scripts.

    42k GitHub stars~764 tokensUpdated 10 days ago
    Auto-check passed
  • Claude Code Skill Assessment

    luongnv89/claude-howto

    Runs a quick or deep quiz on Claude Code skills, scores ten feature areas and generates a personalized learning path with prioritized next steps.

    42k GitHub stars~5.5k tokensUpdated 10 days ago
    Auto-check passed

Categories

Questions about CLAUDE.md Writer (Chinese)

What does CLAUDE.md Writer (Chinese) do?

Chinese edition of the CLAUDE.md skill: create, update or audit the file, keep it within a line budget, and move detail into agent_docs references instead of code snippets. md is the only file auto-included in every conversation.json or README content.

When should I use CLAUDE.md Writer (Chinese)?

CLAUDE.md Writer (Chinese) fits situations like: creating a compact CLAUDE.md for a Chinese-speaking team's repository; checking a CLAUDE.md against a line budget and an anti-pattern list; splitting a long CLAUDE.md into agent_docs reference files.

How do I install CLAUDE.md Writer (Chinese) in Claude Code?

Run `npx skills add luongnv89/claude-howto --skill claude-md -a claude-code`. Or copy the skill folder (zh/03-skills/claude-md in luongnv89/claude-howto) into .claude/skills/claude-md in your project. Claude Code loads it when a task matches its description.

How do I install CLAUDE.md Writer (Chinese) in Codex?

Run `npx skills add luongnv89/claude-howto --skill claude-md -a codex`. Or copy the skill folder (zh/03-skills/claude-md in luongnv89/claude-howto) into .agents/skills/claude-md in your project. Codex loads it when a task matches its description.

Can I use CLAUDE.md Writer (Chinese) 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 luongnv89/claude-howto --skill claude-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-md, .gemini/skills/claude-md, .github/skills/claude-md and .opencode/skills/claude-md in your project.

What does CLAUDE.md Writer (Chinese) need to run?

SKILL.md names no scripts, command-line tools or credentials: CLAUDE.md Writer (Chinese) is instructions for the agent only.

Does CLAUDE.md Writer (Chinese) 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 CLAUDE.md Writer (Chinese) 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 CLAUDE.md Writer (Chinese) use?

CLAUDE.md Writer (Chinese) 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 CLAUDE.md Writer (Chinese) use?

About 934 tokens (SKILL.md is roughly 3.7k 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 CLAUDE.md Writer (Chinese)?

Skills that share tags, products or a category with CLAUDE.md Writer (Chinese): Context Engineering (abashev/vfs-s3, 106 stars), Harness Engineering (10xChengTu/harness-engineering, 102 stars), Cc Dev Agent (sangrokjung/claude-forge, 852 stars) and Caveman Learn Token Fixes (JuliusBrussee/caveman, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLAUDE.md Writer (Chinese)?

luongnv89 (a GitHub user) maintains it in luongnv89/claude-howto, which has 41,780 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on September 30, 2026.

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