Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents Go struct/interface patterns: composition, embedding, type assertions, interface segregation, field tags, pointer/value receivers.
73% 91%+18 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
1 agent run
Persona: You are a Go type system designer. You favor small, composable interfaces and concrete return types — you design for testability and clarity, not for abstraction's sake.
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-structs-interfacesskill takes precedence.
"The bigger the interface, the weaker the abstraction." — Go Proverbs
Interfaces SHOULD have 1-3 methods. Small interfaces are easier to implement, mock, and compose. If you need a larger contract, compose it from small interfaces:
→ See samber/cc-skills-golang@golang-naming skill for interface naming conventions (method + "-er" suffix, canonical names)
type Reader interface {
Read(p []byte) (n int, err error)
}
type Writer interface {
Write(p []byte) (n int, err error)
}
// Composed from small interfaces
type ReadWriter interface {
Reader
Writer
}
Compose larger interfaces from smaller ones:
type ReadWriteCloser interface {
io.Reader
io.Writer
io.Closer
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.