Agent skill

CLAUDE.md Writer and Auditor

by lhfer in lhfer/claude-howto-zh-cn

Creates, updates or audits a project's CLAUDE.md by analyzing the codebase, drafting for review and flagging anti-patterns, aiming for under 200 lines.

MITAuto-check passedAgent Workflows

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

Install CLAUDE.md Writer and Auditor

skills CLI
$ npx skills add lhfer/claude-howto-zh-cn --skill claude-md -a claude-code

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

GitHub CLI
$ gh skill install lhfer/claude-howto-zh-cn 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/lhfer/claude-howto-zh-cn.git skills-src && mkdir -p .claude/skills && cp -r skills-src/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
2.3k
Token cost
~254 tokens
SKILL.md length
95 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Creates, updates or audits a project's CLAUDE.md by analyzing the codebase, drafting for review and flagging anti-patterns, aiming for under 200 lines.

  • Works in 4 steps: 分析项目结构和技术栈 → 草拟 CLAUDE.md → 给用户审阅 → …
  • Creating a first CLAUDE.md for a project
  • SKILL.md covers 用户输入, 核心原则, 推荐结构 and 执行流程, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Based on guidance written in Chinese, this skill supports four intents: create, update, audit, or work on a CLAUDE.md at a given path. It treats CLAUDE.md as long-lived project context that Claude Code loads automatically, so content should be short, accurate and durable, with no lint or formatting rules, no one-off task notes and no filler. It also notes that AGENTS.md is not read automatically and must be imported from CLAUDE.md or symlinked, and that subagent definitions belong in .claude/agents.

Create analyzes the project structure and stack, drafts the file, shows it for review and writes it after approval. Update reads the current file, finds redundant or outdated content and proposes changes for review. Audit checks line count and structure, identifies anti-patterns and writes a report without touching the file. A suggested layout covers overview, tech stack, structure, development commands, conventions and known gotchas, with a target of 200 lines or fewer and longer material moved to path-scoped rules or skills.

When your agent uses it

  • Creating a first CLAUDE.md for a project
  • Trimming an overgrown CLAUDE.md and removing outdated content
  • Auditing a CLAUDE.md for anti-patterns without changing it

Example prompts

  • “Create a CLAUDE.md for this repository and show me the draft first.”
  • “Audit our CLAUDE.md and report anti-patterns without editing it.”
  • “Update the CLAUDE.md in the backend folder and remove stale commands.”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 分析项目结构和技术栈
  2. 草拟 CLAUDE.md
  3. 给用户审阅
  4. 确认后写入

What it can do on your machine

Read from SKILL.md and the folder at commit f0da0c6. 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.

    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 and Auditor loads about 254 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 95 words of instructions outside code blocks.

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

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 lhfer/claude-howto-zh-cn at commit f0da0c6, republished under its MIT licence (© lhfer). 95 words, ~254 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 更快理解项目。Use when users want to create, update, audit, or improve a CLAUDE.md file.

CLAUDE.md / 项目记忆整理

用户输入

text
$ARGUMENTS

支持的意图:

  • create
  • update
  • audit
  • 指定某个路径下的 CLAUDE.md

核心原则

  • CLAUDE.md 是 Claude Code 自动加载的长期项目上下文
  • 内容要短、准、长期有效
  • 不要把 lint / format 规则硬塞进去
  • 不要把一次性任务说明塞进去
  • 不要自动生成一堆无价值内容
  • AGENTS.md 不会被 Claude Code 自动读取;需要共享时从 CLAUDE.md 导入 @AGENTS.md 或使用 symlink
  • subagent 定义属于 .claude/agents/,不要把 AGENTS.md 当成 agent 配置

推荐结构

  • Project Overview
  • Tech Stack
  • Project Structure
  • Development Commands
  • Critical Conventions
  • Known Issues / Gotchas

执行流程

create(创建)
  1. 分析项目结构和技术栈
  2. 草拟 CLAUDE.md
  3. 给用户审阅
  4. 确认后写入
update(更新)
  1. 读取现有 CLAUDE.md
  2. 找出冗余、过时或不该存在的内容
  3. 给出优化建议
  4. 审阅后更新
audit(审计)
  1. 检查行数和结构
  2. 识别 anti-patterns
  3. 输出报告,不直接改文件

质量约束

  • 目标控制在 200 行以内;更长内容拆到按路径生效的 rules 或按需 skills
  • 面向所有会话都适用
  • 文件引用可以减少重复维护,但不会减少加载上下文;需要按需加载时使用 rules 或 skills
  • 命令必须真实可用

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

Open the folder on GitHubat commit f0da0c6

Compare with similar skills

CLAUDE.md Writer and Auditor 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 and Auditor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLAUDE.md Writer and Auditor this skilllhfer/claude-howto-zh-cn2.3k—~254Automated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k18 repos~2.7kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 18 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

More from lhfer/claude-howto-zh-cn

  • Claude Code Self-Assessment Advisor

    lhfer/claude-howto-zh-cn

    Quizzes you on Claude Code in a quick or deep mode, scores your level across 10 topics and recommends what to learn next, in Chinese.

    2.3k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Blog Post Drafting Workflow

    lhfer/claude-howto-zh-cn

    Turns a topic and reference materials into a versioned blog draft through a fixed outline-first pipeline with per-source summaries.

    2.3k GitHub stars~218 tokensUpdated 2 mo ago
    Auto-check passed
  • Code Review Specialist

    lhfer/claude-howto-zh-cn

    Structured code review across security, performance, code quality and maintainability, with a checklist, a finding template and two Python scripts for complexity metrics.

    2.3k GitHub stars~267 tokensUpdated 2 mo ago
    Auto-check passed
  • Fowler-Style Refactoring

    lhfer/claude-howto-zh-cn

    基于 Martin Fowler 方法论做系统化重构。Use when users ask to refactor code, improve structure, reduce technical debt, clean up legacy code, or improve maintainability.

    2.3k GitHub stars~156 tokensUpdated 2 mo ago
    Auto-check passed
  • Claude Code Lesson Quiz

    lhfer/claude-howto-zh-cn

    Runs a ten-question interactive quiz on one lesson of a Claude Code tutorial, scores it, and points out the weak spots with a review of missed questions.

    2.3k GitHub stars~781 tokensUpdated 2 mo ago
    Auto-check passed
  • Brand Voice Guide

    lhfer/claude-howto-zh-cn

    Keeps marketing copy and customer messages in one consistent brand voice, using a defined mission, tone, writing rules and lists of preferred and avoided terms.

    2.3k GitHub stars~178 tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about CLAUDE.md Writer and Auditor

What does CLAUDE.md Writer and Auditor do?

Creates, updates or audits a project's CLAUDE.md by analyzing the codebase, drafting for review and flagging anti-patterns, aiming for under 200 lines. md at a given path.md as long-lived project context that Claude Code loads automatically, so content should be short, accurate and durable, with no lint or formatting rules, no one-off task notes and no filler.

When should I use CLAUDE.md Writer and Auditor?

CLAUDE.md Writer and Auditor fits situations like: creating a first CLAUDE.md for a project; trimming an overgrown CLAUDE.md and removing outdated content; auditing a CLAUDE.md for anti-patterns without changing it.

How do I install CLAUDE.md Writer and Auditor in Claude Code?

Run `npx skills add lhfer/claude-howto-zh-cn --skill claude-md -a claude-code`. Or copy the skill folder (03-skills/claude-md in lhfer/claude-howto-zh-cn) 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 and Auditor in Codex?

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

Can I use CLAUDE.md Writer and Auditor 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 lhfer/claude-howto-zh-cn --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 and Auditor need to run?

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

Does CLAUDE.md Writer and Auditor 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 and Auditor 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 and Auditor use?

CLAUDE.md Writer and Auditor 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 and Auditor use?

About 254 tokens (SKILL.md is roughly 1k 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 and Auditor?

Skills that share tags, products or a category with CLAUDE.md Writer and Auditor: Using Agent Skills (addyosmani/agent-skills, 103k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars) and Writing For Agents (bestofjs/bestofjs, 3.1k 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 and Auditor?

lhfer (a GitHub user) maintains it in lhfer/claude-howto-zh-cn, which has 2,307 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on August 6, 2026.

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