Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segrega…
Part of cc-skills-golangPack · 46 skills
by samber· Developer toolsUnclaimed · Yours? Claim it
About
Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON/YAML/DB serialization, or choosing between pointer and value receivers. Also use when the user asks about "accept interfaces, return structs", compile-time interface checks, or composing small interfaces into larger ones.
Skills people install alongside golang-structs-interfaces.
Runs on your machine.
Runs on your machine.
Runs on your machine.
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.copilot/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.cursor/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.claude/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.agents/skills/golang-structs-interfaces
Runs on your machine.
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.gemini/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces .agents/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.openclaw/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.config/opencode/skills/golang-structs-interfaces
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-structs-interfaces ~/.hermes/skills/golang-structs-interfaces
Scanned and passed · checked 2 h ago
From people who use it
Step by step
Nothing new reaches your agent until a person has looked at it.
Scanned on every change, and again when our rules improve.
No reviews yet. Used golang-structs-interfaces? Say how it went.
Write a reviewTw93's engineering habits as eight skills: plan before you build, debug to root cause, review before you ship, and more.
Go skills for coding agents: idiomatic style, error handling, testing, concurrency, security and performance for production Go projects.
Test Double's coding skills: build test-first, refactor under green tests, review your branch and trace bugs to their root cause.
Nobody has shared how they use golang-structs-interfaces yet.
Security scan
Passed
Safe to install in every agent it supports. Runs in your agent, as instructions.