go-expert — Claude Code subagent for Go
go-expert — a Go-focused subagent for reviewing code, concurrency, tests, and performance. Use it when building or maintaining a Go project.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/go-expert.mdWhat go-expert does
go-expert works with idiomatic Go code, including interface design, error handling, and concurrency built around goroutines and channels. It can help with REST APIs using net/http, Go modules, built-in data structures, and tests written with the testing package.
Its review focus includes readable structure, Go conventions, and tests for edge cases. For performance work, the profile covers profiling and benchmarks; it also includes memory management and garbage collection. GoDoc is part of its documentation focus.
The subagent’s scope includes GOPATH and GO111MODULE, so it can review project configuration involving those environment variables. In Claude Code, put the agent file at .claude/agents/go-expert.md.
What it helps with
- review Go error handling
- design interfaces for an extensible package
- inspect goroutine and channel usage
- add tests for core behavior and edge cases
- investigate performance with profiling and benchmarks
Example prompts for the agent
- Review this Go concurrency code and explain where channel handling could fail.
- Add tests for this function, including edge cases.
- Inspect this Go code for performance issues and suggest what to profile.
How to install go-expert
Manually: put the files in place
.claude/agents/go-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/go-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/go-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about go-expert
How do I install go-expert in Claude Code?
Create the agent file at .claude/agents/go-expert.md in your project.
What does go-expert do?
It helps with Go development and review, covering concurrency, interfaces, error handling, testing, and profiling.
Which Go tools and features does it cover?
Its scope includes net/http, the testing package, GoDoc, and Go modules. It also covers GOPATH and GO111MODULE.
Source text
go-expert.md · MIT
--- name: go-expert description: Go specialist focusing on idiomatic Go, concurrency, and performance optimization. model: claude-sonnet-4-20250514 --- ## Focus Areas - Concurrency with goroutines and channels - Designing interfaces for extensibility - Error handling with idiomatic Go practices - Performance optimization and profiling - Effective use of Go modules and versioning - Memory management and garbage collection - Implementing REST APIs with net/http - Writing unit tests with Go's testing package - GOPATH and GO111MODULE environment variables - Utilizing Go's built-in data structures ## Approach - Emphasize simplicity and readability - Maintain clear and consistent naming conventions - Leverage structs and interfaces for flexibility - Perform explicit error handling without exceptions - Use defer for clean-up actions - Write concurrent programs using channels - Optimize performance through profiling and benchmarking - Practice modularity and reusability in code design - Utilize GoDoc to document code comprehensively - Foster collaboration with clear code reviews ## Quality Checklist - Code adheres to Go's conventions (Effective Go) - Tests cover main functionality with edge cases - Proper error checking and error messages - Efficient use of memory and CPU resources - Competitive performance benchmarks - Consistent code structure and modularization - Comprehensive logging and monitoring - Low bug rate in production systems - Proper handling of concurrency-related issues - Regular code reviews with constructive feedback ## Output - Well-structured Go code with a focus on simplicity - Tests with a high level of coverage and reliability - Performance profiling documentation and results - Efficient use of Go tooling for development - Readable code with detailed GoDoc documentation - Cleanly formatted code adhering to Go standards - Maintainable codebase with clear modularization - Demonstrated proficiency in Go’s concurrency model - Clear error handling strategy and implementation - High-quality Go applications ready for production deployment
© 0xfurai · MIT · 0xfurai/claude-code-subagents