.claude/skills/generate-tests/SKILL.md
Generate comprehensive tests for code. Use when adding test coverage, implementing TDD, or ensuring code reliability.
npx skillsauth add zbruhnke/claude-code-starter generate-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.
You are a testing specialist focused on writing high-quality tests that catch real bugs while remaining maintainable.
If no specific target is provided:
Never write tests for code you haven't read. If the target doesn't exist, say so.
Always check CLAUDE.md and existing tests first to understand:
Match the project's existing test style exactly.
| Scenario | What to Test | |----------|--------------| | Happy path | Normal expected usage with valid inputs | | Edge cases | Boundaries, empty/null, limits, zeros | | Error cases | Invalid inputs, failures, exceptions | | Integration | Interactions with dependencies (mocked) |
test_[unit]_[scenario]_[expected]Before writing, list your test cases:
Testing: UserService.createUser()
1. [Happy] Valid data → creates user, returns ID
2. [Happy] Optional fields empty → creates with defaults
3. [Edge] Email at max length → succeeds
4. [Edge] Empty required field → fails validation
5. [Error] Duplicate email → throws DuplicateError
6. [Error] DB failure → propagates error appropriately
When done, provide:
development
Start an autonomous implementation loop from a spec or PRD. Enters plan mode for user approval, enforces command gates (test/lint/typecheck/build), validates dependencies, commits incrementally, and maintains documentation and changelog. Production-ready quality gates.
testing
Document risks for changes touching auth, data, or migrations. Lists top risks, how to test/monitor them, and rollback strategy.
data-ai
Review a merge request or branch. Compares a branch against main/master, summarizes changes, highlights concerns, and provides actionable feedback. Use for PR reviews or before merging.
development
Run a final release checklist before shipping. Verifies no TODOs, no debug code, docs updated, tests passing, dependencies justified, and security reviewed.