From amplify
Guides coverage-driven test writing for existing codebases: discovers untested user-facing behavior via coverage reports, writes one meaningful test per iteration, marks low-value code with ignore annotations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/amplify:write-testThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write tests that catch regressions users would notice. Use coverage as a discovery tool, not a target.
Write tests that catch regressions users would notice. Use coverage as a discovery tool, not a target.
A great test covers behavior users depend on — a feature that, if broken, would frustrate or block users. It validates real workflows, not implementation details. It catches regressions before users do.
Do NOT write tests just to increase coverage. Use coverage as a guide to find untested user-facing behavior.
If uncovered code is not worth testing (boilerplate, unreachable error branches, internal plumbing), add the appropriate ignore annotation instead of writing a low-value test.
package.json scripts and CI config (.github/workflows/) to find the project's actual test command. If no test infrastructure exists at all, stop and tell the user: this skill requires an existing test runner..test.ts, .spec.ts, _test.go, test_*.py) and placement (__tests__/, colocated, or dedicated test/ directory)."returns error when file not found" not "test getFile function".Check package.json scripts or CI config first. If no script exists, use the runner's native flag:
| Runner | Coverage command |
|---|---|
| vitest | npx vitest --coverage |
| jest | npx jest --coverage |
| c8/node | npx c8 node --test |
| bun | bun test --coverage |
| go | go test -cover ./... |
| pytest | pytest --cov |
| cargo | cargo tarpaulin |
If the runner is not in this table, look for a --coverage or --cov flag in the runner's docs, or check the CI workflow for the exact invocation.
Use the annotation that matches the project's coverage tool — not all projects use V8:
| Tool | Annotation |
|---|---|
| V8 / vitest (v8) | /* v8 ignore next */ or /* v8 ignore start */ … /* v8 ignore stop */ |
| Istanbul / jest | /* istanbul ignore next */ or /* istanbul ignore if */ |
| pytest-cov | # pragma: no cover |
| Go | No standard annotation; exclude files via go test -coverprofile flags or build tags |
npx claudepluginhub wunki/amplify --plugin ask-questions-if-underspecifiedDiscovers testing gaps and generates unit tests that follow project conventions. Conservative — only adds new test files, never refactors source code. Use when coverage is low or after adding new code lacking tests.
Generates tests, analyzes coverage gaps, and guides red-green-refactor cycles for Jest, Pytest, JUnit, Vitest, and Mocha.