About w-unit
w-unit is an agent skill for adding unit tests for requested behavior. It follows repository conventions, focuses on failure-prone behavior and regression cases, and runs focused and package-level tests.
Key features
- 01Follow existing test conventions
- 02Test public APIs and error paths
- 03Cover regression behavior
- 04Mock documented boundaries
- 05Run focused and package tests
Use cases
- 01Add tests for a requested change
- 02Test error handling and public APIs
- 03Verify a regression fix
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ blockmatic-icebox/ basilic-skills --skill w-unitAfter installing, type/w-unitin Claude Code to confirm it loaded.
Details
From the project READMECover the requested behavior with unit tests. Follow vitest-v5 (or the stack's test skill) and existing file conventions. Do not chase coverage percentage.
- Read neighboring tests and the test skill. Colocate
*.test.tsbeside the implementation. - Test the behavior that can fail: public API, error paths, and the regression this change needs.
- Mock only at documented boundaries. Prefer real types and factories the repo already uses.
- Run the focused file, then the package test script.
- Docs:
/w-docsif behavior or commands changed.
Comments
Markdown supported