Unit test writer
Write focused, meaningful unit tests for a function or module. Use when the user asks to add tests, improve coverage, or write tests for specific code.From its SKILL.md
npx -y skills add minagayid/Agents --skill unit-test-writerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.3 KB, as published. Nobody here has run it
Unit Test Writer
Write tests that catch real regressions, not tests that just execute lines.
Steps
- Identify the unit under test and its contract (inputs, outputs, side effects, errors).
- Detect the project's test framework and conventions (look at existing tests first) and match them.
- Enumerate cases before writing:
- Happy path — typical valid input.
- Boundaries — empty, zero, one, max, negative, very large.
- Invalid input — wrong type, null/None, malformed → expected error.
- Side effects — state changes, calls to collaborators (use fakes/mocks).
- Write one behavior per test with a descriptive name (
returns_empty_list_when_no_matches). - Follow Arrange–Act–Assert; keep each test independent and deterministic.
Guidelines
- Assert on behavior and outputs, not implementation details.
- Prefer real objects; mock only at true boundaries (network, clock, filesystem, randomness).
- Make failures readable — assert specific values with clear messages.
- Cover the failure modes, not just coverage percentage.
- Run the suite and confirm the new tests pass (and fail when the code is broken).