Skip to content
SkillModel-led800 tokens in use

property-based-testing

Write, review and debug property-based tests across Hypothesis, fast-check, proptest and Echidna, with a catalog of properties and failure triage.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/property-based-testing/skills/property-based-testing
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing property-based-testing costs

189tokens idle
800tokens in use
4,696tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Fair
  • Frontmatter12/15
  • Structure8/25
  • Examples6/15
  • Output10/15
  • Size13/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

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.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers