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
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
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
- Best Practices Summary
- Test Structure and Organization
- File Conventions
- Naming Conventions
- Table-Driven Tests
- Common Pitfall: Assert Scope Leaking into Subtests
- Unit Tests
- Testing HTTP Handlers
- Goroutine Leak Detection with goleak
- testing/synctest for Deterministic Goroutine Testing
- Test Timeouts
- Benchmarks
- Go 1.26+: test artifacts
- Go 1.27+: stdversion runs automatically
- Parallel Tests
- Fuzzing
Key facts
- Installs on skills.sh
- 44,450 (Nov 2, 2026)
- GitHub stars
- 3,749 (Nov 2, 2026)
- License
- MIT
- Last commit
- Nov 1, 2026
- Skill version
- 1.4.0
- skills.sh checks
- Gen Agent Trust Hub pass, Socket pass, Snyk pass
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 modeChecks a PR's tests for coverage of new behaviour, assertion quality and flakiness
Focuses on the diff.
Read ·
Review modeUp 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 modeReproduce a failure, isolate the assertion, trace the root cause
Works sequentially on a failing or flaky test.
Runs code ·
Debug modeTest scaffolding tool, installed with go install ...@latest
SKILL.md lists github.com/cweill/gotests/gotests@latest as a dependency.
Runs code ·
gotestsNamed 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 practicesDeterministic tests for goroutines, timers and context cancellation (Go 1.25+)
Time only advances when every goroutine is blocked.
testing/synctestBenchmarks, 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-only | Review mode looks at a diff, but the skill's tool list includes Edit and Write. |
|---|---|
| Talks to | go install fetches gotests from the Go module proxy |
| Scopes |
|
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
- Repository
- samber/cc-skills-golang
- Folder
skills/golang-testing
Sources
Docs, issue trackers and discussions this page is built from.
Show all 13Hide
- cc-skills-golang · github.com
- cc-skills-golang README · github.com
- plugin.json · github.com
- skills CLI commands · github.com
- README.md#-how-to-use · github.com
- SKILL.md · github.com
- benchmarks.md · github.com
- coverage.md · github.com
- examples.md · github.com
- helpers.md · github.com
- http-testing.md · github.com
- integration-testing.md · github.com
- mocking.md · github.com