/kenji:plan-test-coveragefrom kenji skills
Audits test coverage against user stories and critical flows, not just line percentage. Builds traceability matrix, detects fake-green tests, and produces a phased coverage plan without writing tests.
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.
Read when SKILL.md points to them.
Degree of freedom: MIXED — story derivation and fake-green judgment are HIGH; coverage commands run exactly. Stay plan-only. No tests written in this pass.
Role: Senior QA / test engineer.
Task: Audit the test suite against user stories and critical flows, not just line %. Find untested, weakly tested, and fake-green tests. Build traceability matrix + burndown. Audit & plan only — do not write tests in this pass.
| Skill | Does |
|---|---|
| plan-test-coverage (this) | Story-driven coverage plan |
test-unit | Write unit/integration tests (execution) |
test-qa | Live QA crawl |
test-playwright | E2E verification after changes |
workflow-spec-tdd | Spec + TDD during feature build |
plan-stub-checker | Finds unwired UI — feed into critical-path tests here |
Loop position: plan-stub-checker → wiring approval → plan-test-coverage → plan-perf-audit / plan-security-audit → plan-docs-sync
Propose: add an e2e for "authed user exports data" covering the newly wired Settings control; replace
expect(true).toBe(true)inexport.test.ts. Risk: stub-checker wired the button; coverage % is 82 but the critical path has no test — fake-green hides it. Keep-working: login happy-path Playwright spec already asserts a session cookie. Phase: Phase 1 — Critical uncovered + fake-green. Spec: given authed session / when Export clicked / thenPOST /api/export200 and a file download.
Read references/preservation-contract.md. Acknowledge in output #1.
| File | Contents |
|---|---|
references/methodology.md | Stories from code, traceability, multi-lens, fake-green |
references/output-templates.md | Matrix, burndown, phased plan |
0. Derive user stories from code (FIRST)
1. Inventory existing tests + coverage baseline
2. Traceability matrix (story ↔ test)
3. Multi-lens coverage audit
4. Fake-green / weak-test detection
5. Burndown + phased coverage plan
6. Guardrails (mutation CI, coverage ratchet)
7. Research citations
Detail: references/methodology.md
Delegate an inventory pass to a subagent only when it is sizeable, independent of the others, and its raw output (coverage reports, test listings) has no place in the plan; brief it with the exact commands and the columns to return. It writes no tests, like this pass. Long sweeps are expected — context compaction exists, so finish the inventory rather than wrapping up early.
Reconstruct what the app promises from routes, handlers, flows — not invented stories.
Each story: acceptance criteria + criticality + cited implementing code.
Discover test files; map to stories. Run coverage tool if available:
npm test -- --coverage
npx vitest run --coverage
Not run → [NEEDS RUN] with command to run.
Core artifact. Every critical story with no test = top-priority gap.
Template: references/output-templates.md
Judge branch/path/risk/integration/error paths — not just line %.
Flag fake-green: over-mocks, expect(true), implementation-detail tests.
Recommend mutation testing on critical modules for blind spots.
Phases:
Per gap: given/when/then spec + "what must keep working". Plan only.
[NEEDS RUN]test-mutation; writing tests → test-unit / test-playwright; unwired UI → plan-stub-checker[NEEDS RUN][NEEDS PRODUCT INPUT] / [NEEDS RUN]End the turn with a standalone recap in chat: the two or three highest-impact gaps (untested critical stories and fake-green first) and the first phase to approve. The plan is the deliverable — write it before the recap.
What SKILL.md sets; muted values are Claude Code's defaults
highnpx 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".
Other plugins' skills for the same job