Agent skill · Testing & QA

property-based-testing

Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codeCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill property-based-testing --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 11
SKILL.md size: 6 KB
Bundled scripts: none
Path: plugins/property-based-testing/skills/property-based-testing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Property-Based Testing Guide Use this skill proactively during development when you encounter patterns where PBT provides stronger coverage than example-based tests. ## When to Invoke (Automatic Detection) **Invoke this skill when you detect:** - **Serialization pairs**: `encode`/`decode`, `serialize`/`deserialize`, `toJSON`/`fromJSON`, `pack`/`unpack` - **Parsers**: URL parsing, config parsing, protocol parsing, string-to-structured-data - **Normalization**: `normalize`, `sanitize`, `clean`, `canonicalize`, `format` - **Validators**: `is_valid`, `validate`, `check_*` (especially with normalizers) - **Data structures**: Custom collections with `add`/`remove`/`get` operations - **Mathematical/algorithmic**: Pure functions, sorting, ordering, comparators - **Smart contracts**: Solidity/Vyper contracts, token operations, state invariants, access control **Priority by pattern:** | Pattern | Property | Priority | |---------|----------|----------| | encode/decode pair | Roundtrip | HIGH | | Pure function | Multiple | HIGH | | Validator | Valid after normalize | MEDIUM | | Sorting/ordering | Idempotence + ordering | MEDIUM | | Normalization | Idempotence | MEDIUM | | Builder/factory | O

What's inside
Steps it walks through
  1. When to Invoke (Automatic Detection)
  2. When NOT to Use
  3. Property Catalog (Quick Reference)
  4. Decision Tree
  5. How to Suggest PBT
  6. When NOT to Use PBT
  7. Red Flags
  8. Rationalizations to Reject
Ships with 10 files
  • README.md
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • references/design.md
  • references/generating.md
  • references/interpreting-failures.md
  • references/libraries.md
  • references/refactoring.md
  • references/reviewing.md
  • references/strategies.md
More from skills
All skills →
About this skill
What does the property-based-testing skill do?

Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.

How do I install it?

Run `npx skills add trailofbits/skills --skill property-based-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going