mockery-suite-tests

mockery-suite-tests is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 63 tokens per session (1,457 once invoked), scanned A, original, Apache-2.0.

A guide to testing Go code with test doubles, table-driven cases, and repository tests against real PostgreSQL. Test doubles are controlled replacements for dependencies, while table-driven tests run the same logic against many inputs.

In plain words
What is it for?
Use it when writing Go tests for several input cases, mocked interfaces, generated mocks, fakes, or code that reads and writes PostgreSQL.
Why use it?
It helps tests match the repository's existing mocking style instead of introducing an incompatible tool. It also keeps database-adapter tests realistic and makes multi-case behavior easy to cover.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing Go tests for several input cases, mocked interfaces, generated mocks, fakes, or code that reads and writes PostgreSQL.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/mockery-suite-tests
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add makifbaysal/tasktrooper --skill mockery-suite-tests
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mockery-suite-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/mockery-suite-tests/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/mockery-suite-tests)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/mockery-suite-tests"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/mockery-suite-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mockery-suite-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/mockery-suite-tests"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/mockery-suite-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01457
Opus 5.5 $0.00025 $0.00583
Sonnet 5.5 $0.00013 $0.00291
Haiku 4.5 $0.00006 $0.00146

Measured 5d ago against content hash ce1ee42a946c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mockery-suite-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

catalog/agents/backend-developer/skills/mockery-suite-tests/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Test Doubles & Table Tests

Overview

Table-driven tests and real-Postgres repository-adapter tests are non-negotiable everywhere. How test doubles are produced is not: follow the repository's own convention (rule repo-conventions-win) rather than importing Mockery into a repo that hand-writes testify mocks or uses gomock.

Core principle: multi-case behaviour is a table; a repository adapter test runs against real Postgres, never a mocked driver; mocks exist only at port boundaries.

Detect the repo's mocking approach first

ls .mockery.y*ml 2>/dev/null
grep -rlE 'Code generated by mockery|go.uber.org/mock' --include='*.go' . | head -3
  • .mockery.yml or files headed "Code generated by mockery" → Mockery v3: regenerate, don't hand-edit (see below).
  • go.uber.org/mock imports → gomock: regenerate with mockgen per the repo's go:generate directive, don't hand-edit.
  • Neither, but a test file defines type mockFoo struct implementing a port → the repo hand-writes testify mocks (or fakes). Follow that style; do not introduce a generator the repo doesn't already have. TaskTrooper's own server does exactly this (server/internal/port/mocks/llm_client.go).

Mockery v3 (when the repo already uses it)

  • Mocks come from the port interfaces, generated by Mockery v3. Names and location come from .mockery.yml; v3's defaults are Mock<Interface> in mocks_test.go inside the source package, constructor NewMock<Interface>(t) — don't assume a different naming scheme without checking the config.
  • Regenerate with the repo's own command (mockery, go generate ./..., or make mocks) — never hand-edit a generated mock.
  • Install Mockery from a pinned release binary (GitHub Releases, any OS) or brew install mockery on macOS; the project's own docs say not to go install mockery@latest.
  • A v2 .mockery.yaml migrates with mockery migrate; don't hand-port the config.
  • v3 generates an expecter API — use the typed EXPECT() methods, not raw On("MethodName", ...) string calls, so a renamed method breaks compilation instead of silently passing.

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed ce1ee42a946c
  2. 8d ago First seen · 106 lines · 63 tokens per session scan A 67aa501e3c9f

Subscribe to this mod's changes

mockery-suite-tests is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 63 tokens to every session and 1,457 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.

Related

Other skills, from other repositories

go-add-test

Add unit/integration tests to a GOB Go microservice following established project patterns. Triggers: "add test", "add tests", "criar teste", "novo teste", "test coverage", "testar", "write tests for", "escrever testes para".

JotJunior/cstk · 59 tokens

golang-testing-patterns

Modern Go testing patterns including table-driven tests, subtests, test organization, and best practices. Use when writing or refactoring tests, implementing test coverage, or when the user asks about Go testing approaches.

codeready-toolchain/tarsy · 47 tokens

go-development

CIEL's framework for idiomatic Go development, table-driven testing, and performance benchmarking.

jxoesneon/Ciel · 21 tokens

golang-testing

Provides a comprehensive guide for writing production-ready Golang tests. Covers table-driven tests, test suites with testify, mocks, unit tests, integration tests, benchmarks, code coverage, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, memory leaks, CI with GitHub…

yzfly/skills · 100 tokens

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use whenever writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Essential for testify assertions, mock expectations, argument matchers, call…

yzfly/skills · 96 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens