/testing:setup [check|apply]from testing
Checks or applies a repository's testing configuration (testing.yaml): can't-fail rules, test-lint audit, and hook skips. Re-runnable with check (read-only) or apply (writes then re-checks).
Ships in 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; scripts run unread.
/testing:audit and the opt-in test-weaken hook find tests by the shipped adapters' filename globs
and judge them by the shipped rule levels. This skill shows what a repository changed about that
through the testing config, and writes it. check changes nothing; apply runs check,
asks, writes, and runs check again. No argument means check.
It never edits CLAUDE.md or AGENTS.md. The instruction line is printed for you to paste.
The testing config resolves across the config-cascade layers, in order: the team layer and
<root>/<home>/testing.local.yaml, where <root> is the scanned file's git toplevel, else
${CLAUDE_PROJECT_DIR}, and <home> is the convention home (docs/conventions by default). The
team layer is <root>/<home>/testing.yaml. Without it, the team layer is the yaml config block
in <root>/<home>/testing.md, a legacy layer: when both exist, testing.yaml wins and the
resolver prints a warning naming both. Lists concatenate across layers; a later layer's
scalar overrides. The format is the adapters' YAML subset in every file; a glob that starts with
* must be single-quoted. <home>/testing.yaml also holds /testing:run-e2e's e2e_driver,
reuse_running_instance, browser_driver, map_unit, map_entry_points, map_report_order,
file_findings and file_findings_floor, and /testing:write's tdd_refactor_step and
first_test, which the scan ignores.
Config locations across all plugins: config locations.
The keys:
adapters:
disable: [py-unittest] # wins over enable; a non-empty enable list is an allowlist
paths:
exclude: ['legacy/**'] # relative to the repo root; ** crosses /, * does not
include: ['build/**/*.test.ts'] # reaches pruned folders; an adapter must still claim the file
adapter_dirs: [tools/test-adapters] # consumer adapters, same schema as the shipped ones
extend:
js-vitest:
files: ['*.it.ts'] # appended to that adapter's list field
rules:
rule-weak-oracle: off # off drops, warn reports without gating, error gates --check
test-weaken-block: error # test-weaken hook: deny an added skip or a removed test
The opt-in test-weaken hook runs before a Write or Edit to a test file and names what it removes:
test blocks, assertions, a changed expected value, or an added skip. By default it only tells the
agent. With test-weaken-block: error, an added skip or a removed test block is
denied until the edit carries a test-change: <reason> comment; removed assertions and changed
expected values are never denied. The agent can write that marker itself: it makes the reason
visible to reviewers, it does not prove the reason.
Removals (adapters.disable, paths.exclude, rules ... off) apply inside the scanner, so the
audit goes quiet with no plugin change; an excluded path or a disabled adapter silences
test-weaken too. Additions reach the audit at once; test-weaken covers only the shipped globs.
The judge that asks where each changed test's expected value came from runs on demand, as
/testing:audit --judge, and in /source-control:pull-request (if enabled) prep. It has no plugin option and
no hook.
check (read-only)Run the script and show its output as it prints:
bash "${CLAUDE_PLUGIN_ROOT}/skills/setup/scripts/setup.sh" check
It exits 0 with no finding, 1 when a test-lint rule is missing, 2 when a layer does not resolve (the file and line are on stderr). Its four sections:
PRESENT row from the recommended-config path as likely rather
than proven, and say so. A FINDING is a gap to report, not a neutral absence. The rules:
jest/valid-expect (eslint-plugin-jest), vitest/valid-expect (@vitest/eslint-plugin),
playwright/missing-playwright-await and playwright/no-focused-test (eslint-plugin-playwright).
Which config each sits in is its rule page's to state:
jest/valid-expect,
vitest/valid-expect,
playwright/missing-playwright-await,
playwright/no-focused-test.
As of 2026-11-10; recheck when a plugin release note moves one of these rules out of its
recommended config or renames it.xUnit2021 (xunit.analyzers, which the check counts as present through an xunit or
xunit.v3 reference) and NUnit2009 (NUnit.Analyzers, which the check requires as its own
reference). Packaging: xUnit2021 and
NUnit2009. As of 2026-11-10;
recheck when an xunit or NUnit release note changes how the analyzers are packaged.PLR0124, PT011 and F631. The check counts PLR0124 and F631 as on with no
select, PT011 as off, and a select as replacing the defaults with prefix matching
(setup.sh ruff_rule). Pointer: ruff settings § lint.select
and the rule pages for PLR0124,
PT011 and
F631. As of 2026-11-10; recheck when a ruff
release note changes the default rule set./corrections:codify "<the test pattern>" (if enabled) for the user to run;
check builds no mechanism. Hand /corrections:codify (if enabled)
the choice of mechanism; it picks the strongest rung of the enforcement ladder that can
decide the rule and proves the check. When the corrections plugin is not enabled, propose the
strongest mechanism that can decide the rule: a change that makes the mistake impossible first,
then a check that blocks it, then a test, and an instruction only when nothing a machine runs
can decide it. Say that the corrections plugin is not enabled, so the proposal is unproven.setup has no lint check for this language, not a
finding. For a can't-fail test pattern in that language, name the call
/corrections:codify "<the test pattern>" (if enabled) for the user to run; check builds no mechanism.
Hand /corrections:codify (if enabled) the choice of mechanism; it picks the strongest rung
of the enforcement ladder that can decide the rule and proves the check. When the
corrections plugin is not enabled, propose the strongest mechanism that can decide the rule:
a change that makes the mistake impossible first, then a check that blocks it, then a test,
and an instruction only when nothing a machine runs can decide it.
Say that the corrections plugin is not enabled, so the proposal is unproven.CLAUDE.md, else .claude/CLAUDE.md, else CLAUDE.local.md, else AGENTS.md, else CLAUDE.md in
${CLAUDE_CONFIG_DIR:-~/.claude} (the script's order). Which files load, and when AGENTS.md is
read: memory § When Claude Code reads AGENTS.md. Offer it as a pointer: it
names the testing:test-value skill and, when docs/conventions/testing.md exists, adds a line
pointing at that team file; do not paste it anywhere. A test rule a check could decide goes to
/corrections:codify "<the test pattern>" (if enabled) instead of the instruction line, named for the user
behind the same availability gate and fallback as the lint rows above.none: line saying test-quality findings come from /testing:audit, not a
per-edit hook, then, when a consumer glob matches no shipped test-weaken row, a line naming
those globs: the audit scans them, test-weaken skips them. No settings entry is printed.Then probe the hook launcher, which the script does not: run command -v node via Bash and report
node as a FAIL row when it is absent. Every hook row launches through node hooks/exec-bash.mjs,
so a missing node is a hook launch error, not a skip notice, and a hook cannot report its own
missing launcher.
applyRun check and summarize the effective config before proposing a change. Nothing already
configured is dropped without the user confirming.
Ask only what the repository cannot answer: folders or files to leave out, test files the shipped globs miss (and which adapter reads them), adapters to turn off, rule levels.
Write the team layer with the answers. The script writes the team file in use:
docs/conventions/testing.yaml whole (keeping its e2e_driver, reuse_running_instance, browser_driver,
map_unit, map_entry_points, map_report_order, file_findings, file_findings_floor,
tdd_refactor_step and first_test lines), else the body of the yaml config block in docs/conventions/testing.md (the rest of
that file stays); with neither, it creates docs/conventions/testing.yaml. It keeps the result
only when it resolves and writes nothing else; pass every value the team layer should hold, the
existing ones included:
bash "${CLAUDE_PLUGIN_ROOT}/skills/setup/scripts/setup.sh" apply \
--exclude 'legacy/**' --extend js-vitest.files='*.it.ts' --rule weak-oracle=warn
Flags: --include, --exclude, --enable, --disable, --adapter-dir,
--extend <id>.<field>=<value>, --rule <rule>=off|warn|error, each repeatable.
Run check again. Offer git add for the file
apply printed and a commit, and run each only when the user accepts. Personal overrides go in
<home>/testing.local.yaml, which should be gitignored. check also prints the optional line
to paste into CLAUDE.md or AGENTS.md that points at docs/conventions/testing.md when that
file exists; a test rule a check could decide goes to /corrections:codify (if enabled) instead, as
check's instruction section says.
/testing:audit Runs the scan with the config this skill wrote.
CLAUDE.md, AGENTS.md, .claude/settings.json, or any lint config. It prints what to add./testing:audit.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub melodic-software/claude-code-plugins --plugin testing9 skills in this plugin
/auditportability-ok: R6 kept-adapter operation - cant-fail-scan.shRead-only: find tests that cannot fail (assertion-free, tautological, vacuous, mock-only, dead asserts, snapshot-only, change detectors, retry-masking configs, test.only). JS/TS, Python, C#, Bash, PowerShell, Go. Use when: 'find tests that prove nothing', 'audit test quality', can't-fail CI gate (--check, --strict), or --persist-findings. Load it to judge any test, even a pasted one./check-visual-parityCheck visual parityHold UI pixel-for-pixel steady through a change: PNG screenshots of listed states before first edit (baseline), then at each green checkpoint counting differing pixels vs pixel_tolerance (compare). Never edits baseline. Use when plan phase has Parity contract line, refactor must leave UI unchanged, 'check visual parity', 'did this change the UI'./cleanupClean up low-value/tautological/vacuous/flaky tests in folder/whole repo's tests via /testing:audit findings: quarantine, rewrite (default), delete, merge, keep per test; mutation gate or --cannot-fail-only; unattended never commits. Use on existing test suites/tests: 'clean up these tests', 'prune the useless tests', 'fix the tests audit flagged'./fix-failingFix failingFind why tests fail, then fix them: test triage, root-cause (never retry blindly), reproduce-fix-retest; `diagnose` changes no code. Use when: 'why does this fail', 'fix the failing tests', 'why is this test flaky', failing/flaky tests, stack traces. Not for authoring: /testing:write; runs: /toolchain:check; profiles: /debugging:analyze-profile./planAnalyze code changes to produce a test plan: classify changed files by test type, identify coverage gaps, and prioritize by regression risk. Use when: 'test plan', 'what needs testing', 'where are the coverage gaps', after /implementation:implement, or PR-prep test coverage checks. Not for writing: /testing:write; running: /toolchain:check./run-e2eRun E2EWhen bundled run resolves in this session, prefer it for quick launch; use for evidenced end-to-end live app verification: start app, drive UI/API/non-UI smoke tests (libs/MCP/hooks/scripts), capture screenshots/logs. Use verifying running app end to end ('e2e', 'smoke test', 'does it actually work'). Not for build/test/lint: /verification:confirm.Other plugins' skills for the same job