From go-guidelines
Applies Go best practices for performance, modern syntax, generics, patterns, testing, error handling, and concurrency when writing or reviewing Go code.
npx claudepluginhub mhmtszr/go-guidelines --plugin go-guidelinesThis skill uses the workspace's default tool permissions.
!`grep -rh "^go " --include="go.mod" . 2>/dev/null | cut -d' ' -f2 | sort | uniq -c | sort -nr | head -1 | xargs | cut -d' ' -f2 | grep . || echo unknown`
Applies modern Go syntax guidelines and features (slices, maps, cmp, min/max, etc.) based on project's detected Go version from go.mod. Avoids outdated patterns.
Reviews Go code against style guide, focusing on critical bugs, race conditions, and maintainability issues. Use for PRs, feature branches, or completed work reviews.
Applies idiomatic Go best practices for coding, PR reviews, and codebase audits. Covers errors, interfaces, concurrency, testing, organization, performance; routes to specialized skills.
Share bugs, ideas, or general feedback.
!grep -rh "^go " --include="go.mod" . 2>/dev/null | cut -d' ' -f2 | sort | uniq -c | sort -nr | head -1 | xargs | cut -d' ' -f2 | grep . || echo unknown
DO NOT search for go.mod files or try to detect the version yourself. Use ONLY the version shown above.
If version detected (not "unknown"):
If version is "unknown":
Read ONLY the reference file(s) relevant to your current task. Do NOT load all files at once.
When reading reference files, stop at the detected Go version boundary — ignore features from newer versions.
| When you are... | Read this reference |
|---|---|
| Using version-specific Go syntax or idioms | references/modern-syntax.md |
| Optimizing performance, struct layout, escape analysis | references/performance.md |
| Working with goroutines, channels, sync, select, false sharing | references/concurrency.md |
| Writing HTTP servers, shutdown, health checks, middleware, interfaces, io.Reader | references/patterns.md |
| Writing tests, mocks, benchmarks, fuzz tests | references/testing.md |
| Handling errors, wrapping, custom error types | references/error-handling.md |
| Working with slices, maps, append, memory leaks | references/slices-and-maps.md |
| Using context.Context, values, cancellation, timeouts | references/context-patterns.md |
| Using generics, type parameters, constraints | references/generics.md |
| Debugging subtle bugs, nil traps, shadowing, sync copying, defer, time | references/pitfalls.md |
Multiple topics may apply. For example, writing a concurrent function with tests: load modern-syntax.md + concurrency.md + testing.md.
After making Go code changes, run static analysis and tests on the changed packages:
which golangci-lint >/dev/null 2>&1 && golangci-lint run ./path/to/changed/package/... || go vet ./path/to/changed/package/...
go test ./path/to/changed/package/... -race
golangci-lint when available, fall back to go vet