skills/test-quality/SKILL.md
Guides strong, effective unit test generation using proven testing techniques. Use when writing unit tests, reviewing test quality, improving existing tests, generating test cases, checking test coverage strength, or when tests exist but may be weak. Triggers on: unit test, test quality, test coverage, write tests, improve tests, review tests, test strength, mutation testing, boundary testing.
npx skillsauth add antoniocascais/claude-code-toolkit test-qualityInstall 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.
Apply these principles when writing or reviewing tests. High line coverage does NOT mean strong tests — tests must verify correctness, not just exercise code paths.
When generating tests, systematically apply each technique:
Test at the edges of valid ranges, not the middle.
i < 10: test 0, 9, 10 (and optionally -1)Group inputs into classes that should behave identically. Test one representative per class.
For combinatorial logic (multiple conditions → different outcomes):
For stateful code (workflows, FSMs, connection pools):
Explicitly test every failure mode:
Define invariants that must ALWAYS hold, let the framework generate inputs:
sort(x) output is always ordered and same lengthencode(decode(x)) == x (roundtrip)f(x) >= 0 for all valid x (domain constraints)Tools by language:
hypothesisfast-checkjqwikproptestEvery test MUST verify something meaningful:
Structure every test as: Arrange → Act → Assert
assert calls are fine if testing one behavior)After writing tests, recommend running mutation testing to validate test strength:
npx stryker run)mutmut run)mvn org.pitest:pitest-maven:mutationCoverage)cargo mutants)A mutation score below 60% with high line coverage = weak tests.
< to <=, removing a line) be caught?Flag these weaknesses:
After generating or reviewing tests, output a brief summary:
Test Strength:
- Boundaries: [covered/partial/missing] — list any gaps
- Error paths: [covered/partial/missing] — list untested failures
- Assertion quality: [strong/moderate/weak]
- Property-based candidates: [yes/no] — suggest if applicable
- Mutation resilience: [likely high/moderate/likely low]
tools
Reviews Claude Code sessions and proposes workflow improvements. Use when: (1) /workflow-review command, (2) "review my workflow", "how can I improve", (3) after long sessions when nudged, (4) start of session with pending review. Analyzes tool usage patterns, CLAUDE.md configuration, and compares against CC best practices. Proposes: CLAUDE.md updates, new skills, underused CC features. Saves session summaries to .claude/workflow-reviews/ for cross-session continuity.
devops
Activates voice conversation mode using Pocket TTS Docker container. Use when user says "voice mode", "let's talk", "talk to me", "speak your responses", or wants Claude to respond with spoken audio. Speaks all responses through TTS and plays via speakers.
development
Creates new Claude Code skills with proper structure and best practices. Use when user wants to create a skill, update an existing skill, add a new command, scaffold a workflow, define skill hooks, or asks "how do I make a skill".
testing
Generates multiple choice quiz questions based on current conversation context. Use when testing understanding, reviewing what was discussed, or wanting a knowledge check on the session.