/test-skills:test-cifrom Test Skills
Design 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.
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.
When agents raise the change rate, CI becomes the bottleneck. The usual responses (bigger
runners, retries, @skip("flaky")) make CI slower, less trusted, or both. The DORA
research is blunt: feedback within about 10 minutes, no tolerance for flaky tests, and "ten
tests that are reliable, fast, and trustworthy" over hundreds nobody trusts.
This skill builds a pipeline in which:
T=${CLAUDE_SKILL_DIR}/../test-audit/scripts/tmx.py. Templates are in assets/.
| Tier | Trigger | Budget | Runs | Blocks merge? |
|---|---|---|---|---|
| PR | every PR push | ≤ max_suite_seconds; the whole job ≤ 10 min | fast hermetic tests, excluding probation and slow; affected-only on large repos; tmx gate --base; mutation on the diff for R4+ paths | yes |
| Merge / main | push to main | ≤ 20 min | the full non-probation suite (a safety net for selection); refresh the baseline | yes (revert on red) |
| Nightly | schedule | ≤ 60 min, sharded | everything, including probation, plus probation record; full kill matrix (sampled); tmx gate --matrix | no; opens an issue |
| Release (R5 paths) | tag | as needed | full mutation, the evidence bundle, approvals | yes |
../test-audit/references/ci-review.md, and
record the numbers: PR-tier wall time, test step time, retries, skips, quarantine,
selection, sharding, caching. If an audit exists, use its CI findings.test-policy.toml. If there is no policy, recommend test-constitution first.
You can still restructure tiers without it.@pytest.mark.slow, tags, or a
directory) and move them to nightly.pytest -n auto, a job matrix with --shard, TEST_TOTAL_SHARDS). Cache
dependencies.references/flakes.md).
.test-quarantine.json lists the test, since-date, owner and issue.quarantine_days, which is 7 at R4 and 14 at R3. At R5 any quarantined test blocks.assets/github-actions.yml, assets/gitlab-ci.yml).
python3 tmx.py gate --policy test-policy.toml --junit report.xml --base origin/$BASE.test-policy.toml and .test-baseline.json from the base ref by
default whenever --base is given. A PR that edits them is still judged by the old
rules. --policy-source head exists only for first adoption.tmx into the repo (tools/tmx/) or pin the plugin path. CI must not depend
on the plugin being installed.TMX_PR_BODY so the Test-Budget: and Rigor: trailers are
seen.TMX_PR_APPROVERS, for example
gh pr view --json reviews -q '[.reviews[] | select(.state=="APPROVED") | .author.login] | join(",")'.
Never pass them from anything the PR author controls.collect-pytest --src <changed modules> --per-line 1, or
Stryker --incremental / --since, or cargo-mutants --in-diff. Then
gate --matrix.baseline --matrix so the next
day's marginal-value checks have ids.
Keep PR mutation inside the tier budget. If it cannot fit, run it only for R4+ paths.pytest with no marker filter and JUnit output,
then $T probation record --junit nightly.xml. If any probation test failed, it opens an
issue: that is a regression the retained suite missed. A weekly job runs
probation prune --days … --min-runs … on a branch and opens the deletion PR, which is
never auto-merged.| Level | CI obligations |
|---|---|
| R1 | none required; if a gate runs, it runs in advisory mode |
| R2 | a PR tier with the gate; smells and budget |
| R3 | PR + nightly; the full default gate; nightly mutation and probation |
| R4 | + mutation on the diff in the PR tier; waivers need platform approval; quarantine ≤ 7 days |
| R5 | + release tier with full mutation and an archived evidence bundle; TMX_PR_APPROVERS from the review record is required; zero quarantine |
assets/github-actions.yml: a PR, main and nightly workflow with the gate, probation and
mutation.assets/gitlab-ci.yml: the same, for GitLab.references/flakes.md: the quarantine file format, the lifecycle, the owner rule, and
root causes (async wait 45%, concurrency 20%, order dependence 12%).references/selection.md: affected-test selection by ecosystem, with the safety nets
that keep it honest.What SKILL.md sets; muted values are Claude Code's defaults
test-skills@opum is listed by opum-ai/opum-marketplace — review the source before installing
npx claudepluginhub opum-ai/opum-marketplace --plugin test-skills6 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-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-planPlan 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./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.Other plugins' skills for the same job