mockery

Installation
SKILL.md

Mockery Mock Generation Workflow

When to Activate This Skill

  • A new interface is added to internal/application/ports/
  • A test file contains a manually-written mock/stub for a ports interface
  • A developer asks to add mock coverage for an existing ports interface
  • A test needs to replace On(...).Return(...) setup on a hand-rolled struct with generated mock expectations

Placement Convention

Mocks live in the infrastructure layer, beside the concrete implementations:

Interface package (application/ports/) Mock output directory (infrastructure/)
ports/api/btc/ infrastructure/api/btc/mocks/
ports/api/eth/ infrastructure/api/eth/mocks/
ports/api/xrp/ infrastructure/api/xrp/mocks/
ports/file/ infrastructure/storage/file/transaction/mocks/
Related skills
Installs
15
GitHub Stars
126
First Seen
Mar 1, 2026