Simplify
它能做什么
审视一个文件、工具或代码库,找出重复、无用或不必要的部分,并提出删减建议。它适用于希望减少杂乱、同时不破坏依赖它的任何内容的开发者。
适用场景
- ✓当一个项目变得杂乱,而你想安全地精简它的时候。
- ✓当你怀疑某些代码已不再使用、但又不确定的时候。
- ✓当你想在删除任何东西之前,先知道哪些可以删除的时候。
技能链接
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Simplify/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请看看这个模块,在我们做任何更改之前,告诉我哪些可以安全删除。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能会映射目标被使用的每一处,例如调用方、导入和文档,并用证据对每个元素进行分类。它会把删减建议提交给你批准,只有在检查确认依赖它们的内容没有变化之后,才会应用已批准的部分。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Simplify
Simplify makes a target smaller and clearer without breaking anything that depends on it. A target can be a file, a skill, a tool, a subsystem or a whole repo. The work comes in three intents, each building on the record from the one before: Survey maps the target read-only, Propose ranks the cuts and holds them for a yes, and Apply lands the approved cuts with proven parity. The central rule: a cut never drops a behaviour that a dependent or ISA criterion relies on, and anything the evidence cannot explain stays. Records sit next to the target's ISA when there is one.
Ideal State
- The target ends smaller and clearer, and every behaviour a dependent or ISA criterion relies on still works, shown by the same baseline checks passing before and after.
- No element is cut on looks: each cut rests on a survey finding with its searches cited, and anything the evidence cannot explain stays.
- Nothing changes until the principal approves the specific rows, and a delete of irreplaceable content gets its own yes.
- Each stage leaves its record under
LIFEOS/MEMORY/WORK/{slug}/simplify/, so the next stage builds on evidence rather than on memory.
Intent Routing
| Intent | Trigger | File |
|---|---|---|
| Survey | "simplify X", "what can we delete", "map this before we cut", "is this dead" | Intents/Survey.md |
| Propose | "what would you cut", "propose the simplifications", follows Survey in the same run | Intents/Propose.md |
| Apply | "apply them", "y" or approved row numbers after a proposal | Intents/Apply.md |
A bare "simplify X" runs Survey and then Propose, and stops at the proposal. A Survey-only request, which is how a read-only analysis calls this skill, stops at the survey.
Data & Config
None. This skill reads no config and needs no account or key. Each stage writes its record under LIFEOS/MEMORY/WORK/{slug}/simplify/ next to the target's ISA, if it has one; nothing else is created.
Gotchas
- Zero code-search hits does not mean dead. LifeOS calls a great deal of code by string: hook registrations in
settings.json, launchd plists, workflow YAML, skill routing tables, spawned commands and dynamic imports.ReferenceCheck.ts --shipped-pathsexists because plain path scans missed spawn and dynamic-import specifiers. - The file can change mid-run. Memory loops and peer sessions write to the same trees. A file edited after its survey is re-read before it is touched (Trim, where a concurrent deploy-command fix was nearly reverted).
Examples
Example 1: Simplify a tool
User: "simplify LIFEOS/TOOLS/ReferenceCheck.ts"
→ Survey intent, then Propose
→ Purpose from its header and DocCheck lineage, every caller, findings per function, test baseline
→ A ranked table of cuts, each with its parity check, held for y
Example 2: Land the approved cuts
User: "y, but skip 4"
→ Apply intent
→ Rows 1–3 and 5 land as separate commits, tests show the same pass count before and after, and the measured reduction sits beside the estimate
Example 3: An always-on context file
User: "simplify CLAUDE.md"
→ Routed to Trim, which owns always-on context files and their directive-coverage gate
常见问题
它会未经询问就删除东西吗?
不会。在你批准具体条目之前,不会做任何更改。
如果它无法判断某物是否被使用怎么办?
证据无法解释的内容会被保留。
它的记录保存在哪里?
每个阶段都会在该项目的文件夹中写入记录,因此后续步骤建立在证据之上。
详情
作者的原始描述
Research-first simplification of any file, skill, tool, subsystem or codebase against its ideal state: reads its ISA or derives its purpose, maps every dependent (callers, imports, references, hooks, settings, docs, tests), classifies each element with evidence as load-bearing, duplicate, dead, cruft or over-abstracted, then proposes and applies cuts that keep every behaviour a dependent relies on, proven by before-and-after parity checks. USE WHEN simplify, simplify this, simplify this system, remove cruft, remove duplication, dedupe, dead code, clean this up, this has gotten bloated, too com
repo: danielmiessler/LifeOS
热度
- GitHub 星标
- 20k
- 排名
- #10457
- 许可证
- MIT
- 更新时间
- 2026/10/28
评论
- …