Design regression and boundary tests from the affected public contract, then check that a relevant faulty implementation would fail; avoid test-count targets.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Test Design?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/najuaircrack-test-design)
---
name: test-design
description: "Design regression and boundary tests from the affected public contract, then check that a relevant faulty implementation would fail; avoid test-count targets."
license: MIT
---
# Contract-derived tests
Start from the affected public contract and actual consumer, not the produced implementation. Use `quality plan` when a structured contract already exists. Keep unknown requirements explicit rather than inventing validation policy.
Choose cases that distinguish the required result: a normal value; accepted boundary; invalid neighbor; missing versus explicit null; empty versus unknown; state transition or retry when relevant. For an inclusive boundary, assert that the exact endpoint succeeds through the public entry point and produces the documented output. Pair it with an invalid neighbor that rejects. For asynchronous code, control the interleaving so a stale response, revoked authority or delayed writer actually crosses the awaited boundary.
For each documented behavior family, identify an actual assertion and the plausible wrong result it distinguishes. A check named "immutable" with one row cannot expose reordering; a normal integer cannot expose coercion; a single maximum cannot expose adjacent-value precision loss. Where the contract includes these properties, use distinct ordered records, accepted lower/upper boundaries and nearby exact values, incompatible but coercible types, and an unfamiliar allowed identifier or unit. Preserve the contract's domain: do not add validation for undocumented inputs to improve a score.
Assert observable output, state and side effects. Check input mutation or detached output when the contract requires it. Do not assert private helper names, formatting, test counts or an expression copied from the implementation.
Exercise composition through the real consumer as well as the changed producer. If an earlier success changes which later operations are valid, choose two operations that would each succeed on the starting state. Submit them together and assert the later outcome and retained effect of the first. Exercise conflicts with pre-existing state separately when the contract distinguishes the two. Add a subsequent allowed success when the contract permits recovery. Verify the required outputs, order and side effects; compare the caller's input and check detachment where promised.
Show that the original defect fails and the repair passes. For consequential coverage, use a small targeted fault control in owned scratch or an isolated fixture; correct behavior must also pass. Never mutate someone else's working tree. Retain failures and classify unsupported environments separately from a successful test. More assertions alone are not evidence of better coverage.
Before delivery, compare the documented families with the tests actually added. Fill a missing witness for a required behavior instead of substituting an extra implementation guard or another smoke run. This is a review of the affected contract, not a requirement for a new ledger or exhaustive testing of unrelated modules.