Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design and review stable, idiomatic Go package APIs covering naming, exported declarations, embedding, receivers, typed-nil interfaces, generics, functional options, method sets, errors, wire contracts, compatibility, and examples. Use when creating a reusable Go package, reviewing its public surface, evolving an exported API, or choosing concrete types, functions, methods, fields, interfaces, or type parameters.
.claude/skills/hashgraph-online-go-idiomatic-api-design/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 8% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 9% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 9% | 0% |
| case-23 | ✓→✓ | = Same ✓ | 39% | 0% |
Design from the caller's code inward. Prefer the smallest coherent public surface that preserves invariants and can evolve without needless interfaces.
| Task | Load | |---|---| | Design or evolve an API | guidelines.md, workflows/review-public-api.md | | Choose types, fields, methods, or interfaces | references/api-design/rules.md | | Understand compatibility and method sets | references/api-design/knowledge.md | | Review concrete patterns | references/api-design/examples.md |
Guidance is transformed and paraphrased from Inanc Gumus, Go by Example: Programmer's Guide to Idiomatic and Testable Programs (Manning, 2025), especially Chapters 1, 2, 5, 9, and 10. Examples are original.
Embedding, receivers, generics, functional options, and typed-nil guidance also incorporates transformed material from Teiva Harsanyi, 100 Go Mistakes and How to Avoid Them (Manning, 2022), Chapters 2 and 6.
Book: https://www.manning.com/books/go-by-example
Current language and documentation contracts should be verified against https://go.dev/ref/spec, https://go.dev/doc/comment, and the module's pinned Go version.
Other measured skills in the registry, with their headline benchmark lift.