dist/claude/dev-flow/skills/improving-tests/SKILL.md
Improve test design, speed, and coverage with behavior-focused tests, useful seams, characterization tests, TDD, and test refactoring. Use when improving tests, optimizing slow suites, 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. Treat suite latency as a quality attribute. 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.performance: measure slow tests and remove speed waste without weakening behavior.full: review, refactor, performance, 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.performance mode or slow-suite work, also load the matching references/<language>-performance.md when present.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 ./pkg -run TestName
go test ./...
go tool cover -func=/tmp/coverage.out
golangci-lint run ./...
vitest run path/to/file.test.ts
jest path/to/file.test.ts --runInBand
pytest -q --maxfail=1 --tb=short
pytest -q --durations=10 --durations-min=0.5
uv run pytest -q --maxfail=1 --tb=short
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.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. NOT for generic implementation planning that does not read or write `.spec/` files.
development
Simple web development with HTML, CSS, JS, and HTMX. Use when working with .html, .css, or .htmx files, web templates, stylesheets, or vanilla JS scripts. NOT for React/Vue/Angular (use writing-typescript) or Node.js backends.
tools
Idiomatic TypeScript development. Use when writing TypeScript code, Node.js services, React apps, or TypeScript design advice. Emphasizes strict typing, boundary validation, composition, fast feedback, behavior tests, and project-configured tooling. NOT for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered templates (use writing-web).
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, CI `run:` shell bodies, or command-runner recipes. Emphasizes portability, quoting, safe filesystem/process handling, non-TUI CLI tools, ShellCheck, shfmt, Bats, and ShellSpec. NOT for Python, Rust, TypeScript, Go, web code, or GitHub Actions workflow/job/permissions semantics; use operating-infra.