Agent skill

Mockery

by hiromaily in hiromaily/go-crypto-wallet

Mock generation workflow for go-crypto-wallet. An agent skill from hiromaily/go-crypto-wallet.

MITAuto-check passedTesting & QA

Install Mockery

skills CLI
$ npx skills add hiromaily/go-crypto-wallet --skill mockery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hiromaily/go-crypto-wallet mockery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hiromaily/go-crypto-wallet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mockery .claude/skills/mockery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mockery
GitHub stars
128
Token cost
~1.8k tokens
SKILL.md length
408 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Mock generation workflow for go-crypto-wallet. An agent skill from hiromaily/go-crypto-wallet.

  • Works in 6 steps: Locate the interface — find the Go file… → Determine the target directory — use the… → Add or update .mockery.yaml — append the… → …
  • Tasks that involve Test coverage
  • SKILL.md covers When to Activate This Skill, Placement Convention, Step-by-Step Workflow and .mockery.yaml Entry Template, plus 5 more sections
  • Calls make

What it does

Mockery is an agent skill from hiromaily/go-crypto-wallet. Mock generation workflow for go-crypto-wallet. Activate whenever a developer asks to generate a mock for a new interface, add test coverage that requires a mock, or replace a manually-written test stub for a ports interface. Claude MUST use make mockery — never write mock struct code by hand.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test coverage. The repository describes itself as: Cryptocurrency wallet for trading for Bitcoin, Bitcoin cash, Ethereum, ERC20, XRP Leger (Ripple). The licence is MIT.

When your agent uses it

  • Tasks that involve Test coverage

Example prompts

  • “/mockery”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Locate the interface — find the Go file in internal/application/ports/ that defines the interface.
  2. Determine the target directory — use the placement convention table above to identify the dir value.
  3. Add or update .mockery.yaml — append the interface name under its package entry (or add a new package entry if none exists). See the…
  4. Run make mockery — regenerates all mocks in one pass. Never create or edit mock files manually.
  5. Verify — run make go-lint and make check-build to confirm the generated code compiles cleanly.
  6. Update tests — replace any manual stub usage with NewMock*(t) + .EXPECT() builder calls.

What it can do on your machine

Read from SKILL.md and the folder at commit 798ab10. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mockery loads about 1.8k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 408 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hiromaily/go-crypto-wallet at commit 798ab10, republished under its MIT licence (© hiromaily). 408 words, ~1,757 tokens.

Download SKILL.mdSave it as .claude/skills/mockery/SKILL.md (or your agent's skills folder).
name
mockery
description
Mock generation workflow for go-crypto-wallet. Activate whenever a developer asks to generate a mock for a new interface, add test coverage that requires a mock, or replace a manually-written test stub for a ports interface. Claude MUST use `make mockery` — never write mock struct code by hand.

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/
ports/repository/cold/infrastructure/repository/cold/mocks/
ports/repository/watch/infrastructure/repository/watch/mocks/

Pattern: ports/<layer>/<pkg>/ → infrastructure/<layer>/<pkg>/mocks/

Step-by-Step Workflow

  1. Locate the interface — find the Go file in internal/application/ports/ that defines the interface.
  2. Determine the target directory — use the placement convention table above to identify the dir value.
  3. Add or update .mockery.yaml — append the interface name under its package entry (or add a new package entry if none exists). See the template below.
  4. Run make mockery — regenerates all mocks in one pass. Never create or edit mock files manually.
  5. Verify — run make go-lint and make check-build to confirm the generated code compiles cleanly.
  6. Update tests — replace any manual stub usage with NewMock*(t) + .EXPECT() builder calls.

.mockery.yaml Entry Template

Adding an interface to an existing package entry
yaml
packages:
  github.com/hiromaily/go-crypto-wallet/internal/application/ports/<layer>/<pkg>:
    config:
      dir: "internal/infrastructure/<layer>/<pkg>/mocks"
      pkgname: "mocks"
    interfaces:
      ExistingInterface:
      MyNewInterface: # ← append here
Adding a brand-new package entry
yaml
github.com/hiromaily/go-crypto-wallet/internal/application/ports/<layer>/<pkg>:
  config:
    dir: "internal/infrastructure/<layer>/<pkg>/mocks"
    pkgname: "mocks"
  interfaces:
    MyNewInterface:

The global settings (filename, structname, template, formatter) are already configured in .mockery.yaml and apply automatically — do not override them per-package.

Generated File Conventions

SettingValue
Filenamemock_<interface_name_snakecase>.go
Struct nameMock<InterfaceName>
ConstructorNewMock<InterfaceName>(t)
Packagemocks
Header// Code generated by mockery; DO NOT EDIT.
Show full SKILL.md (159 more words)Show less

Test Usage — Before / After

Before (manual stub — do NOT write this)
go
// ❌ Manually-written stub in a test file
type stubAccountRepo struct{}

func (s *stubAccountRepo) GetOneMaxID(accountType domainAccount.AccountType) (*domainKey.BTCAccountKey, error) {
    return &domainKey.BTCAccountKey{Index: 0}, nil
}

func TestFoo(t *testing.T) {
    repo := &stubAccountRepo{}
    uc := NewUseCase(repo)
    // ...
    // Manual assertion:
    // (no automatic call-count verification)
}
After (mockery-generated mock — always use this)
go
// ✅ Import the generated mocks package
import coldmocks "github.com/hiromaily/go-crypto-wallet/internal/infrastructure/repository/cold/mocks"

func TestFoo(t *testing.T) {
    repo := coldmocks.NewMockBTCAccountKeyRepositorier(t) // registers cleanup automatically
    repo.EXPECT().
        GetOneMaxID(domainAccount.AccountTypeDeposit).
        Return(&domainKey.BTCAccountKey{Index: 0}, nil)

    uc := NewUseCase(repo)
    // ...
    // AssertExpectations is called automatically via t.Cleanup — do NOT call it manually
}

Key differences:

  • NewMock*(t) registers t.Cleanup(func() { mock.AssertExpectations(t) }) automatically — never call AssertExpectations manually.
  • .EXPECT().Method(args...).Return(values...) provides type-safe, call-count-verified expectations.
  • The generated mock handles all type assertions internally — no args.Get(0).(*Type) boilerplate.

Exceptions — Do NOT Add to .mockery.yaml

TypeReason
Ethereumer (ETH)DI-layer-only monolithic interface; not consumed by use cases
ETHTransactionSenderType alias for TxSender; mockery cannot generate mocks for type aliases — use TxSender mock instead
Use case interfaces (internal/application/usecase/*/interfaces.go)These are not ports interfaces; simple struct stubs are acceptable for testing use case orchestration
Composed/aggregate interfaces (Bitcoiner, ETHKeygenSignClient, etc.)Leaf interface mocks satisfy all compositions — add only the leaf interfaces that use cases depend on
Compile-time conformance stubs in *_test.go under ports/Intentional type-check helpers, not test doubles — leave them as-is

Verification Commands

bash
make mockery        # Regenerate all mocks after .mockery.yaml changes
make go-lint        # Required: zero lint errors
make check-build    # Required: full build succeeds
make go-test         # Recommended: run tests for affected packages
  • .mockery.yaml — SSOT for all mock generation configuration
  • .claude/rules/internal/mockery.md — project rules enforcing this convention
  • .claude/rules/internal/infrastructure-layer.md — infrastructure layer rules
  • .claude/rules/internal/application-layer.md — application layer rules

© hiromaily, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/mockery of hiromaily/go-crypto-wallet.

Open the folder on GitHubat commit 798ab10

Compare with similar skills

Mockery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mockery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mockery this skillhiromaily/go-crypto-wallet128—~1.8kAutomated safety check: PassMIT
Test Writing WorkflowiOfficeAI/AionUi33k1 repos~1.2kAutomated safety check: PassApache-2.0
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Requirementsrizsotto/Bear6.5k—~2kAutomated safety check: PassGPL-3.0
Mutantmbj/mutant2.2k—~2kAutomated safety check: PassProprietary
Senior QAnicepkg/auto-company1953 repos~1.1kAutomated safety check: NotesNone

Similar skills

  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Requirements

    rizsotto/Bear

    Write, modify, or review a requirement file under docs/requirements -- pick the single owning file, keep the text contract-only, name IDs so they need no explanation, and verify cross-references and…

    6.5k GitHub stars~2k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Mutant

    mbj/mutant

    Run mutant, read mutation reports, fix alive mutations, and verify coverage.

    2.2k GitHub stars~2k tokensUpdated 8 days ago
    Testing & QAAuto-check passed
  • Senior QA

    nicepkg/auto-company

    Comprehensive QA and testing skill for quality assurance, test automation, and testing strategies for ReactJS, NextJS, NodeJS applications.

    195 GitHub starsUsed in 3 repos~1.1k tokens
    Testing & QAAuto-check: notes
  • OpenROAD Module Test Adder

    The-OpenROAD-Project/OpenROAD

    Adds integration or unit tests to an OpenROAD module: writes the Tcl test, generates golden files and registers it in both CMake and Bazel.

    3.2k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed

More from hiromaily/go-crypto-wallet

All 17 skills in this repo
  • Bch Development

    hiromaily/go-crypto-wallet

    Bitcoin Cash (BCH) API implementation rules. An agent skill from hiromaily/go-crypto-wallet.

    128 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Btc Terminology

    hiromaily/go-crypto-wallet

    Critical Bitcoin terminology rules to prevent confusion between bech32m (encoding) and taproot (address type).

    128 GitHub stars~1.3k tokensUpdated 5 mo ago
    Auto-check passed
  • DB Migration

    hiromaily/go-crypto-wallet

    Database schema and migration workflow. An agent skill from hiromaily/go-crypto-wallet.

    128 GitHub stars~652 tokensUpdated 5 mo ago
    Auto-check passed
  • Devops

    hiromaily/go-crypto-wallet

    CI/CD and DevOps workflow. An agent skill from hiromaily/go-crypto-wallet.

    128 GitHub stars~435 tokensUpdated 5 mo ago
    Auto-check passed
  • Docs Update

    hiromaily/go-crypto-wallet

    Documentation update workflow. An agent skill from hiromaily/go-crypto-wallet.

    128 GitHub stars~1.3k tokensUpdated 5 mo ago
    Auto-check passed
  • Fix PR Review

    hiromaily/go-crypto-wallet

    Address PR review comments by selecting appropriate skills based on modified files.

    128 GitHub stars~919 tokensUpdated 5 mo ago
    Auto-check passed

Categories

Questions about Mockery

What does Mockery do?

Mock generation workflow for go-crypto-wallet. An agent skill from hiromaily/go-crypto-wallet. Mockery is an agent skill from hiromaily/go-crypto-wallet. Mock generation workflow for go-crypto-wallet.

When should I use Mockery?

Mockery fits situations like: tasks that involve Test coverage.

How do I install Mockery in Claude Code?

Run `npx skills add hiromaily/go-crypto-wallet --skill mockery -a claude-code`. Or copy the skill folder (.claude/skills/mockery in hiromaily/go-crypto-wallet) into .claude/skills/mockery in your project. Claude Code loads it when a task matches its description.

How do I install Mockery in Codex?

Run `npx skills add hiromaily/go-crypto-wallet --skill mockery -a codex`. Or copy the skill folder (.claude/skills/mockery in hiromaily/go-crypto-wallet) into .agents/skills/mockery in your project. Codex loads it when a task matches its description.

Can I use Mockery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hiromaily/go-crypto-wallet --skill mockery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mockery, .gemini/skills/mockery, .github/skills/mockery and .opencode/skills/mockery in your project.

What does Mockery need to run?

Going by SKILL.md and its folder, Mockery needs the command-line tools its instructions call (make).

Does Mockery access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mockery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mockery use?

Mockery is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mockery use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mockery?

Skills that share tags, products or a category with Mockery: Test Writing Workflow (iOfficeAI/AionUi, 33k stars), Evaluate PR Tests (dotnet/maui, 23k stars), Requirements (rizsotto/Bear, 6.5k stars) and Mutant (mbj/mutant, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mockery?

hiromaily (a GitHub user) maintains it in hiromaily/go-crypto-wallet, which has 128 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on April 22, 2026.

Source: hiromaily/go-crypto-wallet on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.