Comprehensive guide for dependency injection (DI) in Golang.
Part of cc-skills-golangPack · 46 skills
by samber· Developer toolsUnclaimed · Yours? Claim it
About
Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go. For a specific DI library, → See `samber/cc-skills-golang@golang-google-wire`, `samber/cc-skills-golang@golang-uber-dig`, `samber/cc-skills-golang@golang-uber-fx`, or `samber/cc-skills-golang@golang-samber-do` skills.
Skills people install alongside golang-dependency-injection.
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-dependency-injection ~/.copilot/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.cursor/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.claude/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.agents/skills/golang-dependency-injection
Runs on your machine.
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.gemini/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection .agents/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.openclaw/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.config/opencode/skills/golang-dependency-injection
Runs on your machine.
npx -y degit samber/cc-skills-golang/skills/golang-dependency-injection ~/.hermes/skills/golang-dependency-injection
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-dependency-injection? 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-dependency-injection yet.
Security scan
Passed
Safe to install in every agent it supports. Runs in your agent, as instructions.