No slash command · from kenji skills
Runs mutation testing with StrykerJS or mutmut to verify tests actually assert behavior, not just execute lines. Use after bulk-generated tests or when coverage seems misleading.
Ships in kenji 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.
None: SKILL.md is the whole skill.
Degree of freedom: MIXED — scope and triage [HIGH freedom]; first run
and CI floor [LOW freedom — measure, then ratchet]. Never start with the
whole repo.
Install and run the gate coverage cannot close. Coverage proves the test
ran the code; mutation testing proves the test would notice if the
code were wrong. The tool makes hundreds of small deliberate bugs
(mutants) — flip > to >=, delete a statement, replace a return — and
reruns the tests. Survivors mark code the tests execute but verify
nothing.
This is the specific counter to agent-generated suites: an agent can trivially produce 90% coverage with no meaningful assertions, and every coverage ratchet will wave them through. Mutants do not care about coverage theater.
| Skill | Owns |
|---|---|
| test-mutation (this) | Install / run / triage mutation testing; score ratchet |
plan-test-coverage | What should be tested — plan only, no harness |
test-unit | Write the tests |
audit-gate-logic / housekeep-gates | Ratchet policy this score plugs into |
enhance-agent-guardrails | Wording of the agent-rule hook |
Observe: Stryker flipped
>to>=inentitlements.tsexpiry check; suite green; mutation score 62% on a 94% coverage file. Interpret: tests execute the line but never assert the boundary. Classify: missing assertion. Severity: high — paid access could extend a day. Fix: assert expired-at-exact-boundary is denied; then re-run incremental.
Identify the runner and pick the tool: StrykerJS (Jest / Vitest / Mocha, TS-aware), mutmut / cosmic-ray (Python), or the ecosystem built-in. Then scope — this step decides whether mutation testing survives in the repo:
Never start with the whole repo. Each mutant is a test run. A 6-hour
first run gets the tool deleted. Scope the first pass to where a silent
bug costs most: money movement, auth, entitlements, data mutation, core
business logic. Explicitly exclude: generated code, config, type-only
files, UI glue better covered by test-visual-regression, and third-party
wrappers.
Record the suite's baseline runtime. Mutation runtime ≈ (mutants × affected-test runtime). Turn on per-test coverage analysis from day one so only tests covering the mutated line rerun.
mutate: globs.--incremental): later runs only
re-test mutants in changed code — this is what makes per-PR runs
feasible.high / low for reporting, and break (CI-failing
floor) at or slightly below the measured first score. Never invent an
aspirational floor; measure, then ratchet. Same
auto-tighten-with-reviewed-resets policy as housekeep-gates.Run, then classify every surviving mutant — this triage is the deliverable:
plan-test-coverage).workflow-housekeep).< vs <= on a boundary that cannot occur). No test can kill it;
mark ignored with a comment. Expect a small percentage; a large one
means the mutator is mutating the wrong things.Prioritize by blast radius: a survivor in entitlements.ts outranks
fifty in a formatting helper.
housekeep-gates).break rises as the score does (flake tolerance);
lowering it is a separate reviewed PR, never bundled.enhance-agent-guardrails
installs the wording.break threshold set from the measured score and wired to auto-tighten; resets require a separate reviewed PRbreak floor from the first measured score, not an aspirationtest-unit; delete dead code → plan-dead-code → housekeep-dead-codeImplement the harness and triage. Strengthen tests only on approval — each fix is a reviewable change.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kensaurus/skills --plugin kenji162 skills in this plugin
/audit-accessibilityWCAG 2.2 AA audit via playwright-cli: axe-core, keyboard, contrast, target size, focus, ARIA. Use when "audit accessibility", "check a11y", "WCAG audit", "check keyboard nav", or "test screen reader".
/audit-agent-speedMeasure and fix a slow coding-agent setup: status line, hooks, instruction bloat, effort, worktree pile-up, antivirus and indexer scans. Use when "Claude is slow" or "CPU is pinned". App speed → audit-performance.
/audit-analyticsRead-only audit of product-analytics events (PostHog, Amplitude, Mixpanel, GA4): taxonomy, funnels, consent-gated firing, dead or duplicate events. Use when "audit our analytics", "are we tracking the right events", or "funnel instrumentation".
/audit-auth-flowsRead-only audit of app-layer auth: route×gate matrix, session lifecycle, OAuth, provider traps (getSession vs getUser, middleware-only gates, CVE-2025-29927). Use when "audit our auth" or "check middleware protection". RLS → plan-rls-audit.
/audit-backend-architectureRead-only backend-architecture audit and pattern advisor, gated by stack. Use when "audit backend architecture", "which pattern should I use", "am I over-engineering", or "sync vs event-driven". Enforced boundaries → enhance-arch-boundaries.
/audit-bundle-sizeAnalyse and shrink a web app's JavaScript bundle. Use when "reduce bundle size", "code splitting", "slow initial load", or "why is the bundle so big". Runtime → audit-performance.
Other plugins' skills for the same job