prune-tests
Skill1 starsChanged 41 days agoMITView on GitHub
Prune tests that guard no behavior.
17 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- EdenGibson/claude-skillsedited, first seen Nov 29, 2026
- bmaltais/skillsedited, first seen Nov 29, 2026
- MH221B/skillsedited, first seen Nov 29, 2026
- mia-cx/skillstheir own version, first seen Nov 29, 2026
- mattbutlerengineering/mattbutlerengineeringtheir own version, first seen Nov 29, 2026
- nicknisi/skillsedited, first seen Nov 29, 2026
Used with
Projects with it also use simplify.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- caldoai/skills★ 1.6k98% same
- Mineru98/skills-store★ 1398% same
- nicknisi/skills★ 563% same
- bmaltais/skills★ 262% same
- MH221B/skills★ 293% same
- EdenGibson/claude-skills★ 198% same
Wrote their own version · 11
- elie222/rakazo★ 10ksame name
- vosslab/vosslab-skills★ 6same name
- leek/agent-skills★ 5same name
- BarganConstantin/agent-skills★ 4same name
- mia-cx/skills★ 4same name
- jonmumm/skills★ 3same name
- mattbutlerengineering/mattbutlerengineering★ 3same name
- TzolkinB/skills★ 2same name
- jackharrhy/skills★ 1same name
- LMPrado-DZ23/dz23-arsenal★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audit-agent-documentationSkill
- automate-meSkill
- babysit-and-shipSkill
- chief-of-staffSkill
- coordinatorSkill
- figure-it-outSkill
- git-guardrailsSkill
- learn-tasteSkill
- maintain-skillsSkill
- org-assistantSkill
- principlesSkill
- pstack-helpSkill
- pstack-modeSkill
- pstack-setupSkill
- recallSkill
- reflectSkill
- retroSkill
- setup-matt-pocock-skillsSkill
- show-me-your-workSkill
- swarmSkill
- usage-reviewSkill
- wizardSkill
- writing-for-agentsSkill
- broSkill
- in-your-own-wordsSkill
- ketchupSkill
- ketchup-videoSkill
- next-optionsSkill
- prSkill
- reply-shapeSkill
- teachSkill
- technical-writingSkill
- unslopSkill
- write-like-meSkill
- animateSkill
- animation-performanceSkill
- ask-sonnerSkill
- choreographSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- diagnosing-bugsSkill
- emil-design-engSkill
- everystateSkill
- gesturesSkill
- implementSkill
- implement-specSkill
- linting-alignmentSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- mobile-nativeSkill
- pstack-tddSkill
- remove-animationsSkill
- setup-agent-sign-inSkill
- setup-pre-commitSkill
- setup-ts-deep-modulesSkill
- statechartSkill
- tddSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
9
Distinctive
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
Keep a test only if it depends on the intended behavior: it should change only when that behavior changes, and fail only when it regresses.
- Distinctive: line 16
If another test already guards the same behavior, prune the copy.
- Distinctive: line 27
Nothing: no change to the code can make it fail, so it has no reason of its own to change.
- Distinctive: line 44
Delete every test that isn't anchored to intended behavior.
- Distinctive: line 46
Delete production code that only existed for the tests you removed.
- Distinctive: line 50
Every test left is anchored to intended behavior.
- Distinctive: line 52
No test asserts code that no longer exists.
- Distinctive: line 53
No two tests guard the same behavior.
- Distinctive: line 54
No production code exists only for tests.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prune every test that guards no behavior.
1. Find what each test depends on
Invoke /principle-test-behavior-not-implementation for the test-quality criteria.
Keep a test only if it depends on the intended behavior: it should change only when that behavior changes, and fail only when it regresses.
If another test already guards the same behavior, prune the copy.
Prune tests that depend on:
The past: it asserts that removed code stays gone. Bringing it back would be a decision, not a regression.
For example:
- A feature was removed, and tests assert it's gone.
- A module was moved, and a test asserts it's absent from its old path.
Nothing: no change to the code can make it fail, so it has no reason of its own to change.
For example:
- It tests the browser: a
<button>renders, or a click event fires. The browser is already tested. - It mocks the unit under test, then asserts what the mock returns.
- It asserts what the type system already guarantees.
The implementation: it changes whenever the code does, even when behavior didn't.
For example:
- The expected value is derived from the same logic as the code, so a wrong result still passes.
- It asserts private state, internal call order, or which helper was invoked.
2. Prune
- Delete every test that isn't anchored to intended behavior.
- Where one also covers behavior something relies on, rewrite it against that behavior instead.
- Delete production code that only existed for the tests you removed.
What done looks like
- Every test left is anchored to intended behavior.
- Each one would fail on a regression, and only on a regression.
- No test asserts code that no longer exists.
- No two tests guard the same behavior.
- No production code exists only for tests.
Example
--- a/pricing.test.ts
+++ b/pricing.test.ts
@@ rewritten: the expected value repeated the code's logic @@
test("applies the discount", () => {
- const price = 100;
- expect(applyDiscount(price, 0.2)).toBe(price - price * 0.2);
+ expect(applyDiscount(100, 0.2)).toBe(80);
});
--- a/cart.test.ts
+++ b/cart.test.ts
@@ rewritten against what callers see: it asserted private state @@
test("adds an item to the cart", () => {
const cart = new Cart();
cart.add(book);
- expect(cart._items.length).toBe(1);
+ expect(cart.total()).toBe(book.price);
});
@@ deleted: checkout.test.ts already guards the same total @@
-test("total includes tax", () => {
- expect(cartTotal([book], { tax: 0.1 })).toBe(11);
-});
--- a/export.test.ts
+++ b/export.test.ts
@@ deleted: it guards code that no longer exists @@
-test("legacy exporter is gone", () => {
- expect(existsSync("src/export/legacy.ts")).toBe(false);
-});
--- a/session.test.ts
+++ b/session.test.ts
@@ deleted, with the production code that only existed for it @@
-test("clears the cache", () => {
- _resetCacheForTests();
- expect(_getCacheSize()).toBe(0);
-});
--- a/session.ts
+++ b/session.ts
@@ @@
-export function _resetCacheForTests() { cache.clear(); }
-export function _getCacheSize() { return cache.size; }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.

