This teaches you to write Go tests the way Google and Uber do: table-driven tests with subtests, proper use of t.Error versus t.Fatal, and cmp.Diff for comparing complex types instead of assertion libraries. The normative guidance is opinionated but practical, like always printing "got" before "want" and never comparing error strings when you could check semantics with errors.Is. It includes a script to generate table test scaffolds and covers helpers, cleanup, and parallel execution. The "useful test failures" section nails something most guides skip: your error messages should be diagnosable without opening the source file.

skills.sh installs
1.4K
GitHub stars
193
last updated
Aug 21, 2026

Install

$ npx -y skills add cxuu/golang-skills --skill go-testing --agent claude-code

Installs into .claude/skills of the current project.

Files

Go Testing

Compatibility: Diff examples may use github.com/google/go-cmp.

Resource Routing

  • scripts/gen-table-test.sh - Run when generating a table-driven test scaffold.
  • assets/table-test-template.go - Use as a copyable table-test starting point.
  • references/TABLE-DRIVEN-TESTS.md - Read when choosing table tests, subtests, or parallel test patterns.
  • references/TEST-HELPERS.md - Read when writing helpers, fixtures, cleanup, or test doubles.
  • references/TEST-ORGANIZATION.md - Read when structuring packages, black-box tests, or larger test suites.
  • references/VALIDATION-APIS.md - Read when choosing t.Error, t.Fatal, cmp.Diff, or assertion style.
  • references/INTEGRATION.md - Read when testing external services, HTTP handlers, databases, or long-running setup.

Quick Reference

Sponsors

Details

Repository
github.com/cxuu/golang-skills
Categories
Testing & QA, Git & Pull Requests, Documentation, Debugging, Automation & Workflows, Go
First seen
May 16, 2026

More from cxuu/golang-skills

All 20
1charleswiltgen avataraxiom-testingcharleswiltgen/axiomUse when writing ANY test, debugging flaky tests, making tests faster, or choosing Swift Testing vs XCTest. Covers unit tests, UI tests, async testing, test arc1.4Kskills.sh installs
2tursodatabase avatartestingtursodatabase/tursoHow to write tests, when to use each type of test, and how to run them. Contains information about conversion of `.test` to `.sqltest`, and how to write `.sqlte1.3Kskills.sh installs
3astronomer avatartesting-dagsastronomer/agentsComplex DAG testing workflows with debugging and fixing cycles. Use for multi-step testing requests like "test this dag and fix it if it fails", "test and debug1.2Kskills.sh installs
4alirezarezvani avatarsecurity-pen-testingalirezarezvani/claude-skillsUse when the user asks to perform security audits, penetration testing, vulnerability scanning, OWASP Top 10 checks, or offensive security assessments. Covers s862skills.sh installs
5ruvnet avatartest-gapsruvnet/rufloDetect missing test coverage and generate test suggestions. Use when the user asks about coverage gaps, untested code, or what tests to write next; also after a755skills.sh installs
6dotnet avatarmcp-csharp-testdotnet/skillsTest C# MCP servers at multiple levels: unit tests for individual tools and integration tests using the MCP client SDK. USE FOR: unit testing MCP tool methods, 706skills.sh installs