/odin-testing:property-test-authoringfrom ODIN Testing
Guides authoring, assessing, reviewing, and triaging property-based tests. Supports Hypothesis, fast-check, proptest, jqwik, rapid, Echidna, Medusa.
Ships in ODIN Testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Field | Bound contract |
|---|---|
| Trigger | The user asks to add or improve generated property tests for an inverse, invariant, oracle, idempotence rule, parser, normalizer, algorithm, data structure, or smart-contract state machine; to decide whether property-based testing fits a code path; to review existing property tests; or to classify a failing counterexample. |
| Authority | Reversible local: mode author writes only property tests to local files tracked by version control, plus user-approved production-code seams; modes assess, review, and triage write nothing; rollback is git revert or git checkout of the touched file. No remote mutation. |
| Side effect | Mode author writes property tests in the existing framework and adds a testing dependency or production-code seam only with user approval. Modes assess, review, and triage return chat output only. |
| Done | Mode author: the strongest grounded property is encoded with domain-aware generators and pinned edge cases, and the targeted run passes while a plausible contract violation fails it. Mode assess: a verdict names property, domain, strategy seam, and library, or declines to example tests. Mode review: every test is classified against the defect taxonomy with evidence, severity, and the strongest replacement property. Mode triage: the counterexample is classified with cited evidence and a minimal repair. |
author (default), assess, review, or triage. Inferred from the request when not stated.Steps 1 and 2 are shared by every mode. Then run the named mode.
Examine the target code for an algebraic plan. Check whether the plan is missing or merely buried. A calculation wrapped in I/O, a string built by concatenation, an in-place mutation, or a value read from a global or the environment may hold a property with no seam to assert it through. Done when: the code's algebraic plan is named (inverse, invariant, idempotence, oracle, roundtrip, commutativity, associativity, identity, or determinism), or the plan is absent and recorded as such.
Consult the property catalog and strength ordering. The catalog lives here once; every mode uses it.
| Property | Formula |
|---|---|
| Roundtrip | decode(encode(x)) == x |
| Inverse | f(g(x)) == x |
| Oracle | new(x) == reference(x) |
| Idempotence | f(f(x)) == f(x) |
| Invariant | Holds before and after |
| Easy to verify | is_sorted(sort(x)) |
| Commutativity | f(a, b) == f(b, a) |
| Associativity | f(f(a,b), c) == f(a, f(b,c)) |
| Identity | f(x, e) == x |
Strength ordering, weakest to strongest: no crash then type preservation then invariant then idempotence then roundtrip / oracle. Done when: the strongest property the code supports is named, or "no crash" is recorded as the ceiling.
Mode author (default):
assume(). assume() discards inputs after generation, so a filter that rejects most candidates wastes the budget and trips the exhausted-filter guard. Build compound inputs with the framework's composition primitives (e.g. st.builds, st.composite, .flatmap) rather than generating independently and filtering. Reserve assume() for conditions no strategy can express, a relationship between two already-generated values. Done when: the generator produces valid inputs directly from the strategy, and assume() appears only for inter-value relationships.@example) so these run on every execution and document that the boundary was considered. Done when: the example-pin mechanism lists each domain boundary, and every pinned case is one the domain actually exposes.max_examples=10; CI max_examples=200; nightly max_examples=1000, deadline=None. Always set deadline=None for anything doing real work; the default deadline turns a slow machine into a failing test, and that flake gets the suite deleted. Done when: max_examples matches the execution context and deadline=None is set for any test doing real work.f(x) == f(x) is a tautology for a pure function and a real test for serializers over dicts or sets, hashing, iteration order, or time-dependent code. Assert it where a broken implementation could falsify it. Done when: a determinism assertion is present for every target whose purity is not obvious, and absent where it could not fail on a real bug.assert add(a, b) == a + b); pick a property that constrains the function without recomputing it. A vacuous assume() filters out nearly every input or is self-contradictory; push constraints into the strategy. Done when: the assertion does not recompute the function's own logic, and no assume() filter discards the majority of generated inputs.Mode assess:
hypothesis, fast-check, proptest, quickcheck, pgregory.net/rapid, net.jqwik, ScalaCheck, FsCheck, StreamData, test.check, PropCheck, Kotest, RapidCheck, SwiftCheck, echidna_, invariant_. A hit names the recommendation and forbids proposing a second library. Done when: the path is bounded, its direct tests are read, and an existing library is detected or confirmed absent.f(x) == f(x) is a genuine determinism property only when purity is not obvious. Reject an assume() filter that discards nearly every generated input or is self-contradictory; the strategy must produce the valid domain, and the verdict must name that strategy as the domain. For Solidity: type bounds are compiler guarantees, not properties (uint256 is never negative; address(this).balance >= 0 is always true), and a property over state no call sequence can reach is vacuous until coverage output shows otherwise. Done when: the candidate passes the vacuity check or is rejected with the specific reason.bool function that must never become false) or assertion mode (an assert inside a fuzzer-callable function), chosen by where the property lives. Done when: the library is named, existing or language default.Mode review:
Locate property tests. If the user names specific files, read them. Otherwise search for framework markers:
rg "@given\(|from hypothesis import" --type pyrg "fc\.(assert|property)" --type ts --type jsrg "proptest!|#\[quickcheck\]" --type rustrg "@Property|@ForAll" --type javarg "function test|echidna_" -g '*.sol'
Done when: every property test file in scope is read, or the search returned no matches and the no-tests-found stop is reported.Classify each test against the defect taxonomy:
| Defect | Severity | Detection rule |
|---|---|---|
| Tautological | CRITICAL | Assertion is true regardless of the implementation. assert result == result or assert f(x) == f(x) where f is obviously pure. Exception: f(x) == f(x) is a genuine determinism property when f is not obviously pure, serializers over dicts or sets, hashing, anything reading the clock. Ask whether a broken implementation could falsify it. |
| Vacuous | CRITICAL | assume() filters out nearly every input, or self-contradictory assume() passes having run zero cases. assume(x == 42) is the subtler version: it runs, it passes, and it is an example test wearing a @given decorator. |
| No assertion | HIGH | Body calls the function and stops. No assert, expect, or property check. |
| Reimplementation | HIGH | Assertion recomputes the function's own logic. assert add(a, b) == a + b restates the implementation; no bug they share can fail it. |
| Weaker property available | MEDIUM | Length checked, ordering not. The code supports a stronger property the suite does not assert. |
| Over-filtered | MEDIUM | Stacked assume() where a strategy constraint belongs. Push constraints into the generator so it produces valid inputs directly. |
| Settings | LOW | max_examples=5, or no deadline on an expensive strategy. |
Done when: every test has exactly one defect class assigned with the specific assertion or configuration that triggered it, or is recorded as clean.
Compare against the step-2 catalog: for each tested function, name the strongest property the code supports but the suite does not assert. Done when: the gap between the asserted property and the strongest supported property is stated per function.
Flag fragile patterns regardless of defect class: floating-point equality without a tolerance, assertions on dict/set iteration order, anything reading the clock. These produce flakes that get blamed on the PBT framework and then deleted. Done when: every fragile pattern is listed with its file, line, and the flake mechanism it creates.
Assemble the report. For each finding include the test location, defect class, severity, evidence, and strongest available replacement property; add a summary counting tests reviewed and findings by severity. Done when: the report lists one finding per defective test plus the summary.
Mode triage:
failure-input-missing. Identify the framework and shrinker from the test file or build configuration; if the test file cannot be read, return test-file-unreadable. Done when: the counterexample is concrete and the framework is identified, or the named stop is returned.property-unreadable. Read the implementation and build a minimal reproduction by substituting the counterexample into the code path the property exercises; if the implementation cannot be read, return implementation-unreadable. Done when: the property is extracted and the reproduction is built, or the named stop is returned.f(x) == f(x) could be either tautological or a genuine determinism property, report the ambiguity and ask whether a broken implementation could falsify it. Do not decide on the author's behalf.failure-input-missing, test-file-unreadable, property-unreadable, implementation-unreadable, ambiguous-classification; report the named stop and stop. If classification succeeds but the minimal repair cannot be stated without speculation, return minimal-repair-unknown with the classification and evidence.is_defect boolean, in that order.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
property-based-testing, pbt, generative-testing, test-strategy
npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-testing25 skills in this plugin
/behavior-validatorUse when asked to validate a web app, CLI, API, or generated artifact against a source-blind behavior contract. Not for source or remote-system changes./browser-qaUse when the user runs /browser-qa for report-only QA results without entering a fix loop. Not for remote, credential, publish, deploy, or irreversible changes./control-cliUse when asked to reproduce, profile, or verify CLI/TUI behavior. Produces a deterministic transcript or profile proof with session cleanup. Not for CLI design advice, use cli-for-agents.Other plugins' skills for the same job