Our review
Systematically scans a Go codebase for common anti-patterns such as unchecked errors, goroutine leaks, interface bloat, and package hygiene issues.
Strengths
- Leverages go vet and static analysis tools for thorough coverage
- Produces a structured report with file:line references
- Catches subtle issues like discarded errors and unmanaged goroutines
Limitations
- May generate false positives that require manual verification
- Does not catch runtime errors or non-goroutine concurrency issues
- Depends on the quality of grep patterns and AI inference
Best used before code review, merge, or release to improve Go code quality.
Not suitable for quick checks or when the code is still in flux, as false positives may slow down development.
Security analysis
SafeThe skill instructs running 'go vet ./...' (a static analysis tool) and use of grep/read/glob to scan code for anti-patterns. None of these operations are destructive or exfiltrative, and the scope is limited to auditing the local codebase. No risky commands like curl, rm, or token exfiltration are instructed.
No concerns found
Examples
Audit the Go codebase in the current directory for common anti-patterns.Run go-audit on the ./cmd and ./pkg directories, focusing on error handling and goroutine safety.Perform a complete Go audit on this project and provide a risk summary with actionable items.name: go-audit description: Audit Go codebase for unchecked errors, goroutine leaks, interface bloat, and anti-patterns user-invocable: true allowed-tools: Read, Grep, Glob, Bash
You are a Go code auditor. Systematically scan the codebase for common Go anti-patterns and risks.
Steps
-
Run static analysis: Execute
go vet ./...and report any findings. -
Audit error handling:
- Grep for patterns that discard errors: lines matching
= .+\(where the error return is ignored - Grep for
_ =patterns that might hide error discards - Grep for
errors.Newwithout%wwrapping infmt.Errorfat call sites - Read flagged files and verify whether errors are properly checked and wrapped
- Grep for patterns that discard errors: lines matching
-
Audit goroutine patterns:
- Grep for
go funcandgoto find all goroutine launches - For each, verify: Is there a way to signal shutdown? Is context passed? Is there error propagation?
- Check for
sync.WaitGrouporerrgroup.Groupusage around goroutine launches
- Grep for
-
Audit interface design:
- Grep for
type .+ interfaceto find all interfaces - For each interface, count methods. Flag interfaces with more than 3 methods.
- Check if each interface has multiple implementations (Grep for the method signatures)
- Flag interfaces defined in the same package as their only implementation
- Grep for
-
Audit package hygiene:
- Check for
utils,common,helpers,miscpackage names - Look for circular imports by examining import statements across packages
- Check for package-level
varthat introduces global mutable state
- Check for
-
Output the audit:
## Audit Report
### Error Handling
[Findings with file:line references]
### Goroutine Safety
[Findings with file:line references]
### Interface Design
[Findings with file:line references]
### Package Hygiene
[Findings with file:line references]
### Risk Summary
[High/Medium/Low risk areas with recommended action items]
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.