reclaude
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesereclaude
reclaude
Refactor CLAUDE.md files to follow progressive disclosure principles.
重构CLAUDE.md文件以遵循渐进式披露原则。
Prompt
提示词
I want you to refactor my CLAUDE.md file to follow progressive disclosure principles.
Follow these steps:
我希望你按照渐进式披露原则重构我的CLAUDE.md文件。
请遵循以下步骤:
1. Check length
1. 检查长度
Report the current line count. Flag issues:
- Ideal: <50 lines
- Acceptable: 50-100 lines
- Needs refactoring: >100 lines (move content to files)
.claude/rules/
报告当前行数,并标记问题:
- 理想状态:<50行
- 可接受范围:50-100行
- 需要重构:>100行(将内容移至文件)
.claude/rules/
2. Ensure verification section exists
2. 确保验证章节存在
Check for a section with commands Claude can run after making changes. If missing:
## Verification- Look in package.json for test/lint/typecheck/build scripts
- Look for Makefile, justfile, or other task runners
- Add a section with discovered commands
## Verification
This is critical—Claude performs dramatically better when it can verify its work.
检查是否包含章节,其中包含Claude在修改后可以运行的命令。如果缺失:
## Verification- 在package.json中查找测试/ lint/类型检查/构建脚本
- 查找Makefile、justfile或其他任务运行器
- 添加包含已发现命令的章节
## Verification
这一点至关重要——当Claude能够验证自己的工作时,表现会大幅提升。
3. Find contradictions
3. 查找矛盾内容
Identify any instructions that conflict with each other. For each contradiction, ask me which version I want to keep.
识别任何相互冲突的指令。对于每个矛盾点,询问我希望保留哪个版本。
4. Check for global skill extraction candidates
4. 寻找可提取为全局Skill的内容
Look for content that could become a reusable global skill in :
~/.claude/skills/- Is about a tool/framework (not project-specific)
- Same instructions appear (or would apply) in 2+ projects
- Is substantial (>20 lines)
If found, suggest creating a global skill with name and description.
查找可以成为中可复用全局Skill的内容:
~/.claude/skills/- 关于工具/框架的内容(而非项目特定内容)
- 相同的指令出现在(或适用于)2个以上项目中
- 内容篇幅较长(>20行)
如果找到,建议创建带有名称和描述的全局Skill。
5. Identify essentials for root CLAUDE.md
5. 确定根目录CLAUDE.md的必要内容
Extract only what belongs in the root CLAUDE.md:
- One-line project description
- Package manager (if not npm)
- Non-obvious commands only (skip ,
npm testif standard)npm run build - Links to files with brief descriptions
.claude/rules/ - Verification section (always required)
仅提取属于根目录CLAUDE.md的内容:
- 一行项目描述
- 包管理器(如果不是npm)
- 仅保留非通用命令(跳过标准的、
npm test)npm run build - 指向文件的链接及简短描述
.claude/rules/ - 验证章节(始终必填)
6. Group remaining content
6. 整理剩余内容
Organize remaining instructions into files by category (e.g., TypeScript conventions, testing patterns, API design, Git workflow).
.claude/rules/将剩余指令按类别组织到文件中(例如TypeScript约定、测试模式、API设计、Git工作流)。
.claude/rules/7. Flag for deletion
7. 标记需删除的内容
Identify content that should be removed entirely:
- API documentation — link to external docs instead
- Code examples — Claude can infer from reading source files
- Interface/type definitions — these exist in the code
- Generic advice — "write clean code", "follow best practices"
- Obvious instructions — "use TypeScript for .ts files"
- Redundant info — things Claude already knows
- Too vague — instructions that aren't actionable
识别应完全删除的内容:
- API文档——改为链接到外部文档
- 代码示例——Claude可以通过读取源文件推断
- 接口/类型定义——这些已存在于代码中
- 通用建议——“编写简洁代码”、“遵循最佳实践”
- 显而易见的指令——“对.ts文件使用TypeScript”
- 冗余信息——Claude已了解的内容
- 过于模糊的内容——无法执行的指令
Target Template
目标模板
markdown
undefinedmarkdown
undefinedProject Name
项目名称
One-line description.
一行描述。
Commands
命令
- - what it does (only non-obvious ones)
command
- - 功能说明(仅保留非通用命令)
command
Rules
规则
Verification
验证
After making changes:
- - Run tests
npm test - - Check linting
npm run lint
undefined修改完成后:
- - 运行测试
npm test - - 检查代码规范
npm run lint
undefinedWhat to Keep vs Remove
保留与删除的判定标准
Keep in CLAUDE.md:
- Commands Claude can't guess from package.json
- Non-standard patterns specific to this project
- Project gotchas and footguns
- Links to detailed rules files
Move to :
.claude/rules/- Detailed conventions (>10 lines on a topic)
- Style guides
- Architecture decisions
- Workflow documentation
Remove entirely:
- Anything Claude can infer from reading the codebase
- Standard practices for the language/framework
- Documentation that exists elsewhere (link instead)
保留在CLAUDE.md中的内容:
- Claude无法从package.json中猜测到的命令
- 项目特有的非标准模式
- 项目中的注意事项和陷阱
- 指向详细规则文件的链接
移至的内容:
.claude/rules/- 详细约定(某个主题超过10行内容)
- 风格指南
- 架构决策
- 工作流文档
完全删除的内容:
- Claude可以通过读取代码库推断出的任何内容
- 语言/框架的标准实践
- 其他地方已存在的文档(改为链接即可)