go-review
Review Go code for style, idioms, safety, and correctness. Use when reviewing Go code changes, pull requests, or auditing Go codebase quality.
When & Why to Use This Skill
This Claude skill provides a comprehensive and automated approach to Go (Golang) code reviews, prioritizing runtime safety, idiomaticity, and performance. It meticulously audits code for nil dereferences, race conditions, and adherence to industry-standard style guides like the Uber Go Style Guide, ensuring robust and maintainable software development.
Use Cases
- Pull Request Auditing: Streamline the PR process by automatically identifying logic errors, edge cases, and improper error wrapping in Go code changes before human intervention.
- Security and Safety Auditing: Proactively detect critical runtime vulnerabilities such as concurrency issues, race conditions, and potential panics within a Go codebase.
- Technical Debt Reduction: Audit existing Go packages to align them with modern idiomatic practices and best practices, improving code readability and long-term maintainability.
- Performance Tuning: Analyze Go source code for inefficient patterns, such as unnecessary memory allocations or poor channel usage, to optimize application throughput.
| name | go-review |
|---|---|
| description | Review Go code for style, idioms, safety, and correctness. Use when reviewing Go code changes, pull requests, or auditing Go codebase quality. |
| allowed-tools | ["shell", "read_file", "apply_patch"] |
| short-description | Review Go code comprehensively |
Go Code Review
Read these references before reviewing:
references/process.md- Review workflow and interactivityreferences/priorities.md- Review focus areas (safety first)~/.config/agent/domain/coding/go/style.md- Go style guidelines~/.config/agent/domain/coding/go/idioms.md- Go best practices~/.config/agent/domain/coding/safety.md- Runtime and security safety
Instructions
Apply all guidance from references when reviewing Go code. Follow the review workflow from AGENT.md:
Review Focus (Priority Order)
- Runtime safety - nil dereferences, race conditions, panics
- Code correctness - logic errors, edge cases, error handling
- Language idiomaticity - Go conventions, proper use of features
- Runtime performance - unnecessary allocations, inefficient patterns
- Code style - Uber Go Style Guide compliance
- Local conventions - Project-specific patterns
Review Process
Per AGENT.md Code Review section:
- Be thorough, pedantic, and highly detailed
- Discuss each discrete point of feedback interactively
- Order feedback from most to least critical
- Prove issues empirically when possible (via tests, lint, etc.)
- Qualify confidence level for issues that can't be proven
- Pause after each issue to ask user what they'd like to do
Common Go Review Points
- Error handling: proper wrapping, meaningful messages
- Concurrency: race conditions, proper mutex usage, channel patterns
- Resource cleanup: defers, context cancellation
- Testing: table-driven tests, edge cases, race detector
- Performance: unnecessary allocations, slice capacity
Arguments
Target files/packages: ${ARGUMENTS}