What problem does it solve?
Skill helps you write unit tests with external dependencies without turning them into integration tests by capturing only the minimal consumer-side contract (or using callback aliases) needed for verification.
Core Features & Use Cases
- Consumer-side minimal interface: define a small local interface next to the code under test using only methods you actually call.
- Callback alias when interfaces are unnecessary: if the API already accepts a function, prefer a local callback alias instead of creating an interface just for mocking.
- Mocking strategy via x-mockery: generate mocks for the chosen local interface and avoid mocking callback types through mockery.
- Test shape guidance: choose between simple, table-driven, call-test, or suite.Suite based on setup/verify complexity.
Use case: a service depends on a storage adapter where only GetItem is needed for the unit scenario; extract a tiny interface (or callback) so you can test error mapping and returned entities with clean Arrange/Act/Assert.
Quick Start
Ask the AI to apply x-unit-test-partial-interface to my service method, and to propose the smallest consumer-side interface (or callback alias), plus a unit test structure (including Arrange/Act/Assert) that stays isolated from the real external adapter.