What problem does it solve?
Many Go projects suffer from inconsistent idioms, fragile concurrency, poor error handling, and unclear package boundaries; this Skill consolidates proven patterns and best practices to make Go code more readable, reliable, and maintainable.
Core Features & Use Cases
- Simplicity and Clarity: Guidance for favoring simple, obvious implementations over clever constructs.
- Error Handling & Types: Patterns for wrapping, classifying, and checking errors with examples.
- Concurrency & Cancellation: Worker pools, context-based cancellation, errgroup usage, and strategies to avoid goroutine leaks.
- Package and API Design: Recommendations for interface placement, package layout, and avoiding global state.
- Tooling and Performance: Recommended Go tooling, linters, memory allocation avoidance, and performance idioms.
- Use Case: Use when writing, reviewing, or refactoring services and libraries to enforce consistent idioms, improve safety, and reduce bugs.
Quick Start
Analyze this Go package and recommend idiomatic refactors to improve error handling, concurrency safety, and package organization.