Skip to content
Skill

Go test quality

Gives your agent Go testing patterns for subtests, mocks, fuzzing and concurrency

Go test quality is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
90
Last commit
License
MIT
Listing updated

Similar skills

About Go test quality

This skill sets out a test-design approach for Go projects: tests that check observable behavior rather than internal steps, descriptive test names, subtests for grouped scenarios, and helper functions that call t.Helper and use t.Cleanup. It also covers when to parallelise tests, when to avoid mocking, and how to pick between table-driven tests, httptest, golden files, testcontainers and fuzzing. Guidance on testing/synctest, goleak and t.Context helps the agent handle time-dependent and concurrent code without sleeps.

The agent follows a short design summary and loads deeper reference files on demand for helpers, integration testing, and concurrency and benchmarks. The skill ends with an anti-pattern list and a verification checklist covering assertions, race detection and coverage use. It runs go test and gofmt commands and reads and edits files in the repository.

The skill needs the Go toolchain, and container-based integration tests need Docker. It is aimed at Claude Code and similar coding agents working on Go code.

When your agent uses it

Go testing patterns for production-grade code: subtests, test helpers, fixtures, golden files, httptest, testcontainers, fuzz testing, and testing/synctest. Covers mocking strategies, test isolation, coverage analysis, and test design philosophy. Use when writing tests, improving coverage, reviewing test quality, setting up test infrastructure, or choosing a testing approach. Trigger examples: "add tests", "improve coverage", "write tests for this", "test helpers", "mock this dependency", "integration test", "fuzz test", "flaky test", "synctest", "goroutine leak in tests". Not for: benchmarking methodology (go-performance-review), security testing (go-security-audit), table-driven patterns (go-test-table-driven).

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 4 files (22 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.

What it does

Test design principles
Guidance on testing observable behavior, naming tests after scenarios, and keeping each test standalone.
Subtests and helpers
Patterns for grouping scenarios with t.Run and writing helpers with t.Helper, functional options and t.Cleanup.
Mocking rules
Advice on small hand-written mocks, function injection, and when to test real code instead of mocking it.
Integration and fuzz testing
Coverage of httptest, testcontainers, build tags, golden files and fuzz tests for untrusted input.
Concurrency testing
Use of testing/synctest and goleak to test goroutines without time.Sleep and to catch leaks.
Coverage and parallelism
Commands for race detection and coverage profiles, plus rules for safe use of t.Parallel.

Good for

  • Write unit tests for a Go service function
  • Improve test coverage in a Go package
  • Set up httptest-based tests for HTTP handlers
  • Fix a flaky Go test that relies on time.Sleep
  • Add fuzz tests for a Go parser

Go test quality FAQ

What tools does the skill need?

It needs the Go toolchain. Container-based integration tests require Docker.

Which Go version features does Go test quality use?

It refers to features from Go 1.24 onward, such as t.Context and b.Loop, and some Go 1.25 to 1.27 APIs such as testing/synctest.

Does Go test quality run any scripts?

No scripts are included. It is a set of instructions and reference files.

Does Go test quality run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Go test quality?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Go test quality?

The closest alternatives to Go test quality are Go test table driven, Cpp testing, Go performance review, Go code review and Go coding standards.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from eduardo-sl/go-agent-skills

  1. Guides Go agents in designing HTTP REST APIs, handlers, middleware and shutdown

    • Open source
    • 90 GitHub stars
    • Developer tools
  2. Reviews Go project structure, dependency direction and module boundaries

    • Open source
    • 90 GitHub stars
    • Developer tools
  3. Guides an AI agent to build Go command-line tools with clean flags, streams and exit codes

    • Open source
    • 90 GitHub stars
    • Developer tools
  4. Guides Go code toward constructor injection, explicit wiring and no global state

    • Open source
    • 90 GitHub stars
    • Developer tools
  5. Guides Go code toward idiomatic design patterns like functional options and factories

    • Open source
    • 90 GitHub stars
    • Developer tools
  6. Guides building Go GraphQL servers with gqlgen, covering N+1 batching and query limits

    • Open source
    • 90 GitHub stars
    • Developer tools