smithery/JamesPrial

go-interfaces

Go interface design patterns and best practices

Installation

$ npx skills add smithery/JamesPrial --skill go-interfaces

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/JamesPrial · top by installs.

npx skills add smithery/JamesPrial

Browse all from smithery/JamesPrial

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 827 B
  • docs SUMMARY.md 68 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Interface Design

Master Go's approach to interfaces: implicit satisfaction, consumer-driven design, and composition patterns.

Route by Concern

  • Accept/return patterns → see [design/](design/)

- Accept interfaces, return structs principle - When to deviate from the rule

  • Interface pollution → see [pollution/](pollution/)

- Detecting unnecessary abstractions - Premature interface creation

  • Embedding patterns → see [embedding/](embedding/)

- Interface composition techniques - Method set expansion

Quick Check

  • Interface defined by consumer, not producer
  • Keep interfaces small (<5 methods)
  • Return concrete types from functions
  • No interface{} unless truly necessary