go-testing-with-testify

go-testing-with-testify is a skill for Claude Code, Codex from n-n-code/n-n-code-skills. It costs 79 tokens per session (1,877 once invoked), scanned A, original, MIT.

A guide for writing and reviewing Go tests with Testify, a toolkit that adds assertions, mocks, and test suites to Go’s standard testing package.

In plain words
What is it for?
Use it for Go unit, integration, or HTTP-handler tests; refactoring test files; choosing between mocks and hand-written fakes; and checking failures with race or repeat runs.
Why use it?
It helps make tests clearer and more reliable, including tests that use tables, subtests, parallel execution, wrapped errors, or mocks, and helps investigate flaky tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it for Go unit, integration, or HTTP-handler tests; refactoring test files; choosing between mocks and hand-written fakes; and checking failures with race or repeat runs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/n-n-code/n-n-code-skills/go-testing-with-testify
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 n-n-code/n-n-code-skills --skill go-testing-with-testify
Clone the repo
git clone --depth 1 https://github.com/n-n-code/n-n-code-skills

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 go-testing-with-testify

README.md
[![agentmods](https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/go-testing-with-testify/github.svg)](https://agentmods.dev/skills/n-n-code/n-n-code-skills/go-testing-with-testify)
Your own site
<a href="https://agentmods.dev/skills/n-n-code/n-n-code-skills/go-testing-with-testify"><img src="https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/go-testing-with-testify/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 go-testing-with-testify

Your own site · 80×15
<a href="https://agentmods.dev/skills/n-n-code/n-n-code-skills/go-testing-with-testify"><img src="https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/go-testing-with-testify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,877 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.00079 $0.01877
Opus 5.5 $0.00032 $0.00751
Sonnet 5.5 $0.00016 $0.00375
Haiku 4.5 $0.00008 $0.00188

Measured 1mo ago against content hash 4a769cfa69a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-testing-with-testify 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 1mo 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.

.agents/skills/go-testing-with-testify/SKILL.md · 157 lines

How it starts

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

Go Testing With Testify

Turn a concrete behavior claim into useful Go test evidence. Preserve the repository's Go version, test framework, and supported execution environment.

Route And Select Activity

  • Implement or harden: edit the requested tests and any explicitly covered production seam. A test request does not automatically authorize an unrelated production refactor, new dependency, or external service.
  • Review: inspect tests and report prioritized findings, evidence, and consequences. Do not edit files or require remediation to complete a review.
  • Diagnose: reproduce the named failure in scope, distinguish a product defect from a test-apparatus defect, then fix it when the request includes repair.

Use coding-guidance-go for production Go or non-testify tests. Preserve Ginkgo, Gomega, go-cmp-only, and other intentional stacks. Module bootstrap or test-tool installation is separate from test authoring.

Add tester-mindset when claims, oracles, or test strategy are still unclear. Add backend-guidance or backend-systems-guidance only when a service, repository, queue, or other backend boundary needs that design guidance. Use security first for a security-led review and add security-identity-access when its identity scope applies. Routine tests of an already-defined permission rule can remain here.

Workflow

  1. Read the scoped tests, implementation, go.mod, fixtures, and relevant repository instructions. Identify the Go and testify versions, local test command, helpers, and available dependencies.
  2. Name the behavior claim, oracle, and smallest seam that can reveal a defect. Pure logic needs a unit check; protocol, query, serialization, or lifecycle behavior may need a real boundary. Passing checks support only their scope.
  3. Preserve the existing test shape when it is clear. Use table-driven subtests when cases share setup and assertions; use separate tests when they do not. Introduce helpers, fakes, mocks, or suites only for a concrete benefit.
  4. For implementation, exercise the real code and assert the behavior being claimed. For review, assess these choices without rewriting the tests.
  5. Validate the narrowest changed test or package, for example go test ./path/to/pkg -run '^TestName$' -count=1. Add race checks, repetition, shuffle, or integration runs when the failure mode needs them.
  6. Inspect failures before changing assertions, retry counts, or timeouts. Report the exact evidence and remaining uncertainty.

Read the full file on GitHub · 157 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed · -226 lines · +4 tokens per session 4a769cfa69a0
  2. 1mo ago First seen · 383 lines · 75 tokens per session scan A 4fbe5a7251ab

Subscribe to this mod's changes

go-testing-with-testify is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 1,877 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-08-31.

Related

Other skills, from other repositories

test-go

Write, review, and improve Go test code for this project. Use whenever generating, reviewing, or modifying Go tests - including when invoked by the Tester agent, the /test prompt, or any test-related request. Covers table-driven tests, subtests, t.Parallel(), test helpers with t.Helper(), error assertions via…

sergeyklay/.agents · 109 tokens

golang-stretchr-testify

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

aiskillstore/marketplace · 97 tokens

unit-test

A Go testing workflow for writing unit tests: small tests that check individual functions or components. It supports table-driven cases, where many inputs and expected results are organised in one test, and subtests.

johnqtcg/awesome-skills · 100 tokens

fuzzing-test

A Go testing guide for generating fuzz tests, which repeatedly try varied inputs to find crashes and unexpected behavior. It first checks whether the code is suitable for fuzzing.

johnqtcg/awesome-skills · 74 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-testing-quality

Use when writing or reviewing Go tests, adding coverage, benchmarking, or profiling a Go program. Not for CI/lint wiring (go-tooling-security) or non-Go tests.

fusengine/agents · 40 tokens