Workflow skill
Dev Testing Skill
Add and validate test coverage for feature work.
On this page
Install command
AI DevKit installs its built-in skills as one curated set. Run this once to install dev-testing with the rest of the built-in workflow skills.
npx ai-devkit@latest skill add --built-inWhat it does
Use dev-testing when implementation needs focused test coverage, coverage gap review, or validation before final review.
When to use it
- Add targeted tests for a feature
- Validate coverage gaps
- Run evidence-backed test checks
Supported agents
- Claude Code
- Codex
- Cursor
- opencode
The SKILL.md file
This is what your agent reads when the skill runs. View it on GitHub (opens in a new tab)
Run testing work for configured AI docs features. Before changing docs or code, propose the concrete plan for this phase and wait for user approval unless the user already approved the exact phase plan.
Phase Contract#
- Run
npx ai-devkit@latest lintbefore phase work. - If working on a named feature, run
npx ai-devkit@latest lint --feature <name>. - Read the testing doc, requirements, design, implementation notes, and current diff before changes.
- Load
verifywith your skill tool before making coverage or test-pass claims. - If parent
dev-lifecycleestablished usable task tracing, emit testing phase, next-action, and evidence events pertask.
Write Tests#
Use for Phase 8.
- Run
npx ai-devkit@latest lint --feature <name>and reference the testing doc path it validates. If manual path resolution is unavoidable, first resolve.ai-devkit.jsonpaths.docs, falling back todocs/ai. - Gather context: feature name, changes summary, environment, existing test suites, flaky tests to avoid.
- Analyze the testing template, success criteria, edge cases, available mocks, and fixtures.
- Add unit tests for happy paths, edge cases, and error handling for each module. Highlight missing branches.
- Add integration tests for critical cross-component flows, setup/teardown, and boundary/failure cases.
- Run coverage tooling, identify gaps, and suggest additional tests if below the target.
- If task tracing is available, record evidence for each fresh test/coverage command per
task. - Update the selected testing doc with test file links and results.
Next: dev-review. If tests reveal design flaws, return to dev-design.