property-testing
Skill4 starsChanged 2 months agoMITView on GitHub
Catalog of property-test invariants and proptest patterns for Rust. Use when writing tests during /keeler:tdd or strengthening tests after /keeler:mutants — whenever code has an invariant worth pinning (round-trips, ordering, idempotence, bounds, merging) or a surviving mutant points at a general gap rather than a missing example.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- clnnn/playbooktheir own version, first seen Nov 16, 2026
- 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
- 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
- nyxandro/property-testing-skill★ 4same name
- adam-paterson/skills★ 1same name
- DROOdotFOO/agent-skills★ 1same name
- clnnn/playbook★ 0same 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 repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- gherkin-specsSkill
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 50
When proptest finds a failure it writes a seed file under proptest-regressions/ — commit it.
“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-Testing Patterns
A property test doesn't check one example — it states a law and lets randomness hunt for a counterexample. When a mutant survives, ask first: "is there a law this mutant breaks?" — one strengthened property usually kills a whole family of mutants that example tests would need one-by-one.
Invariant catalog
Scan the code for these shapes; each maps to a ready-made property:
| Shape in the code | Law to pin |
| Parse + Display pair | Round-trip: parse(display(x)) == x |
| Normalization / canonicalization | Idempotence: f(f(x)) == f(x) |
| Sort / merge / dedup | Shape: output sorted, no overlaps/duplicates (check windows(2)) |
Aggregation (len, sum, count) | Consistency: len() == iter().count(); total equals sum of parts |
| Membership + construction | Cross-check: contains(p) ⇔ some input covers p |
| Saturating / clamping arithmetic | Bounds: result within [min, max] for any input |
| Order-insensitive operations | Permutation: shuffling input doesn't change output |
| Two implementations (fast + naive) | Oracle: fast(x) == naive(x) for all x |
Proptest mechanics
mod properties {
use super::*;
use proptest::prelude::*;
proptest! {
#[test]
fn round_trips(pairs in prop::collection::vec((1u16..=65535, 1u16..=65535), 1..10)) {
// build input from generated pairs, then assert the law
}
}
}- Generate the input the user could type, not the internal representation — the parser is part of what's under test.
- Constrain strategies to valid domain (e.g.
1u16..=65535), and write a separate property for invalid input if rejection is a law too. prop_assert!/prop_assert_eq!(notassert!) — they report the minimal counterexample after shrinking.- When proptest finds a failure it writes a seed file under
proptest-regressions/— commit it; it pins the counterexample forever. - Boundary traps love
u16/u32edges: always let strategies reach the extremes (=65535,u64::MAX) — off-by-one mutants live there.
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.

