write-tests
Write focused, fast tests that cover behaviour, edges, and failures.
SKILL.mdskills/write-tests/SKILL.md
GitHubWhen to use
The user wants tests for some code, or asks to raise coverage.
How
read_filethe target so tests match the real API.- Put tests in
tests/test_<module>.py; plainpytest, minimal fixtures. - Cover the happy path, one edge case, and one failure/error path.
- Keep each test small, independent, and named for what it asserts.
- Assert on behaviour and return values, not internal calls.
Avoid
- Testing implementation details that break on harmless refactors.
- Giant fixtures or shared mutable state across tests.
- Tests that assert nothing meaningful ("it runs").
Done well
A handful of small tests that fail loudly when behaviour breaks and pass quietly otherwise — plus a note on what you covered and what you left out.