When to choose it
Functions with an invariant, round trip or trustworthy oracle across an input domain.
Choose it if: the function has a useful property across many inputs.
Look elsewhere if: a few example tests fit better, or your task is browser UI testing.
What the source describes
- Guidance for writing and reviewing properties and input generators.
- Helps distinguish a flawed property, an ambiguous specification and a product defect.
Requirements
- Claude Code with plugin support.
- Code and existing test suite to inspect.
- An appropriate property-testing library before running generated tests; installation does not add one.
This Skill is shipped in the property-based-testing plugin from the Trail of Bits marketplace.
Install the plugin
- Install the focused plugin. This installs the containing property-based-testing plugin, version 1.2.2 in the reviewed manifest. It supplies a Skill and references, not Hypothesis, fast-check or another test runner. The upstream paid evaluation scripts are not an activation step and were not run by ClaudeStack.
- Inspect the project’s tests. Identify the test runner, property-testing library and resolved dependency versions already used by the project. Match that library rather than introducing a second one. If none is installed, first propose a useful property and discuss the dependency; the Skill declares no universal framework-version requirement.
- Activate and constrain the task. Confirm the plugin is active. State the function, input domain and whether changes are allowed.
- Write down the contract before generating inputs. Name the valid input domain, preconditions and equality semantics. For a codec, decide whether it accepts bytes, all strings or only valid text; for a normalizer, state the intended canonical form. A round trip over unsupported inputs does not establish a product defect.
- Choose the reference for the actual job. Use references/generating.md for constrained generators, references/reviewing.md for weak assertions, references/interpreting-failures.md for a reduced failure, and references/libraries.md for framework choice. Preserve these files with the installed Skill; they are not independent plugins.
Run the installation command in your shell after reviewing the source. Local scope enables the package for you in this repository. It does not enable it for every collaborator.
claude plugin marketplace add trailofbits/skills
claude plugin install property-based-testing@trailofbits --scope localHow to use it
Ask naturally for property-test design, review or failure triage. Name the relevant code and existing test framework.
Start with a read-only review of one existing property. Ask which implementation defect could falsify it, whether the generator reaches valid edge cases, and which contract supports the assertion. Only request runnable test edits after the domain and installed library are established.
An original example for a bounded task. This request example is written by ClaudeStack; it is not a transcript of a tested session.
Review our existing encode/decode property without editing files or adding dependencies. Use the supplied format contract and installed testing-library version. Identify valid inputs, explicit boundary examples and generator filters; explain whether the assertion could catch a defect independent of the implementation. For the supplied minimized failure, classify it as a wrong property, unsupported input, ambiguous contract or implementation bug. Suggest a durable regression example and record the exact replay information needed for our framework.The upstream content is CC-BY-SA-4.0. ClaudeStack provides original descriptions and examples, with author attribution and pinned source/license links; it does not redistribute the Skill text.
Upstream developer evaluation scripts can spend API budget. They are optional development tooling and are not part of these installation steps.
The upstream examples include evaluation results and runner settings for the author’s fixtures. They are not measured effectiveness, a required test budget or dependency-version guarantees for your application. This review did not run the plugin, generated tests or API-budget evaluations.
What to expect
The reviewed source describes these observations. ClaudeStack has not loaded or run this extension.
- A property grounded in the supplied contract, a generator that constructs valid inputs and explicit boundary examples where appropriate.
- An explanation of whether the assertion constrains the implementation independently. A round trip can still miss paired encoder/decoder mistakes, so a known external fixture or separate oracle may be needed.
- A classified reduced failure with its original input, dependency version and applicable replay details. Passing generated cases remains evidence about the tested property and domain, not a proof of general correctness.
Self-check: Check valid-input coverage, the independence of the assertion and whether known defects can fail it. Inspect discarded cases and health-check failures instead of counting an exhausted generator as success. Preserve a minimized failing input as an explicit regression case; separate a wrong property or unresolved contract decision from a confirmed implementation bug.
Troubleshooting
Generated tests always pass
Check for an assertion that duplicates the implementation or is true regardless of the output. Inspect whether generator constraints exclude the meaningful domain. A round trip alone may pass when both sides share the same mistake; add an independent fixture or oracle when the contract provides one.
There is no property-testing library
Discuss the dependency choice before adding one. Example tests can be appropriate when a useful property is unavailable.
The task is browser UI testing or binary fuzzing
Choose tools designed for that task; the reviewed Skill excludes these workflows.
Hypothesis reports excessive filtering or unsatisfiable inputs
Construct valid values in the strategy where possible, including relationships between fields. Do not silence the health check and call the run successful. Upstream prose simplifies this behavior; current Hypothesis documents health-check exceptions, so report the actual outcome rather than claiming zero valid cases passed.
A Unicode round trip fails on an unsupported string
Check the format’s promised domain before blaming the codec. If only valid UTF-8 text is supported, constrain the generator accordingly; if arbitrary strings are promised, the reduced input may reveal a defect. Keep an unresolved domain question visible for a maintainer decision.
A reduced failure cannot be replayed after an upgrade
Keep the exact failing input and test/library versions. Hypothesis failure blobs are version-sensitive and its database is not a durable correctness guarantee; preserve an explicit example for long-term regression coverage. For another framework, use its documented replay fields rather than copying a Hypothesis decorator.
A failure changes with time or external state
Inspect clock reads, shared state, I/O and the test runner’s isolation. Determine whether determinism is part of the contract, then isolate the source of variation. Do not assume every flaky result is a generator defect or widen the property until it stops failing.
Disable or remove it
- Disable or uninstall property-based-testing in /plugin at its installation scope.
- Generated tests and any separately installed testing library remain; review or remove them independently.
Limitations & considerations
- Passing generated cases is not a proof of correctness; properties need a valid input model and oracle.
- The source excludes end-to-end UI testing and coverage-guided binary fuzzing.
Source & review record
Our description is based on public documentation and manifests available on 2026-10-08. Installation formats were checked against Claude Code and the relevant installer documentation. No extension code was executed: this is a source review, not a runtime compatibility test or security audit.
- Original source and documentation
- Reviewed definition source
- License of the reviewed source
- Official plugin installation documentation
Repository last pushed at the time of review: 2026-10-07T16:35:30Z. This date does not prove that the extension works with a particular Claude Code release.
Usage guide sources
Upstream revision checked for this guide: 82fe8226252622fa807643bdca1710901198553a. Command names and behavior in this guide are documentation and registration-source findings, not runtime verification.
- Workflow and author README ↗
- Skill definition ↗
- Author and plugin identity ↗
- Marketplace definition ↗
- CC-BY-SA-4.0 license ↗
- Claude Code: Skill discovery and invocation ↗
- Claude Code: install, reload and manage plugins ↗
- Match the project’s property-testing library ↗
- Valid generators and explicit edge cases ↗
- Independent assertions and over-filtered tests ↗
- Ground and classify reduced counterexamples ↗
- Hypothesis: replaying failures and durable explicit examples ↗
- Hypothesis: health checks and excessive filtering ↗