property-testing
Skill0 starsChanged 5 days agoMITView on GitHub
Property-based testing as an extension of tdd. Use when a seam's behavior follows a rule over many inputs (roundtrip, invariant, model, metamorphic relation), when adding properties to existing example tests, or when diagnosing-bugs runs its property / fuzz loop.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- lengrufeng2008/dsh-skill-librarytheir own version, first seen Nov 15, 2026
- nyxandro/property-testing-skilltheir own version, first seen Nov 5, 2026
- adam-paterson/skillstheir own version, first seen Oct 11, 2026
- minikin/keelertheir own version, first seen Sep 6, 2026
- DROOdotFOO/agent-skillstheir own version, first seen Sep 1, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- minikin/keeler★ 4same name
- nyxandro/property-testing-skill★ 4same name
- adam-paterson/skills★ 1same name
- DROOdotFOO/agent-skills★ 1same name
- lengrufeng2008/dsh-skill-library★ 0same 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 repository35 other files it gives its agents.
- ask-mattSkill
- codebase-designSkill
- code-reviewSkill
- create-verification-skillSkill
- cutSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- lean-product-canvasSkill
- maintain-verification-skillSkill
- napkin-mathSkill
- prototypeSkill
- pr-review-canvasSkill
- prSkill
- researchSkill
- retroSkill
- setup-matt-pocock-skillsSkill
- setup-playbookSkill
- tddSkill
- teachSkill
- to-prdSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
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
- Very specific: line 54
When diagnosing-bugs reaches the bug through random inputs, the shrunk failing input becomes the regression: pin it as an example test at …
“Common” is measured: kept by at least 6 in 10 of the 5 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
Property-Based Testing
A property is a rule stated for every input, checked against generated inputs, with a failure shrunk to a minimal counterexample. This skill extends tdd: a property is one more slice in the same red → green loop, at the same pre-agreed seams, under the same tautology ban. Load tdd first; this file covers only what properties change.
When a property earns its place
Walk the ladder for each agreed seam and note every rung that holds; the strongest few become the seam's properties (see Independent oracles for strength):
- An inverse exists (encode/decode, write/read) → roundtrip.
- A simpler reference or a cheap abstract model exists, or the generator can build the input from parts whose expected result it already knows → model / oracle / by construction.
- The output type has a validity rule (sorted, balanced, totals non-negative) → validity, checked on every operation's output.
- Checking a result is far cheaper than computing it → easy to verify.
- A known change to the input moves the output predictably → metamorphic.
- A law holds (idempotent, commutative, associative, identity, valid input passes through unchanged) → algebraic.
- Stateful, with many possible operation orders → state machine against a model.
- Rich input and none of the above → survives: returns a value or fails only in documented ways.
- Otherwise → examples only. This is the right answer for wiring, orchestration, thin wrappers, known specific boundaries, and business rules that are lists of cases rather than laws.
Then the cost check: valid inputs can be built directly, without filtering most of them away, and one run is fast enough to repeat 100+ times. When either fails, narrow the property or stay with examples.
Patterns, with examples: patterns.md.
Where properties go in the loop
- Seam proposal. Beside each seam's one-line note (what it catches, what it misses), name the rule expected there and its source: the spec,
GLOSSARY.md, an ADR, or the user's words. A rule read off the implementation restates the code; it becomes a property only once one of those sources states it. Where the spec leaves a case open (is the empty string a valid result?), the answer is a question for the user at this step, so the rule's source is confirmed before its property is written. - Examples first. The first slice at a seam is an example test. Its green fixes the interface the property will generate against.
- Property slice. One property per slice, red before green, citing its source in the test name or a one-line comment. Aim for the few most valuable properties per seam, about three at most. Green means the property passes over the full run, so the fix addresses the rule the counterexample breaks, not that one input.
- A property green on its first run has not yet shown it can fail. Break the code deliberately (do nothing, drop part of the input, off by one; see patterns.md) and keep the property only if some break turns it red. Revert every break.
- A failing property is the new red. Take the shrunk counterexample and triage it, then pin it as an example test so it runs every time, independent of seeds and generator changes:
- Real bug: pin the counterexample first (red), then fix.
- Input the spec excludes: narrow the generator, record the exclusion in the property, and pin the counterexample with the behavior the user confirmed for it. This example records a decision, so it may pass as soon as it is written.
Example tests stay. They are the readable spec, and they catch what a weak property lets through.
Independent oracles
tdd's tautology rule holds unchanged: the input is generated, the expected outcome comes from an independent source. For a property that source is one of:
- the inverse operation;
- a validity rule on the output;
- a simpler reference: brute force, the previous version, an abstract model the result is mapped onto;
- a relation between runs: the same call with a known change to its input;
- a cheap verification of the answer.
Strength: prefer a model property plus a validity property; reach for metamorphic properties when a model would be costly or would mirror the implementation. A roundtrip or a law alone also passes for a do-nothing implementation (reverse(reverse(xs)) == xs holds for identity), so pair it with a property or an example that a do-nothing implementation fails.
From a fuzz loop
When diagnosing-bugs reaches the bug through random inputs, the shrunk failing input becomes the regression: pin it as an example test at the seam. Keep the property too when its rule has a source, so the next variant of the bug fails the same way.
Generators and runs
Generators, shrinking, seeds and replay, labeling, run budget, flakiness, and libraries per language: generators.md.
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.

