From go-build-and-test
Use when Go build, test, toolchain, or CI parity failures surface — including stale GOROOT overrides, govulncheck stdlib patch findings, or TempDir race flakes, but not when the real issue is Go error-pattern design.
How this skill is triggered — by the user, by Claude, or both
Slash command
/go-build-and-test:go-build-and-testThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when a Go repository is failing to build or test and the next move is to verify toolchain state, reproduce the failure across the affected packages, and separate code defects from environment or CI-parity problems.
Use this skill when a Go repository is failing to build or test and the next move is to verify toolchain state, reproduce the failure across the affected packages, and separate code defects from environment or CI-parity problems.
go build, go test, or the repository's Go validation command is failing.GOROOT or GOTOOLDIR overrides, or GOPATH confusion may be loading the wrong standard library or tools.govulncheck reports standard-library findings that may already be fixed in a newer Go patch release.t.TempDir() cleanup races.| Situation | Use this skill? | Route instead |
|---|---|---|
go build ./... or go test ./... fails in one or more packages | Yes | - |
govulncheck reports only standard-library findings fixed in a later Go patch | Yes | Stay here and update the pinned Go toolchain before changing workflow policy |
Linux CI fails with a late TempDir cleanup or background-event race | Yes | Stay here and investigate test isolation |
The problem is func(string) *DomainError vs func(string) error or error-type design | No | go-error-patterns |
| The failure signal is vague and no one knows whether the cause is Go code, config, or infrastructure | No | systematic-debugging |
Required before editing
go version plus the active go env GOROOT GOTOOLDIR GOPATH GOVERSION output.GOROOT, GOTOOLDIR, or GOPATH.Helpful if present
go.mod, CI config, or toolchain setup.Only investigate if encountered
govulncheck findings are stdlib-only and already fixed upstream in a later patch release.t.TempDir() return before background goroutines or finished-event writes complete.go build ./... and go test ./... scoped to the affected packages instead of a single file.go version, go env GOROOT GOTOOLDIR GOPATH GOVERSION, and any exported shell overrides before changing code.go version, go env, and shell exports, and unset stale GOROOT or GOTOOLDIR overrides if they point at an older install than the active Go binary.govulncheck, check whether every finding is in the standard library and already fixed in a later patch release; if so, update the repo's Go toolchain pin first instead of adding allowlists or changing workflow wiring.t.TempDir() with invalid roots or background diagnostics, wait for late finished-event delivery before the test returns so Linux cleanup does not race pending writes.go-error-patterns or systematic-debugging instead of continuing here.govulncheck findings before checking whether a Go patch update fixes them.GOROOT or GOTOOLDIR exports just because go version looks correct; verify the full environment.go version and go env if the fix touched toolchain pins or environment overrides.go test ./... passes locally but fails on Linux with a TempDir cleanup error in our Go package."func(string) *ValidationError not satisfy func(string) error in Go?" (→ go-error-patterns)GOROOT or GOTOOLDIR is stale."govulncheck is red on a Dependabot PR, but the report only mentions standard-library packages."t.TempDir() cleanup."references/toolchain-environment-checklist.md — go env key matrix, stale-override reset commands, govulncheck stdlib-finding triage steps, and CI fixture-file audit../go-error-patterns/SKILL.md — adjacent Go skill for covariance and error-design questions../systematic-debugging/SKILL.md — route here when the failure is too ambiguous for a Go-specific triage workflowCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub matt-riley/lucky-hat --plugin go-build-and-test