What problem does it solve?
This Skill helps you avoid oversized, producer-owned abstractions in Go by guiding you toward small, consumer-defined interfaces and consistent receiver choices. It reduces coupling, improves testability, and prevents interface and embedding mistakes that are hard to unwind later.
Core Features & Use Cases
- Consumer-owned interfaces: Define interfaces in the package that uses them, not where they are implemented.
- Concrete returns, small contracts: Return concrete types from constructors while keeping interfaces minimal and composable.
- Composition and receivers: Use struct embedding deliberately and keep pointer or value receiver choices consistent.
- Safety checks: Apply compile-time interface satisfaction checks and comma-ok type assertions to prevent runtime surprises.
- Use cases: Designing service seams, adding test fakes, deciding whether to extract an interface, or reviewing exported types for accidental API leaks.
Quick Start
Ask for help redesigning a Go package boundary so it uses a small consumer-owned interface and consistent receiver methods.