writing-quality-tests
Installation
SKILL.md
Writing Quality Tests
Overview
High-signal tests prove behavior, not implementation. While TDD focuses on the process of writing tests first, this skill focuses on the artifact—making tests stable, explicit, and valuable long-term.
Core rule: If a test is nondeterministic or tied to internals, it is debt. Fix it.
When to Use
- New features: "I need to add tests for this new API endpoint/component."
- Bug fixes: "Help me write a regression test for this bug before fixing it."
- Flaky tests: "This test fails randomly on CI. How do I make it deterministic?"
- Refactoring: "I want to refactor this legacy code but the tests are brittle. How do I improve them first?"
- Slow tests: "The test suite takes too long. How can I speed it up or mock dependencies effectively?"
- Test Design: "Should I use a unit test or integration test for this logic?"
- Review: "Check these tests for maintainability, coverage, and clarity."
- Not for manual exploratory testing or load/perf-only work.