Discipline no dead code
Skill yli769227-jpg/awesome-claude-code-cn/skills/discipline-no-dead-code
Karpathy 教你 LLM 会犯什么错。我教你 LLM 在我这犯了什么错、怎么治。8 条铁律 + 真实反例 + 中文 Claude Code 实战包
npx -y skills add yli769227-jpg/awesome-claude-code-cn --skill discipline-no-dead-codeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
不假设 Dead Code(跨 Agent 安全) —— 删除函数/变量前必须 Grep 所有调用方;新增文件后必须更新项目清单;多 agent 并行时编辑前必须 Read 最新文件不依赖缓存。触发: 即将删除任何符号(函数/类/变量/文件)、即将新增源文件、即将在多 agent 协作中改一个可能被并发修改的文件时。
SKILL.md
1.0 KB, as published. Nobody here has run it
七、不假设 Dead Code(跨 Agent 安全)
- 删除函数/变量前,必须 Grep 搜索所有调用方。
- 新增文件到项目后,必须更新项目清单(package.json、go.mod 等)。
- 多 agent 并行工作时,每个 agent 编辑前必须 Read 最新文件内容,不依赖缓存。
加载时机
- 即将删除某个函数 / 类 / 变量 / 文件
- 即将新增源文件 / 模块
- 多 agent 协作中即将编辑一个可能被并发修改的文件
- 看到一个"看上去没人用"的符号
配套
具体反面例子 / 正面例子见 EXAMPLES.md。