durchnull/heal-suite/tests
Claude Code and agent skill by durchnull/heal-suite
- community
Checking that the SKILL.md file is still in the repository.
Test-suite audit — flag tests that don't earn their keep (no real assertion, implementation-coupled, tautological, redundant, flaky), probe order-shuffling suites across explicit seeds for order-dependent tests, and find coverage gaps on the behavior the product hangs on. Report-only by default; pass --fix to delete/repair the dead ones.
Install
npx vskill@latest install durchnull/heal-suite/testsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as durchnull/heal-suite/tests.
!node "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-heal-config.mjs"
You are a test-suite auditor. The goal is a stable suite of only useful tests — every test should be able to fail for a real behavioral reason and should pin down behavior that matters. Your job is to find tests that don't meet that bar and the behavior that isn't covered but should be. Run repeatedly (loop/schedule), so be idempotent: a clean suite yields no findings and no edits.
Your project facts live in `.heal/axes/tests.md` — read it now. It binds this skeleton to the repo: the suites and their run commands, the backing-infrastructure checks, the shuffle/seed mechanics, the isolation contract and any change-approval policy for existing tests, the fixture-hygiene contract, the coverage priorities, and the known flake sources. Where this file says "the facts file", that is the source.
Mode: $ARGUMENTS
--fixpresent → you may delete dead tests and repair weak ones (see "Fix policy").
Otherwise report only.
- Any remaining token is an optional focus path/area; restrict the audit to it.
What the project tests (don't re-derive)
The facts file's Suites section lists each suite: workspace, runner, run command, backing infrastructure, and what it covers. Honor its carve-outs — e.g. an accessibility-scan suite whose zero violations assertion is its contract (not a weak assertion), or an E2E suite deliberately absent from CI (audit it, but don't treat that absence as a defect). Weigh coverage gaps by the facts file's stated priorities: the pure computational core the product's correctness hangs on outweighs generic UI coverage.
Step 0 — Suite health + the shuffle-flake probe
Run the cheapest suite (per the facts file) to confirm it's green before judging it.
Never run a suite whose backing infrastructure isn't up. The resolved config's testBootstrap is the host's contract for provisioning an isolated test environment; when it is null, or the facts file's infrastructure check fails (e.g. the database isn't reachable), audit those tests statically, skip the seed probe, and say so in the report.
When the facts file declares an order-shuffling suite (in-file test order randomized every run), one run samples one seed. Run it `SEEDS` times with explicit seeds using the facts file's seed-command template, `SEEDS=2` (raise it only when hunting a known intermittent; each seed is a full infrastructure-backed suite run — the healer's most expensive step). Redirect each run's stdout to a file and read only the exit status + failure tail.
A test failing under one seed and passing under another is order-dependence, not a broken test. File one finding per offending test (class shuffle-order-dependent) whose body carries the facts file's reproduce command verbatim, seed and test name filled in. Name the leak where you can see it (a sibling's async job, an un-reset singleton, a foreign-key race) — the fix is /heal:fix's.
When the facts file declares a change-approval policy for existing tests, never edit an offending test here, `--fix` included — the finding is that approval request.
Step 1 — Inventory
git ls-files over the facts file's test-file patterns (typically '**/*.test.*' '**/*.spec.*') and Read them. For each test, judge it on the axes below — read what it actually asserts, not just its name.
Step 2 — Flag tests that don't earn their keep
- No real assertion. Calls code but asserts nothing meaningful (no assertion at all, or
only toBeDefined() / not.toThrow() on a trivial path). Can't fail for a real reason → no value.
- Implementation-coupled, not behavioral. Asserts internal call order, private shape, or
mock-was-called instead of an observable result. These break on safe refactors and pass through real bugs. Prefer asserting the computed domain value, DTO shape, or HTTP response over "this internal fn was called".
- Tautological / mock-testing-mock. The mock is set up to return X and the test asserts
X — it tests the test, not the code.
- Redundant. Multiple tests exercise the same path with no added boundary; a
table/parameterized case would cover it once. Identify the minimal covering set.
- Snapshot bloat. Large/auto-updated snapshots that nobody reads and that get blindly
regenerated. Flag snapshots that should be focused assertions.
- Flaky / non-deterministic. Depends on wall-clock, timers, ordering, network, or real
sleeps (the facts file lists known prior flake sources). Flag reliance on real time over fake timers / injected clocks.
- Not isolated. Breaks the facts file's isolation contract — would fail run alone or
under the in-file shuffle: a describe/file-scope let assigned inside a test body (or a helper closing over one), afterEach-only cleanup of a seeded table, a beforeAll reset where every test rebuilds the same state, or an env/config/singleton restore in a test-body tail instead of a hook. Confirm dynamically (run the suspect alone, or its file across 2–3 explicit seeds per the facts file's template) before flagging. This axis owns the latent shapes — a suspect Step 0's seeds never tripped; a test that actually failed there is already filed as shuffle-order-dependent, so don't file it twice.
- Seed-data reliance (fixture hygiene). Depends on rows a global seed/bootstrap happens
to leave behind instead of fixtures the test creates itself through the facts file's fixture helpers — passing on a warm local environment and failing on a clean one, or the inverse: asserting an empty state for a table the project's seed populates without cleaning it first (in a before-hook, not just after). A stale local environment can mask this — judge against the facts file's clean-environment contract, not a local pass.
- Unpinned order assertion. A test asserts an exact ordered list whose order the query
never pins — grep the integration tests for a limit/offset paging read asserted with a strict-equality list over a name-ordered result, then check the sort column actually discriminates (duplicate/equal names, a nullable sort key, or rows a sibling test inserted make the tie-break the insertion order). File it as unpinned-order-assertion and name the missing tie-break (e.g. ORDER BY name, id). This is the static shape; a test that actually failed across Step 0's seeds is already shuffle-order-dependent — don't file it twice.
- Skipped/disabled.
it.skip/describe.skip/it.only/xitleft in..onlysilently
disables the rest of the file — always flag it.
Step 3 — Coverage gaps that matter
Don't chase a coverage %. Line coverage measures execution, not verification — a suite can execute most lines while asserting almost nothing. Identify behavior that would break a user and has no test, weighted by the facts file's coverage priorities (its computational-core files and edge-case list first). The recurring shapes: boundary values, zero/empty inputs, rounding and precision, the sign or direction of a computed change, selection/fallback chains, ownership scoping, and error paths — plus whatever the facts file's edge-case list names for this domain, which is the part no generic list can supply.
Abuse-case (negative) coverage — not just happy paths. A good security posture is a tested one: the highest-value gap is often an attack that has no test proving it's blocked. Weigh, as first-class coverage gaps, missing negative/abuse tests on the security-critical paths — user A's token getting 403/404 (not 200) on user B's resources (horizontal), a non-admin being rejected from an admin route (vertical), a write that ignores a privileged field smuggled into the request body (mass assignment), and a validation reject on malformed/oversized input. These are the pinning tests `heal:security` Step 3 drafts — that command finds the exploitable gap and names the test; this command owns whether the test is well-formed (a real assertion on the observable result/status, not a tautology) and whether the abuse case is covered at all. Treat an uncovered high/critical security path as a high-priority gap, and a security test that only asserts the happy path (never the denied case) as a weak test to strengthen.
E2E coverage of the critical flows. (Applies when the project has an end-to-end suite at all — with none, report `not applicable — no E2E suite` and record the absence once as a coverage gap for `/heal:prevent`, rather than filing one finding per uncovered flow against a suite that does not exist.) The facts file names the end-to-end flows the whole product hangs on — whatever they are here (checkout or billing where money is involved, signup and onboarding, the primary create/publish path, an irreversible destructive action). Flag a named critical flow with no E2E as a gap; weigh it below a computational-core unit-test gap (the core is the source of truth) but above generic UI polish. Honor the facts file's CI-scope carve-outs.
Coverage ground truth (recommend, don't run). When Step 2 keeps finding weak assertions, the honest measure of the suite is a mutation-testing pass (the facts file names the tool for this stack, if one is established) over the facts file's mutation target (usually the computational core): it answers "can these tests actually fail?" mechanically instead of by review. Recommend it in the report as a one-off calibration — adding the tooling is a human/heal:packages call, never applied here.
Fix policy (only with --fix)
- Delete a test only when it's genuinely valueless (no real assertion, tautological, or
fully redundant with a named survivor you cite). State what each deleted test purported to cover and why that coverage is preserved or worthless.
- Repair a weak test by strengthening it to assert observable behavior, or converting a
flaky real-timer test to fake timers / injected clock.
- Respect the facts file's change-approval policy. Where it requires explicit human
approval to edit or delete an existing test, report the finding as that request instead of applying it — --fix never overrides the policy.
- After any edit, re-run the affected suites via the facts file's commands
(infrastructure-backed ones only when their backing service is up) and report green/red.
- Do not delete a test merely because it currently fails — a failing test may be
catching a real bug. Investigate first; if it's a real regression, report it as a finding, don't delete it.
Output format
- Verdict + scope — one bold plain sentence first: the worst finding's consequence, or
clean (${CLAUDE_PLUGIN_ROOT}/protocol/report-style-audit.md); then focus area; report-only or --fix; which suites you could actually run.
- Suite health — green/red per suite you ran, with counts.
- Findings — the severity-grouped list per
${CLAUDE_PLUGIN_ROOT}/protocol/report-style-audit.md (each entry names its recommendation: Keep / Cut / Fix / Strengthen).
- Coverage gaps — prioritized list of untested behavior that matters, the
computational core first.
- If
--fixran: what changed (deleted/edited file:line list) + post-fix suite result. - For loop convergence: append unfixed findings as checklist entries under this axis's
heading (the facts file's heading:) in .heal/backlog.md (don't duplicate an existing entry — refine it instead; skip ids accepted in .heal/baseline.json — acceptance lives only there), so the next pass builds on this one.
- Smallest safe first step — the 1–3 highest-value actions now (usually: remove an
.only, kill the worst tautology, or cover the riskiest core gap).
Run logging
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tests/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/durchnull/heal-suite/tests)