shepherdjerred/monorepo/go-helper
Claude Code and agent skill by shepherdjerred/monorepo
- community
Checking that the SKILL.md file is still in the repository.
Current Go development guidance for modules, toolchains, workspaces, testing, fuzzing, concurrency, profiling, security, and Go tooling. Use when writing or reviewing Go, go.mod, go.work, Go CI, tests, performance work, or Go upgrades.
Install
npx vskill@latest install shepherdjerred/monorepo/go-helperSKILL.md
Go Helper
Use the module's declared Go language version, propagate errors, keep goroutine ownership explicit, and run the repository's real verification commands. Distinguish read-only module checks from operations that edit files or fetch dependencies.
Current baseline
Verified 2026-08-03: current stable is Go 1.26.5.
Go 1.26 added expression-valued new, the default Green Tea garbage collector, lower cgo overhead, crypto/hpke, and other library/tool changes. JSON v2 remains experimental behind GOEXPERIMENT=jsonv2; SIMD work is experimental and platform-specific.
The go directive is a strict minimum language/toolchain version. toolchain suggests a toolchain for the main module. Module-version boundaries also control behavior such as Go 1.22 loop variables and Go 1.23 timer channels.
Read references/releases.md for the 44-page research ledger. Read references/modules-and-tooling.md for module, workspace, toolchain, lint, and dependency operations. Read references/testing-and-performance.md for tests, fuzzing, races, synctest, traces, profiles, and PGO. Read references/patterns-and-security.md for errors, goroutines, HTTP, paths, logging, randomness, and vulnerability checks.
Command authority
Read-only or check-oriented commands:
go mod tidy edits go.mod and go.sum. Dependency and download commands can mutate caches and involve network state. Review their effect instead of labeling them read-only.
Focused verification
Use the package's actual task when one exists. A generic Go project baseline is:
Run the repository-pinned golangci-lint command if configured. Do not prescribe a fixed number of linters; its catalog and defaults are versioned.
Modules and toolchains
The go line is the minimum required version and selects language behavior. GOTOOLCHAIN controls whether the bundled, PATH, or downloadable toolchain is selected.
Use go get for dependency changes and go mod tidy to reconcile the module graph. Review both go.mod and go.sum. Avoid a broad go get -u ./...; upgrade an intentional set, read release notes, and verify the resulting graph.
For a non-mutating tidy check:
Errors
Return errors with context and preserve identity with %w when callers may inspect them:
Do not discard Close, ReadAll, Write, trace, or server errors when failure can affect correctness. For cleanup whose error matters, call and return it explicitly rather than relying only on defer.
Goroutine ownership
Every goroutine needs a lifecycle: completion, cancellation, or a process-long owner. Thread context.Context through request-scoped operations; never store it in a long-lived struct solely for convenience.
Prefer errgroup or an equivalent structured owner when sibling failure should cancel work. Bound concurrency and preserve output ordering when the contract requires it.
Tests and benchmarks
Go 1.25 stabilized testing/synctest; the stable API is synctest.Test(t, func(t *testing.T) { ... }) plus synctest.Wait(). Fake time advances only when goroutines in the bubble are durably blocked.
Use B.Loop() for current benchmarks. Avoid exact universal race-detector or benchmark overhead claims. The race detector only finds races executed on a supported platform.
Fuzz failures are stored at testdata/fuzz/FuzzName/<hash>. Keep them as regression corpus entries.
Modern APIs
- Iterator functions and
iter.Seq/Seq2support range-over-function patterns. Do not yield afteryieldreturns false. mapsandslicesexpose iterator-producing and consuming helpers.unique.Makecanonicalizes comparable values into handles.math/rand/v2is non-cryptographic randomness.os.Rootconfines supported file operations against symlink path escapes.runtime/trace.FlightRecorderprovides bounded recent trace data; checkStartandWriteToerrors and callStop.crypto/hpkeimplements the RFC 9180 DHKEM suites. Hybrid post-quantum KEMs require a separate specification; use protocol-specific expertise before designing cryptography.
HTTP and profiling
Check every server error. Bind diagnostic endpoints to an operator-only interface and never expose net/http/pprof unauthenticated to the public network.
Block and mutex profiles require nonzero profiling rates. CPU, heap, goroutine, block, and mutex profiles answer different questions.
Representative production CPU profiles can drive PGO through default.pgo. A profile must match the workload; do not treat PGO as a universal speed switch.
Security
- Use
crypto/randfor secrets;math/rand/v2is for non-security randomness. - Use
os.Rootor equivalent confinement for untrusted relative paths. - Keep private module configuration in
GOPRIVATE,GONOPROXY, andGONOSUMDBas appropriate.GONOSUMCHECKdoes not exist. - In source mode, run
govulncheckfor known vulnerabilities reachable from application call paths. Binary mode reports vulnerable symbols but does not reconstruct those call paths. - Treat imported pprof handlers, cgo, templates, archive extraction, and subprocess arguments as security boundaries.
- Use structured
log/slogfields and never log secrets.
Review checklist
- Verify Go stable, the module
goline, and selected toolchain. - Use
go mod tidy -difffor a non-writing module check. - Review intentional dependency changes and both module files.
- Propagate meaningful errors, including cleanup and server failures.
- Give every goroutine an owner and cancellation path.
- Use exact tests, current
synctest, correct fuzz corpus paths, and workload-qualified performance claims. - Keep profiling endpoints private and check trace/profile errors.
- Use current golangci-lint v2 configuration and canonical gopls setting names.
- Separate experimental JSON v2 and SIMD behavior from stable defaults.
- Run
govulncheckand use cryptographic randomness for secrets.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/dotfiles/dot_agents/skills/go-helper/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shepherdjerred/monorepo/go-helper)