Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create or update CLAUDE.md files following best practices for optimal AI agent onboarding
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-11 | ✓→✓ | = Same ✓ | 60% | 0% |
| case-12 | ✓→✓ | = Same ✓ | 50% | 0% |
| case-13 | ✓→✓ | = Same ✓ | 29% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 74% | 0% |
text$ARGUMENTS
在继续之前,你必须先考虑用户输入(如果不为空)。用户可能会指定:
create - 从零创建新的 CLAUDE.mdupdate - 改进已有的 CLAUDE.mdaudit - 分析并报告当前 CLAUDE.md 的质量src/api/CLAUDE.md 代表目录级说明)LLM 是无状态的:CLAUDE.md 是每次对话中唯一会自动包含的文件。它是让 AI agent 了解代码库的主要入门文档。
首先分析当前项目状态:
./CLAUDE.md 或 .claude/CLAUDE.md**/CLAUDE.md~/.claude/CLAUDE.md围绕三个维度组织 CLAUDE.md:
对于较大的项目,建议创建 agent_docs/ 文件夹:
textagent_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 引用,而不是代码片段,以避免上下文过时。
创建或更新 CLAUDE.md 时:
一个结构良好的 CLAUDE.md 应包含:
markdown# 项目名称 一句简短的项目描述。 ## 技术栈 - 主语言和版本 - 关键框架/库 - 数据库/存储(如有) ## 项目结构 [仅适用于 monorepo 或复杂结构] - `apps/` - 应用入口 - `packages/` - 共享库 ## 开发命令 - 安装:`command` - 测试:`command` - 构建:`command` ## 关键约定 [只保留非显而易见、高影响的约定] - 约定 1,简要说明 - 约定 2,简要说明 ## 已知问题 / 坑点 [经常让开发者踩坑的内容] - 问题 1 - 问题 2
不要包含:
在最终确定前,检查:
create 或默认模式:update:audit:如果用户请求创建或更新 AGENTS.md:
AGENTS.md 用于定义专门的 agent 行为。与 CLAUDE.md(项目上下文)不同,AGENTS.md 定义的是:
同样适用以下原则:
Other measured skills in the registry, with their headline benchmark lift.