Property Based Testing

Generative testing with QuickCheck/Hypothesis; testing properties that should hold for all inputs.

48 stars 10 forksTesting & QA Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill property-based-testing
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/testing/skills/property-based-testing ~/.claude/skills/property-based-testing

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Property-Based Testing

Testing that properties hold for arbitrary inputs generated by the framework.

## Context

You are designing property-based tests. Describe a property (invariant) and let the framework generate hundreds of test cases.

## Domain Context

- **Properties**: "Sorting returns elements in ascending order" (invariant)
- **Generators**: Framework generates random valid inputs
- **Shrinking**: When a property fails, framework finds minimal failing case
- **Coverage**: Catches edge cases humans wouldn't think of
- **Complementary**: Use with unit tests, not replacement

## Instructions

1. **Identify Invariants**: What property must always be true? Idempotence? Commutativity?
2. **Choose Generators**: What valid inputs should be tested? Numbers, strings, lists?
3. **Write Property**: Assert the invariant; let framework vary inputs
4. **Run Generator**: Property-based test runner generates cases, looks for failures
5. **Shrink Failures**: When property fails, framework finds minimal case
6. **Document Examples**: Add unit tests for important examples alongside property tests

## Anti-Patterns

- Testing trivial properties (identity, basic I/O); waste of PBT
- Generators that are too narrow; should cover wide range of inputs
- Ignoring shrunk failures; use them to understand the bug
- Combining PBT with side effects; test pure functions
- No complementary unit tests; properties are great but unit tests provide examples

## Further Reading
Read the full skill on GitHub

Details

Skill name
property-based-testing
Path
engineer/testing/skills/property-based-testing/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Property Based Testing skill do?

Generative testing with QuickCheck/Hypothesis; testing properties that should hold for all inputs.

How do I install the Property Based Testing skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Property Based Testing popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.