/dmi-superpowers:property-based-testingfrom dmi-superpowers
Use when a parser, serializer, normalizer, comparator, reversible transformation, numeric operation, or state transition should be tested over an input domain rather than only hand-picked examples
Ships in dmi-superpowers. 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.
Use property based testing when a behavior has a rule that can be checked for many generated inputs. Good shapes include:
| Shape | Example property |
|---|---|
| Round trip | decode(encode(x)) == x |
| Normalization | normalize(normalize(x)) == normalize(x) |
| Invariant | state constraints hold before and after a transition |
| Oracle | implementation agrees with a simpler trusted reference |
| Ordered result | is_sorted(sort(xs)) and elements are preserved |
If the behavior has no independent property or oracle, use focused examples and say why property based testing is a poor fit. “Does not crash” alone rarely justifies a generator.
The assertion must constrain the implementation without reimplementing it. Reject these false tests:
State what the property means independently, then choose the strongest check the domain supports. A round trip may be invalid for a lossy normalizer; specify the canonical result instead.
Build generators from valid structure rather than filtering arbitrary values. Include boundary and adversarial partitions relevant to the contract: empty values, one element, duplicates, maximum sizes, Unicode, delimiters, malformed input, null-like values, negative or large numbers, and combinations of fields. Before implementation, write a partition table (at minimum: empty, normal, representation-specific, and malformed inputs) and state which partitions the generator reaches; a proposed property that omits a contract partition is incomplete even if a focused example covers one defect. Add a small number of explicit examples for known boundary cases.
Keep generation deterministic in CI while retaining enough variety to explore the domain. Set a bounded example count and deadline appropriate to the suite. Do not replace domain generation with a fixed corpus or a single seed merely to make a failing test disappear.
Use the library's shrinking or minimization support. A failing case must be replayable from the reported seed/case and reduced to the smallest useful input. Record the property, minimized input, and whether the defect is in the code, the generator, or the property. Do not accept a larger random sample as a substitute for a reproducible counterexample.
If the project already has a property testing library, use its established runner and conventions. Adding one is a dependency decision: propose the library and the concrete property first, then wait for the required approval. The dependency decision may block execution, but it does not turn the property into an example-only test: record the generator, shrinking/replay plan, and pending command so the property can be implemented after approval.
The property is the tracer bullet for this behavior. A single example may supplement it, but “highest-value example first” is not completion when the identified contract is a domain-wide property.
When tests have not run, report the exact command and mark it pending. Do not claim generated cases, shrinking, coverage, or a passing suite from a proposed test.
assume filtering.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hundredbillion/dmi_superpowers --plugin dmi-superpowers30 skills in this plugin
/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./creating-a-pull-requestUse when opening, creating, or writing a pull request, pushing a branch for review, or running gh pr create - covers the PR title, body, and evidence so the description reads for both a non-developer and a developer.