x-mockery
OfficialGenerate testify mocks with mockery v3.
Software Engineering#go#testify#unit-testing#expectations#mockery#mocks generation#interface mocking
Authorpure-golang
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill solves the problem of writing and maintaining reliable Go unit-test mocks when a consumer needs to stub interface dependencies in a consistent, type-safe way.
Core Features & Use Cases
- Consumer-side interface mock flow: defines a minimal interface in the package that consumes it, then generates mocks from the root configuration.
- Mockery v3 + testify integration: produces testify-based mocks with
EXPECT()and theNew<Type>(t)constructor formockery v3. - Guardrails and validation: ensures you use the project’s centralized
.mockery.ymland validates generated output via a post-check script. - Run-time return logic: uses
RunAndReturnfor typed results derived from call arguments.
Quick Start
Run x-mockery to generate a testify mock for a consumer-side interface using the root .mockery.yml, then verify the result with scripts/check-mockery-targets.sh.
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: x-mockery Download link: https://github.com/pure-golang/level85/archive/main.zip#x-mockery Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.