API and Interface Design
Guides the design of clean internal module boundaries, Go interfaces, and robust package APIs.
API and Interface Design equips Claude with architectural best practices for defining in-process boundaries, package APIs, and cross-module contracts. It emphasizes idiomatic Go patterns such as consumer-defined interfaces, accepting interfaces while returning concrete structs, non-breaking function evolution using functional options, and structured error handling. This skill is ideal for software engineers refactoring package architectures, decoupling monolithic dependencies, or reviewing public library APIs for long-term compatibility and maintainability.
主な機能
01Backward-compatible function evolution strategies using functional options
02Idiomatic 'accept interfaces, return structs' architectural guidance
032 GitHub stars
04Consistent error-handling contracts utilizing sentinel errors and %w wrapping
05Emulated discriminated unions using unexported marker interfaces in Go
06Consumer-defined interface patterns to minimize coupling across packages
ユースケース
01Designing extensible public package APIs and constructors without breaking existing callers
02Conducting architectural code reviews on module boundaries and exported interface footprints
03Refactoring tightly coupled Go packages into small, consumer-scoped interfaces