dist/claude/plugins/dev-flow/skills/improving-tests/SKILL.md
Improve test design and coverage with behavior-focused tests, useful seams, characterization tests, TDD, and test refactoring. Use when improving tests, adding coverage, refactoring brittle tests, removing test waste, or working test-first. NOT for fixing production bugs (use fixing-code), production-code refactors (use refactoring-code), or reviewing non-test code quality (use reviewing-code).
npx skillsauth add alexei-led/claude-code-config improving-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Follow the base skill. This Claude overlay only defines tool use and execution details.
Improve tests through public behavior seams. Do not inflate coverage with low-value assertions. Do not change production behavior unless the selected TDD slice requires it.
review: find weak, duplicate, brittle, missing, slow, or flaky tests.refactor: simplify tests without changing covered behavior.coverage: add useful tests for uncovered business behavior or error paths.tdd: one red-green-refactor slice at a time.full: review, refactor, and add coverage.If mode is missing, use AskUserQuestion with those options. Ask before adding a
new test framework.
Use TaskCreate and TaskUpdate when the session has more than two steps:
Read, Grep, Glob, and LS to find tests, fixtures, helpers, and nearby patterns.Edit for existing tests and Write only for new files.Use direct reads/search for small scopes. Spawn read-only agents only for broad or mixed-language audits.
Use only commands supported by the repo and available tools. Examples:
go test ./...
go tool cover -func=/tmp/coverage.out
golangci-lint run ./...
pytest -v
uv run pytest -v
bun test
bun run tsc --noEmit
npm test
npx playwright test --list
bunx playwright test --list
If a referenced command is unavailable, report it as skipped with the exact reason. Do not install a test framework or tool without user approval.
For tdd, write one failing test for one behavior, confirm it fails for the expected
reason, implement the smallest passing code, then refactor only while green. Do not
write a bulk suite for imagined future behavior.
it.each consolidation when separate tests make distinct behavior clearer.BLOCKED or Proposed Changes.Use TEST IMPROVEMENT COMPLETE for applied changes:
TEST IMPROVEMENT COMPLETE
=========================
Mode: review | refactor | coverage | tdd | full
Tests changed: N
Waste removed: N
Coverage: before → after | not measured
Status: CLEAN | NEEDS ATTENTION
Key improvements:
- file:line — change
Verification:
- <command> — pass/fail/skipped with reason
Use BLOCKED or Proposed Changes when tools, framework, scope, permission, or a
safe seam is missing. Include the exact missing input and the command the applier
should run.
Do not claim clean without a passing check or explicit skipped-check reason.
tools
Idiomatic shell development for POSIX sh, Bash, Zsh, Fish, hooks, CI shell steps, and scriptable CLI glue. Use when writing or changing `.sh`, `.bash`, `.zsh`, `.fish`, `.bats`, shell functions, shell pipelines, or command-runner recipes. Emphasizes portability, quoting, safe filesystem/process handling, non-TUI CLI tools, ShellCheck, shfmt, Bats, and ShellSpec. NOT for Python, TypeScript, Go, web code, or infrastructure operations.
tools
Use when planning, executing, checkpointing, finishing, or inspecting lightweight spec-driven work. Runs one task at a time using `.spec/` markdown files and the bundled `specctl` helper. NOT for broad product discovery beyond a short requirement interview.
testing
Author, inspect, troubleshoot, and review infrastructure across IaC, Kubernetes, cloud resources, containers, CI/CD, and Linux hosts. Use when changing Terraform/OpenTofu, Kubernetes, Helm, Kustomize, Dockerfiles, GitHub Actions, AWS, GCP, Cloud Run, BigQuery, IAM, logs, instances, or service health. NOT for deploy/apply/rollback workflows (see deploying-infra). NOT for shell scripts or generic command pipelines (see writing-shell).
development
Configure safe git workflow hygiene: pre-commit/pre-push hooks, Gitleaks secret scanning, .gitignore rules, local git config, and guardrails. Use when setting up git hooks, gitleaks/git leaks, staged pre-commit checks, pre-push validation, core.hooksPath, .gitignore, or git config best practices. NOT for creating commits (use committing-code), cleaning branches/worktrees (use cleanup-git), or creating worktrees (use using-git-worktrees).