go-testing
Skill0 starsChanged 2 months agoMITView on GitHub
Guides agents through authoring, running, and debugging Go tests using table-driven tests, subtests (t.Run), and race detection (-race).
13 other projects use a version of this.
Adopted by
Most recently taken up by
- Integralist/agent-skillstheir own version, first seen Nov 6, 2026
- h0rn3t/golang-skillstheir own version, first seen Nov 5, 2026
- svg153/skillstheir own version, first seen Nov 1, 2026
- martinhg/capiko-aitheir own version, first seen Oct 20, 2026
- els0r/skillstheir own version, first seen Oct 13, 2026
- yuanJewel/skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use go-performance, chained-pr and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
els0rSkillgo-performance
Go performance analysis: memory allocation, CPU bottlenecks, concurrency contention, struct alignment, escape analysis, and benchmarking patterns. Use this skill whenever writing performance-sensitive Go code, reviewing Go code for efficiency, discussing allocations or GC pressure, benchmarking, profiling with pprof, or optimizing hot paths. Also trigger when the user mentions sync.Pool, atomic operations, pre-allocation, or escape analysis — even without saying "performance."
Also in 4 projects that use this
joeldevzSkillchained-pr
Split large changes (>400 lines OR >5 slices) into a series of reviewable PRs. Two strategies — stacked-to-main and feature-branch-chain. Prevents the 100-conflict merge disaster.
Also in 3 projects that use this
wpankSkillgo-concurrency
Production Go concurrency patterns — goroutines, channels, sync primitives, context, worker pools, pipelines, and graceful shutdown. Use when building concurrent Go applications or debugging race conditions.
Also in 4 projects that use this
joeldevzSkillwork-unit-commits
Commit discipline. Each commit is a self-contained, reviewable work unit — code + tests + docs together. Stops the 190-commit PR disaster before it starts.
Also in 3 projects that use this
Gentleman-ProgrammingSkillbranch-pr
Also in 3 projects that use this
Gentleman-ProgrammingSkillissue-creation
Also in 3 projects that use this
- +2 more from joeldevz
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- Gentleman-Programming/Gentleman.Dots★ 2ksame name
- alex-ilgayev/MCPSpy★ 519same name
- Rain-kl/OpenFlare★ 298same name
- Integralist/agent-skills★ 23same name
- h0rn3t/golang-skills★ 7same name
- martinhg/capiko-ai★ 2same name
- yuanJewel/skills★ 2same name
- AllThingsSmitty/proven-skills★ 1same name
- els0r/skills★ 1same name
- svg153/skills★ 1same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- bug-reproducerSkill
- claim-checkerSkill
- command-failure-diagnoserSkill
- config-risk-reviewerSkill
- csv-validatorSkill
- deployment-checklist-makerSkill
- diff-reviewerSkill
- factual-summarizerSkill
- field-extractorSkill
- api-contract-testerSkill
- database-migration-helperSkill
- security-vulnerability-fixerSkill
- git-commit-stagerSkill
- git-conflict-resolverSkill
- github-actions-debuggerSkill
- github-issue-triagerSkill
- github-pr-creatorSkill
- github-pr-reviewerSkill
- go-code-qualitySkill
- go-lint-and-vetSkill
- json-schema-converterSkill
- lint-and-typecheckSkill
- meaning-preserving-editorSkill
- meeting-notes-to-actionsSkill
- minimal-bug-fixSkill
- option-comparatorSkill
- py-code-qualitySkill
- py-lint-and-typecheckSkill
- py-testingSkill
- readme-writerSkill
- regression-test-writerSkill
- release-notes-drafterSkill
- repo-inspectorSkill
- research-briefSkill
- reversible-cleanup-plannerSkill
- rust-clippy-checkSkill
- rust-code-qualitySkill
- rust-testingSkill
- small-refactorSkill
- status-updateSkill
- step-by-step-tutorialSkill
- step-decomposerSkill
- tabular-analyzerSkill
- task-briefSkill
- test-runner-debuggerSkill
- ts-code-qualitySkill
- ts-lint-and-typecheckSkill
- ts-testingSkill
- skill-templateSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill when:
- Very specific: line 20
Do not use for Python or TS tests.
- Very specific: line 21
Do not use for static linting.
- Very specific: line 28
If package_path is missing: default to ./....
- Distinctive: line 29
Never write empty test functions without assertions.
- Distinctive: line 32
Follow these numbered actions:
- Very specific: line 38
Look for t.Errorf("got %v, want %v", got, want) outputs.
- Very specific: line 45
If concurrency is tested: always pass -race flag.
- Very specific: line 46
When writing table tests: use for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { ...
- Distinctive: line 72
Stop and ask the user when:
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go Testing (go test)
Guides agents through executing, isolating, and debugging Go test suites. Enforces canonical table-driven test patterns, subtests (t.Run), and data race detection (-race).
1. Purpose
Execute and debug Go tests. A "Table-Driven Test" iterates over a slice of test case structs containing name, inputs, and expected outcomes.
2. When to Use
Use this skill when:
- Running tests in Go projects (
go test ./...). - Running a single targeted Go test using
-run. - Checking for concurrent race conditions using
go test -race.
3. When Not to Use
- Do not use for Python or TS tests; use
py-testingorts-testing. - Do not use for static linting; use
go-lint-and-vet.
4. Required Inputs
package_path: Go package path (e.g../internal/author./...).test_name: Optional regex pattern for-run.
5. Missing-Input Behavior
- If
package_pathis missing: default to./.... - Never write empty test functions without assertions.
6. Procedure
Follow these numbered actions:
- Action 1: Run Targeted Test
- Execute:
go test -v -run "^<test_name>$" <package_path>
- Execute:
- Action 2: Check for Concurrency Data Races
- Execute:
go test -race <package_path>
- Execute:
- Action 3: Trace Assertion Failure
- Look for
t.Errorf("got %v, want %v", got, want)outputs.
- Look for
- Action 4: Apply Fix & Verify
- Re-run test until
PASS.
- Re-run test until
- Action 5: Run Entire Package Suite
- Execute
go test ./....
- Execute
7. Decision Rules
- If concurrency is tested: always pass
-raceflag. - When writing table tests: use
for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { ... }) }.
8. Output Format
Emit the report using this template:
### Go Test Report: [Package]
- **Command**: `go test -v -run "[pattern]" [package]`
- **Status**: [PASS | FAIL]
- **Race Check**: [PASS | DETECTED]
#### Results
- [Summary of passed/failed tests]9. Verification Checklist
go testexecuted with clean PASS.go test -racepasses with zero data races.- Tests follow table-driven structure.
10. Common Failures and Recovery
| Failure Symptom | Cause | Recovery Action |
Loop variable capture in t.Parallel() | Pre-Go 1.22 loop closure | Bind tc := tc inside loop body. |
11. Stop or Escalation Conditions
Stop and ask the user when:
- Tests require external CGO bindings or proprietary database connections.
12. Examples
Example 1: Successful Execution
Input:
Package: ./pkg/math
Test: TestAddOutput:
### Go Test Report: ./pkg/math
- **Command**: `go test -v -run "^TestAdd$" ./pkg/math`
- **Status**: PASS
- **Race Check**: PASS
#### Results
- `=== RUN TestAdd`
- `--- PASS: TestAdd (0.00s)`Example 2: Ambiguous or Missing Input
Input:
Test go.Output:
### Go Test Report: Halted - Ambiguous Package
- **Status**: Halted
Please specify the Go package to test (e.g. `./cmd/...` or `./internal/auth`).Example 3: Expected Final Output
Output:
### Go Test Report: ./internal/cache
- **Command**: `go test -race ./internal/cache`
- **Status**: PASS
- **Race Check**: PASSDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

