simplification-pass
Skill9 starsChanged 2 months agoMITView on GitHub
Removes complexity that is not paying for itself: dead code, needless abstraction, duplicated logic, and configuration nobody sets. Use when code is harder to read than the problem is hard, before extending a messy area, or when a diff can be made smaller without losing behavior. Never changes behavior.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- api-designSkill
- architecture-decisionSkill
- autonomous-relaySkill
- browser-verificationSkill
- code-review-passSkill
- data-analysisSkill
- data-modelingSkill
- data-pipelineSkill
- data-qualitySkill
- documentationSkill
- firmware-buildSkill
- frontend-buildSkill
- incident-responseSkill
- incremental-deliverySkill
- ml-lifecycleSkill
- performance-passSkill
- release-and-rollbackSkill
- requirements-interviewSkill
- security-hardeningSkill
- spec-writingSkill
- systematic-debuggingSkill
- tdd-loopSkill
- team-escalationSkill
- using-agent-dev-teamSkill
- work-breakdownSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If the tests need editing, it was a behavior change, not a simplification.
- Distinctive: line 44
Options nobody uses: Every flag doubles the state space.
- Distinctive: line 49
Before deleting something odd, find out why it is there.
- Distinctive: line 52
Search for callers, including in tests, config, and other languages.
- Distinctive: line 53
Look for a comment or issue reference nearby.
- Distinctive: line 55
If you find a reason, leave it and add the missing comment.
- Distinctive: line 71
Run the tests. Quote the green run.
- Distinctive: line 73
Run the tests. They must pass unchanged.
- Distinctive: line 81
No behavior changed. If any did, split it into its own commit with its own test.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Simplification Pass
The goal is less code doing the same thing, verified by the same tests passing unchanged. If the tests need editing, it was a behavior change, not a simplification.
Preconditions
- Tests exist and pass before you start. Quote the run.
- The tests actually cover the behavior you are about to move. If they do not, write them first; simplification without a safety net is rewriting.
- This is its own commit, separate from any feature work.
What to look for, in order of payoff
- Dead code. Unreferenced functions, unreachable branches, a flag that is always the same value, a parameter every caller passes identically. Delete it; git remembers.
- Abstraction with one implementation. An interface with a single implementer, a factory that constructs one type, a strategy pattern with one strategy. It was built for a second case that never arrived.
- Indirection that does not decide anything. A wrapper that forwards, a config value nobody sets, a layer that only renames its arguments.
- Duplicated logic that has drifted. Two copies that are slightly different is worse than two copies that are identical, because now nobody knows which is correct. Find out which is right before merging them; the difference may be a bug fix.
- Nesting. Guard clauses and early returns flatten most deep conditionals. Three levels is usually one extraction away from one.
- Comments compensating for names. Rename, then delete the comment.
- Options nobody uses. Every flag doubles the state space. Remove the ones with one real value.
Chesterton's fence
Before deleting something odd, find out why it is there. Two minutes:
git log -Sfor the line, and read the commit message.- Search for callers, including in tests, config, and other languages.
- Look for a comment or issue reference nearby.
If you find a reason, leave it and add the missing comment. If you find nothing after looking, delete it and say in the commit message that you looked.
What is not simplification
- Renaming everything to your preferred convention.
- Replacing a clear loop with a dense one-liner. Shorter is not simpler.
- Introducing a new abstraction to remove two lines of duplication. Two similar things are usually just two things.
- Changing behavior "because the old behavior looked wrong". That is a bug report, not a refactor.
Duplication is cheaper than the wrong abstraction. Wait for the third occurrence.
Process
- Run the tests. Quote the green run.
- Make one kind of simplification. One commit.
- Run the tests. They must pass unchanged.
- Repeat.
- Report the net line change and what was removed.
Verification
- The tests are byte-for-byte unchanged and still pass.
- The diff removes more than it adds, or the addition is a name that removed a comment.
- No behavior changed. If any did, split it into its own commit with its own test.
- Anything deleted was checked against callers first.
Red flags
| Thought | Reality |
| "I had to update a test" | Then it was a behavior change. Split it out. |
| "This abstraction will be useful later" | It has one implementation today. Delete it; adding it back is cheap. |
| "These two functions are similar, I'll merge them" | Find out why they differ first. The difference may be a fix. |
| "I do not know why this line is here, so it is dead" | Look. Two minutes of git history beats a regression. |
| "I'll simplify while adding the feature" | Separate commits, or the review is impossible. |
| "Shorter is simpler" | Not if it takes longer to read. Optimise for the reader. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

