This skill helps you decide when to use Go generics versus concrete types or interfaces. It walks through a clear decision flow: start concrete, generalize only when you see duplicate logic across multiple types, and prefer interfaces when shared behavior already exists. You'll find practical guidance on constraint composition with tilde and union operators, standard naming conventions for type parameters, and common pitfalls like wrapping standard library types unnecessarily or using generics just to satisfy interfaces. The advice is grounded in the Google Style Guide and emphasizes writing code first, designing types second. Most valuable when you're reaching for `any` with type switches or building reusable data structures that genuinely work across multiple types.
npx skills add https://github.com/cxuu/golang-skills --skill go-generics