A Claude Code plugin with production-tested Go patterns covering idiomatic code style, error handling, testing, concurrency, security, generics, iterators, and stdlib patterns up to Go 1.26.
# 1. Add the plugin marketplace
/plugin marketplace add git@github.com:gonzaloserrano/gopilot.git
# 2. Install the plugin
/plugin install gopilot
# 3. Enable auto-update (recommended)
# /plugin → Marketplaces tab → gopilot → Enable auto-update
# 4. Use the skill
# Tell Claude: "use the gopilot skill and implement XYZ"
# Or once skill invocation is fixed: /gopilot| Topic | Patterns |
|---|---|
| Design | Simplicity, pure functions, zero values, guard clauses, small interfaces |
| Code Style | gofmt, golangci-lint, naming conventions, package design |
| Error Handling | Wrapping, sentinel errors, errors.Is/As, errors.Join |
| Generics | Type parameters, constraints, comparable, cmp.Ordered |
| Testing | Table-driven tests, testify, t.Parallel(), t.Cleanup(), benchmarks |
| Concurrency | Channels, channel axioms, mutexes, errgroup, sync.Once, WaitGroup.Go, context cancellation |
| Iterators | iter.Seq, slices.Collect, maps.Keys, range over func, custom iterators |
| Interfaces | Consumer-side definition, compile-time checks, function types |
| AIP | Resource-oriented gRPC APIs with einride/aip-go: pagination, filtering, ordering, field masks, resource names |
| Patterns | Options pattern, cmp.Or, HTTP best practices, slog |
| Security | Input validation, SQL injection, auth, sessions, TLS, CSRF, crypto |
| Linting | golangci-lint configuration, recommended linters, auto-fix |
| TDD Baby Steps | Red-green-refactor, table-driven test progression, t.Run, t.Helper |
Covers features up to Go 1.26, including:
- Go 1.26:
errors.AsType[T](),new(expr),t.ArtifactDir(),go fix, goroutine leak profile - Go 1.25:
testing/synctest,wg.Go(),http.CrossOriginProtection - Go 1.24:
t.Context(),t.Chdir(),os.OpenRoot(),runtime.AddCleanup, generic type aliases,b.Loop() - Go 1.23: Iterators (
iter.Seq),slices.Collect,maps.Keys - Go 1.22:
cmp.Or, range over int, loop variable fix - Go 1.21:
clear(),slices/mapspackages
# Update to latest version
/plugin update gopilot
# Check current version
/plugin list
# Uninstall
/plugin uninstall gopilot
# Test locally during development
claude --plugin-dir ./git clone git@github.com:gonzaloserrano/gopilot.git
cd gopilot
claude --plugin-dir .
# Test the skill
# Tell Claude: "use the gopilot skill"Contributions welcome! The skill is defined in skills/gopilot/SKILL.md with detailed security topics in skills/gopilot/reference/.
- Fork and clone the repository
- Edit
skills/gopilot/SKILL.md - Test locally with
claude --plugin-dir . - Submit a PR
- Keep patterns concise and actionable
- Include code examples where helpful
- Reference Go version for version-specific features
- Prefer stdlib over external dependencies