go-test

go-test is a skill for Claude Code from aks-builds/quality-skills. It costs 132 tokens per session (2,973 once invoked), scanned A, original, MIT.

A guide for testing Go programs with Go’s standard testing package and related libraries such as testify, go-cmp, and httptest. It covers common test styles including table-driven tests, benchmarks, fuzz tests, and race checks.

In plain words
What is it for?
Use it to design, debug, and improve Go unit, HTTP, benchmark, fuzz, and concurrency tests.
Why use it?
It helps write idiomatic, deterministic Go tests and avoid invented APIs or incorrect command options. It also highlights issues involving concurrency and HTTP clients or servers.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the quality-skills plugin — 57 skills shipped together

Good fit Use it to design, debug, and improve Go unit, HTTP, benchmark, fuzz, and concurrency tests.

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

Made for: Claude Code.

Or install quality-skills, the plugin that ships this one along with the rest of its 57 skills.

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-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/aks-builds/quality-skills/go-test/github.svg)](https://agentmods.dev/skills/aks-builds/quality-skills/go-test)
Your own site
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/go-test"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/go-test/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-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/go-test"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/go-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,973 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.00132 $0.02973
Opus 5 $0.00066 $0.01486
Sonnet 5 $0.00026 $0.00595
Haiku 4.5 $0.00013 $0.00297

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

Security

Grade A, and why

go-test 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 10d 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.

skills/go-test/SKILL.md · 330 lines

How it starts

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

Go Testing

You are an expert in Go's testing package and the surrounding ecosystem (testify, go-cmp, httptest, fuzz tests, benchmarks). Your goal is to help engineers write idiomatic Go tests — table-driven, parallel-safe, deterministic — without fabricating package APIs or go test flags. When uncertain, point the reader to pkg.go.dev/testing and the relevant package docs.

Initial Assessment

Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:

  • Go version — fuzz testing is generally available since 1.18; some recent additions (e.g., testing/synctest) are in newer versions.
  • Assertion style — built-in t.Errorf / t.Fatalf is idiomatic; testify (require / assert) is widely used for cleaner assertions; go-cmp for deep-diff comparisons.
  • Module structure — standard pkg/, cmd/, internal/ Go layout.
  • HTTP testingnet/http/httptest for in-process servers, gock / community libs for client-side mocking.
  • Concurrencygo test -race is the single biggest leverage point; ensure it runs in CI.

If the file does not exist, ask: Go version, assertion style preference, packages under test (mostly libraries vs HTTP services), and CI race-detector status.


Why Go's testing

  • Stdlib, zero-deps — Go ships with everything needed for basic testing.
  • Fast — Go's compile + test cycle is among the fastest in any language.
  • -race flag — built-in data race detector, almost free, catches real bugs.
  • Subtests / table-driven — idiomatic pattern for boundary coverage.
  • Fuzzing built ingo test -fuzz for property-based coverage of byte / string inputs.
  • Benchmarkstesting.B for micro-perf with go test integration.

When not to rely on stdlib alone:

  • Need cleaner assertions / deep equality with diff → testify or go-cmp.
  • Need HTTP mocking with rich matchers → community packages.
  • Need behavior-driven syntax → Ginkgo (less common but real ecosystem).

Read the full file on GitHub · 330 lines

Files

What ships with it

1 file 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. 10d ago First seen · 330 lines · 132 tokens per session scan A 3d57c6d127ba

Subscribe to this mod's changes

go-test is a skill published in the GitHub repository aks-builds/quality-skills (2 stars, last pushed today), licensed MIT. It adds 132 tokens to every session and 2,973 once invoked, about $0.0007 per session on Opus 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

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

go-testing

Use when writing or fixing Go tests — table-driven cases, parallel safety, helpers, fakes, fuzzing, deterministic time (testing/synctest), goroutine leak detection (goleak), HTTP handlers. Apply proactively when a function gets a new test or a test is flaky. Benchmark methodology: see go-benchmark.

muratmirgun/gophers · 70 tokens

go-testing-with-testify

Write, review, or harden Go tests using stretchr/testify assert, require, mock, or suite. Use for assertion choice, test doubles, subtests, concurrency, and flake triage in an existing Go test setup. Use coding-guidance-go for production code or non-testify tests and tester-mindset for test strategy without concrete…

n-n-code/n-n-code-skills · 79 tokens

timeouts-and-async

Make Ginkgo specs interruptible and test asynchronous behavior — SpecContext/context.Context cancellable nodes, NodeTimeout/SpecTimeout/GracePeriod, the --timeout flag, Abort and SIGINT behavior, Gomega Eventually/Consistently (the func(g Gomega) form, .WithContext), and the defer GinkgoRecover() rule for goroutines.…

onsi/ginkgo · 106 tokens

setup

Wire Ginkgo into a Go package — install the ginkgo CLI and Ginkgo+Gomega, ginkgo bootstrap to generate the suitetest.go (TestXxx/RegisterFailHandler(Fail)/RunSpecs), the package xxxtest convention, dot-import alternatives (aliased import, dsl/ subpackages, --nodot), ginkgo generate, and testing.T interop via…

onsi/ginkgo · 118 tokens