Claude Md
Agent Buildingclaude-mdClaude Md is an Agent Skill for agent building published in the lhfer/claude-howto-zh-cn repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
按最佳实践创建或更新 CLAUDE.md,帮助 AI agent 更快理解项目。Use when users want to create, update, audit, or improve a CLAUDE.md file.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/lhfer/claude-howto-zh-cn/blob/HEAD/03-skills/claude-md/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/claude-md, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
CLAUDE.md / 项目记忆整理
用户输入
$ARGUMENTS
支持的意图:
createupdateaudit- 指定某个路径下的
CLAUDE.md
核心原则
CLAUDE.md是 Claude Code 自动加载的长期项目上下文- 内容要短、准、长期有效
- 不要把 lint / format 规则硬塞进去
- 不要把一次性任务说明塞进去
- 不要自动生成一堆无价值内容
推荐结构
- Project Overview
- Tech Stack
- Project Structure
- Development Commands
- Critical Conventions
- Known Issues / Gotchas
执行流程
create(创建)
- 分析项目结构和技术栈
- 草拟
CLAUDE.md - 给用户审阅
- 确认后写入
update(更新)
- 读取现有
CLAUDE.md - 找出冗余、过时或不该存在的内容
- 给出优化建议
- 审阅后更新
audit(审计)
- 检查行数和结构
- 识别 anti-patterns
- 输出报告,不直接改文件
质量约束
- 目标尽量少于 300 行
- 面向所有会话都适用
- 尽量用文件引用替代长代码块
- 命令必须真实可用