/test-skills:test-planfrom Test Skills
Plan and write the smallest test set that adequately verifies a new feature, bug fix or module - derive behaviors from the spec, model input partitions and boundaries, choose property vs parametrized table vs single example, size a test budget, then run TDD as Red-Green-Refactor-Prune so scaffolding tests never pile up - at the rigor level the change requires (R1 Minimal to R5 High-Assurance). Use this skill whenever the user asks to write tests for new code, do TDD, "add tests for this feature", implement something from a spec with tests, decide how many or which tests a change needs, or wants test-first development that does not bloat the suite - including when an agent is about to add tests as part of any feature work in a repo with a TEST-CONSTITUTION.md. For shrinking an existing suite use test-reduce; for suite-wide measurement use test-audit.
Ships in Test Skills. 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.
Read when SKILL.md points to them.
Incremental TDD adds one test per thought and deletes none. After a hundred changes the suite is a transcript of every thought anyone had. The cure is to plan the test set from the behavior space before writing any test. Then TDD writes tests toward the plan, and a final Prune step removes whatever the plan did not need.
The target is not "as many tests as possible" or "100% coverage". It is every named behavior verified by exactly enough evidence:
Read TEST-CONSTITUTION.md and test-policy.toml if present. Resolve the change's
effective rigor: the highest of the project default, the tier of every path you will
touch, and anything the user or task declared. See the rigor spec summary in
references/rigor.md. If the change carries money, auth, data loss or irreversibility
risk the policy did not foresee, raise the level. Never lower it. State the level in your
first message.
| Level | Planning depth |
|---|---|
| R1 Minimal | No kept tests. A demo or smoke script, with limitations stated. Tests written while exploring are thrown away. |
| R2 Lightweight | Targeted tests for the affected behavior. Steps 1, 4 and 5 only. |
| R3 Standard | The full workflow below. |
| R4 Strict | R3, plus a risk analysis (failure modes, abnormal and recovery paths, trust boundaries), properties for every invariant, and every surviving mutant in new code triaged. |
| R5 High-Assurance | R4, plus an assurance plan fixed before code (standards, critical properties, hazards, assumptions, acceptance obligations), requirement ids traced on every test, formal verification of the selected properties via coverage-proof / proof-skills, and a human approval the agent cannot give. |
references/partitioning.md). For each unit with non-trivial input
logic:
testing/partitions/<unit>.json and state its hypothesis: "uniformity
within each class" plus the interaction strength t, which defaults to 2 and is 3 for
critical interactions. Then run:python3 ${CLAUDE_SKILL_DIR}/../test-audit/scripts/tmx.py covering testing/partitions/<unit>.json --strength 2 --generate
The generated covering array is the row budget. Under the model's stated hypothesis,
rows beyond it add nothing. Decision tables and state-transition models are partition
models too; see the reference.references/properties.md):
ids that name the class.testing/protected.txt, as its own reviewed change.max_new_tests_per_pr. If the plan exceeds it, first
look for rows that share a class, examples a property already covers, and integration
tests that repeat unit coverage. Only then justify the rest with a
Test-Budget: <reason> trailer.references/plan-template.md) into the PR description or
testing/plans/<change>.md before writing code.tmx covering generated to reach the model's strength t stay, even when today's mutants
don't separate them. A mutant set only samples the faults, while the covering array is the
adequacy claim you made in step 3. To drop to a lower t, change the plan and say why
in the report.T=${CLAUDE_SKILL_DIR}/../test-audit/scripts/tmx.py
python -m ... $T collect-pytest --src <changed module> --tests tests -o .tmx/change.json --per-line 2
$T score .tmx/change.json --survivors
Every new test should kill at least one mutant no older test kills (Article V). For
data-only additions, such as a new tax region or rate row, the new literal is itself
the mutant: numeric strings like Decimal("0.0825") are mutated. Add the row to the
existing table rather than writing a new test function. If one
does not, drop it or merge it. Survivors in new code are either real gaps (add the
row or assertion that kills them) or equivalent (at R4+, record them in
testing/survivors.json with a reason).tmx gate --base <base> locally if the project has a policy.tests +N / −M);references/partitioning.md: category-partition, boundary values, invalid classes,
decision tables, state-transition coverage, t-way interaction, and the model JSON format.references/properties.md: property patterns with pytest/Hypothesis and fast-check
examples, stateful testing, and how to keep generators honest.references/plan-template.md: the plan and report template.references/rigor.md: what each rigor level adds to planning, and the R4 risk-analysis
and R5 assurance-plan templates.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/coverage-proofTurn "are these tests enough?" and "can these tests go?" into stated, machine-checked claims - mutation kill-set certificates, partition and t-way covering-array completeness under an explicit uniformity hypothesis, property subsumption (one property replacing a table of examples), bounded-exhaustive checks under the small-scope hypothesis, differential tests against a reference model, confidence bounds for random testing, and TLA+/Lean proofs via proof-skills - then retire the example tests each claim subsumes, keeping one conformance test. Use this skill whenever the user asks to prove test adequacy, justify deleting tests mathematically, know how many tests a function really needs, replace many example tests with a property or model, get "provable coverage", or produce R4/R5 (Strict / High-Assurance) verification evidence - even if they just ask "is this enough?". It works on a named unit or cluster of tests; for auditing a whole suite use test-audit, and to cut or demote tests use test-reduce./test-auditUse this skill to diagnose the health of a whole existing test suite and its CI, and to report how lean it could be without losing fault detection. It builds a per-test mutation kill matrix, certifies a minimal subset, and flags duplicate, subsumed and zero-signal tests, clone clusters, test smells, flakiness and CI tiering problems. Use it when the concern is the suite as a whole: it's bloated, slow, brittle, untrusted or agent-grown; the user wants to know how many tests they really need; they doubt their coverage or mutation score; or they want it checked against a test constitution. Vague complaints like "CI takes forever" count. Do not use it for narrow questions about specific named tests, such as whether one test is flaky or whether a given property test subsumes certain example tests. Also skip it for writing new tests, explaining concepts, or carrying out deletions and consolidation, which belong to test-reduce. This skill only measures and recommends./test-ciDesign or fix a CI test pipeline that stays fast and trustworthy as the suite and the agent-driven change rate grow - PR vs nightly tiers under a time budget, affected-test selection, sharding, flake quarantine with an expiry, no retry-until-green, the test-constitution gate with a budget ratchet, diff-scoped mutation testing on PRs and full mutation nightly, probation runs, and rigor-level approvals. Use this skill whenever the user asks to speed up CI, restructure test jobs, add or fix a test gate, handle flaky tests, add mutation testing to CI, enforce test budgets or a test policy in GitHub Actions/GitLab/other CI, or says CI is slow, red for no reason, or can't keep up with agent PRs./test-constitutionSet up (or amend) a project's test constitution - governance rules agreed up front that keep an agent-driven test suite adequate but lean - test budgets, risk-tiered adequacy by mutation score instead of 100% coverage, marginal-value admission of new tests, the Red-Green-Refactor-Prune TDD cycle, flake quarantine, certified deletion - as TEST-CONSTITUTION.md plus a machine-enforced test-policy.toml, an agent-instructions block in CLAUDE.md/AGENTS.md, and a CI gate. Use this skill whenever the user wants testing rules, standards, a testing policy, guardrails, or governance for humans or agents; says agents write too many or low-value tests and wants that to stop going forward; wants a coverage policy or test budget; or is starting a new project and wants to set testing up right. For measuring an existing suite use test-audit; for planning tests for one feature use test-plan./test-reduceRadically shrink an existing test suite without losing fault detection - consolidate copy-paste tests into parametrized tables and properties, demote certified-redundant tests to a nightly probation tier, delete them after probation, and prove at every step (mutation kill-set certificate, before/after matrix compare) that nothing the suite used to catch is lost. Use this skill whenever the user wants to cut, prune, slim, deduplicate, consolidate or clean up tests, get a bloated suite (hundreds or thousands of agent-written tests) back under budget, bring a project into compliance with its test constitution, or act on a test-audit report - including "delete the useless tests", "we have 3000 tests and CI takes 40 minutes", or "make the suite maintainable again". Starts with test-audit if no current audit exists.test-skills@opum is listed by opum-ai/opum-marketplace — review the source before installing
npx claudepluginhub opum-ai/opum-marketplace --plugin test-skills