minimise
Skill413 starsChanged 5 months agoMITView on GitHub
Prune a bug fix or new tests down to the smallest correct diff through multiple elimination passes. Use before committing any fix or test addition.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- inspectSkill
- scrutiniseSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Read the diff: Run git diff HEAD (or git diff --cached if staged) and read every changed file in full.
- Distinctive: line 22
If so, drop the new test entirely.
- Distinctive: line 24
Remove non-essential changes: Delete anything that does not answer "yes" to the first question above.
- Very specific: line 28
Run the minimal test group: Use the smallest focused test group that exercises the changed code (see test/runtests.jl for group names).
- Distinctive: line 46
Stop when every remaining line answers "yes" to: *if I remove this, the targeted bug reappears or the targeted test fails*.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Minimise
The goal is to remove every line that is not strictly required for correctness, then verify the result still passes the relevant tests.
Process
Repeat the following until no further reductions are possible:
- Read the diff. Run
git diff HEAD(orgit diff --cachedif staged) and read every changed file in full. - Challenge each change. For every changed line ask:
- Would removing this line cause a test to fail or a bug to reappear?
- Is this a cleanup, rename, refactor, or comment that is not load-bearing?
- For new tests: does an existing test already cover this behaviour? If so, drop the new test entirely.
- Remove non-essential changes. Delete anything that does not answer "yes" to the first question above. Prefer shrinking an existing case over adding a new one.
- Run the minimal test group. Use the smallest focused test group that
exercises the changed code (see
test/runtests.jlfor group names). Confirm all tests pass before continuing. - Repeat from step 1 until a full pass produces no further removals.
Heuristics
- A one-line fix is better than a five-line fix.
- A new test case added to an existing
@testsetis better than a new@testset. - A new value constructor in
src/test_resources.jlshould be the minimum needed to instantiate the type under test; no extra fields or variants. - Comments and blank lines added alongside a fix are not load-bearing; remove them unless they explain something non-obvious.
- Helper functions introduced solely for the fix are a red flag; inline them.
When to stop
Stop when every remaining line answers "yes" to: if I remove this, the targeted bug reappears or the targeted test fails. At that point report the final diff and suggest committing.
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.

