Go Testing Patterns

Go Testing Patterns is a skill for Claude Code, Codex from niels-emmer/myace. It costs 24 tokens per session (346 once invoked), scanned A, original, MIT.

A collection of patterns for testing Go programs, including table-driven cases, fakes, cleanup, HTTP test servers, and concurrency checks. Go is a programming language with built-in support for running tests and detecting data races.

In plain words
What is it for?
Use it when writing or reviewing Go tests, fixing flaky tests, testing concurrent code, or checking for data races and leaked goroutines.
Why use it?
It helps tests remain readable, deterministic, and useful when behaviour changes. It avoids fragile waits and real service calls that can make tests flaky.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Use it when writing or reviewing Go tests, fixing flaky tests, testing concurrent code, or checking for data races and leaked goroutines.

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

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 Patterns

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/go-testing-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/go-testing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 346 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.00024 $0.00346
Opus 5.5 $0.00010 $0.00138
Sonnet 5.5 $0.00005 $0.00069
Haiku 4.5 $0.00002 $0.00035

Measured today against content hash bbfaed833923, 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 Patterns 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 today.

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.

collections/additional/go-developer/skills/go-testing-patterns/SKILL.md · 30 lines

What it actually says

Purpose

Keep Go tests readable, deterministic and race-clean.

When to use it

When adding tests, fixing a flaky test, or reviewing a change whose tests rely on sleeps or shared state.

Checklist

  • Tables: named cases in a slice, run each with t.Run; mark parallel-safe cases with t.Parallel.
  • Helpers: call t.Helper; use t.Cleanup for teardown and t.TempDir for files.
  • Fakes over mocks: define small interfaces at the consumer and use hand-written fakes; avoid heavy mock frameworks unless the project already uses one.
  • Time: inject a clock or use short deadlines through context, never time.Sleep to wait for another goroutine.
  • Concurrency: assert with channels, WaitGroup or errgroup; run with -race and, for suspected leaks, a goroutine-leak check.
  • HTTP: use httptest for handlers and servers; do not call real services.
  • Golden files: keep them small, reviewed, and regenerated by an explicit flag.

Expected output

Tests that fail only when behaviour changes and that stay green under the race detector.

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. today First seen · 30 lines · 24 tokens per session scan A bbfaed833923

Subscribe to this mod's changes

Go Testing Patterns is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 346 once invoked, about $0.0001 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-11-29.

Related

Go Testing Patterns compared with skills from other repositories

Go Testing Patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Go Testing Patternsniels-emmer/myaceSkill1yesterdayMITA24Claude Code, Codex
idiomatic-goTypeFox/agent-skillsSkill51mo agoMITA137Claude Code
go-documentationTypeFox/agent-skillsSkill51mo agoMITA98Claude Code
loom-golangcosmix/loomSkill66todayMITA31Claude Code, Codex
loom-ccosmix/loomSkill66todayMITA25Claude Code, Codex
go-testing-mistakesv0lka/skillsSkill32todayMITA126Claude Code, Codex
encore-go-testingencoredev/skillsSkill3110d agoApache-2.0A47Claude Code