add-property-based-testing

add-property-based-testing is a command for coding agents from davepoon/buildwithclaude. It costs 5 tokens per session (716 once invoked), scanned A, original, MIT.

A property-based testing setup that checks general rules of a program with many generated inputs, rather than only a list of hand-written examples. It can use frameworks such as fast-check, Hypothesis, jqwik, FsCheck, proptest, or gopter.

In plain words
What is it for?
It is for identifying suitable functions, defining invariants and business rules, installing a matching test framework, and adding tests for transformations, API contracts, and business logic.
Why use it?
It helps find unexpected edge cases that example-based tests may miss, while connecting the checks to existing unit and integration tests.

Command

Part of the all-commands plugin — 23 commands shipped together

About the project

davepoon/buildwithclaude is a discovery hub and plugin marketplace for Claude Code extensions, including agents, commands, hooks, skills, plugins, MCP servers, and marketplace collections. Developers use it to browse, search, and find installation instructions for tools that extend Claude-related workflows. Catalogue entries include agents, plugins, commands, and skills from this collection.

davepoon/buildwithclaude · 3,415 stars · on GitHub · buildwithclaude.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/davepoon/buildwithclaude/add-property-based-testing
Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Or install all-commands, the plugin that ships this one along with the rest of its 23 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-property-based-testing

README.md
[![agentmods](https://agentmods.dev/badge/commands/davepoon/buildwithclaude/add-property-based-testing.svg)](https://agentmods.dev/commands/davepoon/buildwithclaude/add-property-based-testing)
Your own site
<a href="https://agentmods.dev/commands/davepoon/buildwithclaude/add-property-based-testing"><img src="https://agentmods.dev/badge/commands/davepoon/buildwithclaude/add-property-based-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00005 $0.00716
Opus 5 $0.00003 $0.00358
Sonnet 5 $0.00001 $0.00143
Haiku 4.5 $0.00001 $0.00072

Measured today against content hash 7ac91c21606c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

add-property-based-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/all-commands/commands/add-property-based-testing.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add Property-Based Testing

Implement property-based testing framework

Instructions

  1. Property-Based Testing Analysis

    • Analyze current codebase to identify functions suitable for property-based testing
    • Identify mathematical properties, invariants, and business rules to test
    • Assess existing testing infrastructure and integration requirements
    • Determine scope of property-based testing implementation
    • Plan integration with existing unit and integration tests
  2. Framework Selection and Installation

    • Choose appropriate property-based testing framework:
      • JavaScript/TypeScript: fast-check, JSVerify
      • Python: Hypothesis, QuickCheck
      • Java: jqwik, QuickTheories
      • C#: FsCheck, CsCheck
      • Rust: proptest, quickcheck
      • Go: gopter, quick
    • Install framework and configure with existing test runner
    • Set up framework integration with build system
  3. Property Definition and Implementation

    • Define mathematical properties and invariants for core functions
    • Implement property tests for data transformation functions
    • Create property tests for API contract validation
    • Set up property tests for business logic validation
    • Define properties for data structure consistency
  4. Test Data Generation

    • Configure generators for primitive data types
    • Create custom generators for domain-specific objects
    • Set up composite generators for complex data structures
    • Configure generator constraints and boundaries
    • Implement shrinking strategies for minimal failing examples
  5. Property Test Categories

    • Roundtrip Properties: Serialize/deserialize, encode/decode operations
    • Invariant Properties: Data structure consistency, business rule validation
    • Metamorphic Properties: Equivalent operations, transformation consistency
    • Model-Based Properties: State machine testing, system behavior validation
    • Oracle Properties: Comparison with reference implementations

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 85 lines · 5 tokens per session scan A 7ac91c21606c

Subscribe to this mod's changes

add-property-based-testing is a command published in the GitHub repository davepoon/buildwithclaude (3,415 stars, last pushed yesterday), licensed MIT. It adds 5 tokens to every session and 716 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.