Property-based-testing teaches an agent to assert rules over a whole input domain and let a generator hunt for counterexamples. It carries a catalog of property shapes, from roundtrip and inverse to idempotence and oracle, ordered from weakest to strongest.
Reference files cover writing strategies, refactoring code that has no seam to assert through, reviewing existing property tests, interpreting shrunk failures, and choosing libraries, including Echidna and Medusa for Solidity invariants.
What You Get
- A property catalog with formulas and where each applies
- A strength ordering from no crash up to roundtrip and oracle
- Guidance for strategies and generators
- A triage table that tells a wrong property from a spec gap or a code bug
- A library table by language and a Solidity section for Echidna and Medusa
Common Use Cases
- Testing encode and decode pairs, parsers and normalizers
- Judging whether existing property tests assert anything real
- Triaging a shrunk counterexample after a property test fails
- Writing invariants for smart contracts
What Makes It Unique
The skill names two ways a property test asserts nothing, tautology and vacuity, and treats a finding of no property to test as a valid outcome. Its failure guide ranks specs, types and docstrings as the source of truth for what the code promised, and it leaves adding a new test library to the user.
Under The Hood
The agent reads SKILL.md, which stays short, and loads one of five reference files for the task at hand. The skill ships no scripts. It may search the repository for an existing test library with a ripgrep command, run the project’s own test suite and write test files. It makes no network calls of its own.