PlugWiki

golang-testing Skill (samber) for Claude Code: Go Tests

Makes Claude write, review and debug Go tests with table-driven structure, parallel runs, fuzzing and goroutine-leak checks.

Installs
44.5K
on skills.sh
Stars
3.7K
on GitHub
Files
8
besides SKILL.md
Updated
Nov 2026
last repo commit

golang-testing makes Claude treat tests as executable specifications that pin down behaviour. It has four modes: write tests, review a diff, audit a whole suite (up to 3 sub-agents), and debug a failing or flaky test. It enforces table-driven tests with named subtests, build tags for integration tests, t.Parallel where safe, and goleak for goroutine leaks.

To scaffold tests it uses gotests, which SKILL.md lists as a dependency installed with go install. It covers fuzzing, testing/synctest, coverage, HTTP handler tests, mocking and testify as a helper.

Good for

  • Go developers who want solid tests for new or existing code
  • Reviewers checking a pull request's test changes
  • Teams chasing flaky or slow tests

Install golang-testing

Claude Code

  1. 1

    Copy this prompt.

    Install the golang-testing skill in Claude Code. Run this command:
    
    /plugin marketplace add samber/cc
    /plugin install cc-skills-golang@samber
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

The README says these skills are built as atomic, cross-referencing units, and that installing only a subset gives a partial and potentially inconsistent view of the guidelines. It recommends installing all the general-purpose skills together, which the plugin does. Its manifest lists no hooks or MCP servers, and the repo holds 46 skills. Use the skills CLI line only if you want just this one. Pick one route, not both.

From the project README. Source.

What's in the skill

When it loads

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber/cc-skills-golang@golang-benchmark`.

Sections in SKILL.md

  1. Best Practices Summary
  2. Test Structure and Organization
  3. File Conventions
  4. Naming Conventions
  5. Table-Driven Tests
  6. Common Pitfall: Assert Scope Leaking into Subtests
  7. Unit Tests
  8. Testing HTTP Handlers
  9. Goroutine Leak Detection with goleak
  10. testing/synctest for Deterministic Goroutine Testing
  11. Test Timeouts
  12. Benchmarks
  13. Go 1.26+: test artifacts
  14. Go 1.27+: stdversion runs automatically
  15. Parallel Tests
  16. Fuzzing

Key facts

Installs on skills.sh
44,450 (Nov 2, 2026)
License
MIT
Last commit
Nov 1, 2026
Skill version
1.4.0

What it includes

  • Scaffolds table-driven tests with gotests, then adds edge cases and error paths

    Works through the code under test in order.

    Runs code · Write mode

  • Checks a PR's tests for coverage of new behaviour, assertion quality and flakiness

    Focuses on the diff.

    Read · Review mode

  • Up to 3 sub-agents: unit quality, integration isolation, goroutines and races

    Looks for order-dependent tests, missing t.Parallel() and coupling to implementation details.

    Read · Audit mode

  • Reproduce a failure, isolate the assertion, trace the root cause

    Works sequentially on a failing or flaky test.

    Runs code · Debug mode

  • Test scaffolding tool, installed with go install ...@latest

    SKILL.md lists github.com/cweill/gotests/gotests@latest as a dependency.

    Runs code · gotests

  • Named subtests, build tags, goleak.VerifyTestMain, race detection in CI

    Also: test files are named after the source file, mock interfaces not concrete types, keep unit tests under 1 ms.

    Testing practices

  • Deterministic tests for goroutines, timers and context cancellation (Go 1.25+)

    Time only advances when every goroutine is blocked.

    testing/synctest

  • Benchmarks, coverage, examples, helpers, HTTP, integration tests, mocking

    Seven files in references/.

    Read · Reference guides

From the official docs

Permissions

Low risk

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It installs a Go tool at @latest

    gotests is installed with go install ...@latest. Pin a version if you need repeatable setups. github.com

  • It can edit files and run go and git

    The header lists Edit, Write and Bash for go, gotests, golangci-lint and git. Review changes before committing. github.com

  • The integration guide runs docker-compose

    references/integration-testing.md shows Go test code that runs `docker-compose up -d` before the tests and `docker-compose down -v` after, which removes the volumes. Check what a test run starts and stops before you approve it. github.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyReview mode looks at a diff, but the skill's tool list includes Edit and Write.
Talks togo install fetches gotests from the Go module proxy
Scopes
  • The SKILL.md header lists these tools: Read, Edit, Write, Glob, Grep, go, gotests, golangci-lint, git, sub-agents and AskUserQuestion

  • Edits Go files in your project

Questions

How do I install golang-testing?

Use the install box above. The plugin route installs the whole Go skill set, and the skills CLI route installs only this skill. Pick one so you do not get every skill twice.

Does it install anything?

SKILL.md lists gotests as a dependency and gives go install github.com/cweill/gotests/gotests@latest. The header's install entry names the same package. That downloads code from the Go module proxy, so install it yourself if you prefer to review it first.

Does it need other skills?

It works on its own, but SKILL.md points to 6 other skills in the same repo: golang-benchmark, golang-concurrency, golang-continuous-integration, golang-database, golang-lint, golang-stretchr-testify. The README says installing only a subset gives a partial and potentially inconsistent view, so install the set together.

Does it work in the Claude app, Codex or Cursor?

The SKILL.md header says it is designed for Claude Code, Codex or a similar harness, and the README says the set is built for Claude Code, Codex, Gemini, Copilot, Antigravity and Cursor, with an install section for each. The README does not describe a Claude app install.

Does it need an API key?

SKILL.md names no key. It needs the go tool on your PATH and gotests (installed with go install). The skill folder holds SKILL.md, reference guides and an evals file, with no scripts.

Is it safe to use?

It bundles no scripts. Its header lets Claude edit and write files, ask you questions and run go, gotests, golangci-lint and git commands, so Claude can change your tests and run them. Integration tests may start whatever services your project sets up, so read what it runs.

golang-testing vs golang-stretchr-testify and golang-benchmark?

SKILL.md sends testify-specific APIs to golang-stretchr-testify and measurement methodology to golang-benchmark. This skill covers the overall testing approach.

Information

updated Nov 2, 2026

Folder
skills/golang-testing

samber/cc-skills-golangskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 13
  1. cc-skills-golang · github.com
  2. cc-skills-golang README · github.com
  3. plugin.json · github.com
  4. skills CLI commands · github.com
  5. README.md#-how-to-use · github.com
  6. SKILL.md · github.com
  7. benchmarks.md · github.com
  8. coverage.md · github.com
  9. examples.md · github.com
  10. helpers.md · github.com
  11. http-testing.md · github.com
  12. integration-testing.md · github.com
  13. mocking.md · github.com

Updated Nov 2, 2026.