/gabbe:pbt-strategyfrom GABBE
Creates a property-based test plan using Hypothesis: identifies invariants, writes generators, and models stateful systems with state machines. Use when example tests miss edge cases or for round-trip/invariant properties.
Ships in GABBE. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Stop hand-picking a few example inputs and instead state the properties that must hold for all inputs, then let Hypothesis generate hundreds of diverse cases to attack them. A property-based test asserts an invariant ("the output is always sorted", "decode(encode(x)) == x") rather than a single example. When it finds a failure, Hypothesis shrinks the counterexample to the smallest input that still breaks the property, handing you a minimal reproduction. The output of this skill is a property test plan: the invariants you will check, the strategies that generate inputs for them, and — for stateful systems — the state machine that drives them. Be clear from the start: PBT samples the input space to raise confidence; it does not enumerate it and does not prove correctness.
decode(encode(x)) == x, parse(serialize(x)) == x.f(f(x)) == f(x) (normalize, dedupe, clamp).metamorphic-testing.skill.@given strategies. Generate inputs with Hypothesis strategies
(integers(), text(), lists(), dictionaries(), builds(), composite). Constrain to
the valid domain with .filter() sparingly and .map()/assume() so generation stays
efficient — over-filtering makes Hypothesis give up. Compose custom strategies with
@composite for domain objects. Keep each test focused on one invariant.hypothesis-jsonschema's from_schema() to generate inputs that conform to a JSON Schema,
then assert your handler never crashes and always returns schema-valid output. This catches
the edge cases hand-written fixtures miss (empty arrays, unicode, boundary numbers, missing
optional fields).RuleBasedStateMachine. When behavior depends on a sequence
of operations (a cache, a queue, a connection pool, a small DB), subclass
RuleBasedStateMachine and let Hypothesis generate sequences of actions:
@initialize seeds starting state once per run.@rule defines an action; Hypothesis picks rules and arguments to build random valid
sequences.Bundle holds values produced by one rule (e.g. a created handle) to feed as input to
later rules, so generated sequences are realistic.@precondition gates a rule so it only fires in valid states.@invariant is checked after every step — the core safety property that must always hold.
Run it as a normal test; Hypothesis searches for an action sequence that breaks an invariant.@example(...) so it
becomes a permanent regression case. Keep Hypothesis's example database in CI so previously
failing inputs are replayed first.max_examples and deadline for the time budget; more examples
= more confidence, never certainty. In CI, raise max_examples for critical properties and
use derandomize/a fixed seed only when you need reproducible runs (knowing it narrows the
search).The steps above use Hypothesis syntax; other ecosystems have equivalent libraries (checked 2026-11-21 on each project's page). Same plan, same limits.
| Language | Library | Install |
|---|---|---|
| Python | Hypothesis | pip install hypothesis |
| JavaScript/TypeScript | fast-check | npm install fast-check --save-dev |
| Java/Kotlin | jqwik (@Property, @ForAll) | dependency from jqwik.net user guide |
| Rust | proptest | proptest under [dev-dependencies] in Cargo.toml |
| Go | rapid | go get pgregory.net/rapid |
| C#/F#/VB | FsCheck | NuGet package FsCheck (plus FsCheck.Xunit or FsCheck.Nunit) |
Choosing how strongly to verify a component: assurance-ladder.skill.md. Mutation score for these tests: mutation-testing.skill.md.
target()/coverage if unsure)..filter()/assume()) cause Hypothesis to abandon
generation; build valid data directly with @composite instead.Produce a property test plan containing:
from_schema reference) that generates its
inputs, and the assertion.RuleBasedStateMachine design — rules, bundles, preconditions,
initialize, and the @invariant(s).max_examples, deadline) and any pinned @example regression cases.metamorphic-testing.skill for oracle-free relations.max_examples.deadline and size limits on schema-generated payloads; a hang or out-of-memory is a finding for input validation, not a reason to silence the test.assurance-ladder.skill.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub andreibesleaga/gabbe --plugin gabbe49 skills in this plugin
/adr-writerGenerate Architecture Decision Records for significant technical decisions. Use when: architecture decision, ADR, why did we choose, why are we using, architectural choice./api-designAPI contract (OpenAPI, GraphQL SDL or proto) written before code, with resources, errors, pagination and authentication. Use when a new endpoint or API is needed or the contract of an existing one must change./arch-designArchitecture design from approved requirements — quality scenarios, style choice, decomposition, 4+1 or arc42 views, ADRs and risks. Use when a new system or major subsystem needs an architecture before implementation planning.Other plugins' skills for the same job