reclaude

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

reclaude

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
    .claude/rules/
    files)
报告当前行数,并标记问题:
  • 理想状态:<50行
  • 可接受范围:50-100行
  • 需要重构:>100行(将内容移至
    .claude/rules/
    文件)

2. Ensure verification section exists

2. 确保验证章节存在

Check for a
## Verification
section with commands Claude can run after making changes. If missing:
  • Look in package.json for test/lint/typecheck/build scripts
  • Look for Makefile, justfile, or other task runners
  • Add a
    ## Verification
    section with discovered commands
This is critical—Claude performs dramatically better when it can verify its work.
检查是否包含
## Verification
章节,其中包含Claude在修改后可以运行的命令。如果缺失:
  • 在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.
查找可以成为
~/.claude/skills/
可复用全局Skill的内容:
  • 关于工具/框架的内容(而非项目特定内容)
  • 相同的指令出现在(或适用于)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 test
    ,
    npm run build
    if standard)
  • Links to
    .claude/rules/
    files with brief descriptions
  • Verification section (always required)
仅提取属于根目录CLAUDE.md的内容:
  • 一行项目描述
  • 包管理器(如果不是npm)
  • 仅保留非通用命令(跳过标准的
    npm test
    npm run build
  • 指向
    .claude/rules/
    文件的链接及简短描述
  • 验证章节(始终必填)

6. Group remaining content

6. 整理剩余内容

Organize remaining instructions into
.claude/rules/
files by category (e.g., TypeScript conventions, testing patterns, API design, Git workflow).
将剩余指令按类别组织到
.claude/rules/
文件中(例如TypeScript约定、测试模式、API设计、Git工作流)。

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
undefined
markdown
undefined

Project Name

项目名称

One-line description.
一行描述。

Commands

命令

  • command
    - what it does (only non-obvious ones)
  • command
    - 功能说明(仅保留非通用命令)

Rules

规则

  • Topic — brief description

Verification

验证

After making changes:
  • npm test
    - Run tests
  • npm run lint
    - Check linting
undefined
修改完成后:
  • npm test
    - 运行测试
  • npm run lint
    - 检查代码规范
undefined

What 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可以通过读取代码库推断出的任何内容
  • 语言/框架的标准实践
  • 其他地方已存在的文档(改为链接即可)