sethdford/claude-skills/property-based-testing

Claude Code and agent skill by sethdford/claude-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

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

Install

npx vskill@latest install sethdford/claude-skills/property-based-testing

SKILL.md

The same SKILL.md was published earlier as sethdford/claude-skills/property-based-testing.

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

  • John Hughes, _QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs_
  • Hypothesis documentation (Python library for PBT)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
7-day trend score
7

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sethdford/claude-skills/property-based-testing/badge)](https://verified-skill.com/skills/sethdford/claude-skills/property-based-testing)

Something wrong with this skill or its page? Tell us.