meaningful-tests
Skill1 starsChanged 26 days agoMITView on GitHub
Write tests that pin product behaviour rather than restating the implementation or chasing coverage targets. Use when composing, extending, or revising any test (unit, integration, e2e); when about to write a test for a given feature; when cleaning up or de-slopping test prose (names, describe blocks, assertion messages); or when asked for more coverage, a test for this, or to make a failing suite pass.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- shinokamix/loppertheir own version, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- shinokamix/lopper★ 10same name
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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- declared-breaksSkill
- deep-modulesSkill
- intakeSkill
- load-bearing-commentsSkill
- portable-skillsSkill
- shown-workSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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
Write: "Given an empty cart, checking out yields a confirmation and zero orders."
- Very specific: line 16
Avoid: "Given the current checkout() implementation, it returns this object."
- Distinctive: line 24
Write: "checkout with an empty cart yields a confirmation and zero orders."
- Distinctive: line 25
Avoid: "test checkout", "works correctly", "successfully handles the request."
- Distinctive: line 40
Before you write a test, run the gate: does it pin behaviour a user can observe or a regression worth preventing?
- Distinctive: line 46
Run the relevant tests first.
- Distinctive: line 48
Update them when the intended behaviour deliberately changes.
- Distinctive: line 49
Never alter or delete a test to make a failing implementation pass.
- Distinctive: line 55
Follow the requested scope.
≈ “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
Meaningful tests
Tests pin behaviour, not implementation. A suite is a contract that keeps the product's outward behaviour stable; it is not coverage to be filled and not a transcription of what the code already does.
Pin behaviour, not output
A test states the intended behaviour, then asserts it. The assertion names the outcome a user can observe, so the test survives a refactor that changes nothing the user sees.
- Write: "Given an empty cart, checking out yields a confirmation and zero orders."
- Avoid: "Given the current
checkout()implementation, it returns this object."
The second form is the one failure this skill guards against: a mirror test that restates whatever the implementation happens to return. It passes by construction and pins nothing, because the code is the only source of the expected value. The expected value must come from an independent source: a known-good literal, a worked example, the spec.
The name is part of the pin
The assertion pins the behaviour; the name is what a failure shows first. Write the name as the behaviour in one sentence, so a failing test opens with what broke:
- Write: "checkout with an empty cart yields a confirmation and zero orders."
- Avoid: "test checkout", "works correctly", "successfully handles the request."
A name like "works correctly" could sit unchanged on any passing test in any repo, so it pins nothing. "Successfully" and "properly" are hedges in an outcome's place: cut them and state what happens. The same bar covers the rest of the suite's prose. Describe blocks and assertion messages use plain words, without filler ("in order to verify" is "verify") or narration ("this test verifies that" restates the harness; start with the behaviour).
The gate
Write a test only to lock an intentional behaviour worth keeping stable: a hand-written contract, an invariant, a regression that cost real time. Skip a test whose correctness is already guaranteed elsewhere (the platform, framework, compiler, or build system), or one that would be a mirror test:
- A static asset responds 200.
- An imported image exists at a known path.
- A constant equals the literal it was defined with.
- A wrapper calls another function once, unless that call is itself a contract to pin (a side effect, a retry, a dedupe).
The presence of noise-light.png is not meaningful product behaviour; a GET /noise-light.png → 200 test is a mirror test.
Before you write a test, run the gate: does it pin behaviour a user can observe or a regression worth preventing? If not, don't write it.
When a test already exists
An existing test is part of the project's contract. When you modify the behaviour it covers:
- Run the relevant tests first.
- Keep their intent.
- Update them when the intended behaviour deliberately changes.
- Never alter or delete a test to make a failing implementation pass.
A failing test means one of two things: the implementation is wrong, or the intended behaviour has changed. Investigate which before changing either.
When asked for tests
Follow the requested scope. When tests are asked for after a feature is done, read the finished implementation and pin its intended behaviour rather than mechanically covering every function or branch. If the scope is unclear, ask before building a large test surface.
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.

