/predicate:robust-testingfrom predicate
Guides construction of property-based tests, metamorphic relations, and fuzzing harnesses to verify invariants beyond example-based tests.
Ships in predicate. 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.
Guidelines for designing deterministic verification boundaries ($V(\mathbf{S})$). This skill instructs the agent on how to move beyond simple input-output example tests to construct property-based, metamorphic, and fuzz-testing harnesses that prevent regression and self-deception in generated code.
Traditional unit testing asserts that specific hardcoded inputs produce specific outputs. For AI-generated code, this example-based approach creates a self-deception loop: the agent generates both the implementation and the tests, propagating the same logical blind spots to both files.
To establish a mathematically sound validation boundary, you must verify the code against properties and invariants rather than static examples. A program is verified when its state transition satisfies high-level algebraic equations across a randomized input space.
Because there is no deterministic validator to "test the test," the test suite must be converged and refined with the same rigor as the implementation:
When executing the closed-loop optimization cycle, select verification methods based on the task domain:
Property-Based Testing validates that high-level code invariants hold true across a wide, randomized range of inputs. If a failure occurs, the framework automatically simplifies (shrinks) the input to locate the minimal reproducing case.
hypothesis or Rust's proftest) and assert the invariant rules.Metamorphic Testing addresses the oracle problem (cases where the correct output is unknown or computationally expensive to calculate). It checks whether the relationship between multiple inputs and their outputs matches a defined Metamorphic Relation (MR).
| Class | Input Transformation ($x \to x'$) | Metamorphic Relation ($f(x) \sim f(x')$) | Core Application |
|---|---|---|---|
| Permutation | Shuffle elements or arguments | $f(x) == f(x')$ | Sorting algorithms, search queries, database joins |
| Scaling | Multiply numeric inputs by factor $c$ | $f(c \cdot x) == c \cdot f(x)$ | Numerical algorithms, graphic coordinate math |
| Monotonicity | Add search filters / constraints | $ | f(x) |
| Invariance | Paraphrase documentation or string formatting | $f(x) == f(x')$ | Prompt parsers, natural language models |
If a generated code piece is correct, it will maintain these semantic consistencies across input transformations. If it contains a logical defect, it will fail metamorphic consistency.
Fuzzing bombards a program with randomized, structured, or mutated inputs to locate edge-case crashes, memory safety bugs, or infinite loops.
Verifying units in isolation is insufficient; complex systems exhibit emergent errors at module boundaries.
Verify the interfaces and state transitions between decoupled modules:
Simulate the complete execution trajectory under realistic scenarios:
Structure your test suites in a hierarchy of increasing integration complexity:
[ Tier 1: Compiler & Linter Gates ]
│
▼
[ Tier 2: Example-Based Happy Path Unit Tests ]
│ (Verifies basic execution)
▼
[ Tier 3: Property-Based Verification (Invariants) ]
│ (Runs randomized inputs to find edge-case logical bugs)
▼
[ Tier 4: Integration and End-to-End (E2E) Testing ]
│ (Verifies module interfaces and global system liveness)
▼
[ Tier 5: Differential / Metamorphic Assertions ]
│ (Verifies semantic consistency across implementations)
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nrdxp/predicate --plugin predicate35 skills in this plugin
/ai-auditSOP for auditing AI-generated code.
Trigger when:
- Reviewing, refactoring, or cleaning up AI-generated code to prevent regressions or hallucinated APIs.
- Prompt contains: /ai-audit, code audit, AI cleanup, common flaws.
/api-auditProtocol for auditing API surface coherence and type safety.
Trigger when:
- Evaluating API designs, interface type safety, or design elegance.
- Prompt contains: /api-audit, API surface, API coherence, type safety.
/boundaryNormative sufficiency conditions for Initial Boundary Conditions (IBCs)
and the SOP for the cheap-tier boundary refinement loop (/boundary).
Trigger when:
- Crafting, auditing, or refining a prompt/IBC destined for an expensive
(architect-class) model or an autonomous worker dispatch.
- Evaluating whether a task frame is sufficient to bound an agent walk.
- Prompt contains: /boundary, IBC, initial boundary condition, boundary
contract, sufficiency conditions, worker prompt, prompt refinement.
Other plugins' skills for the same job