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.
82
86%
Does it follow best practices?
Impact
100%
1.00xAverage score across 2 eval scenarios
Passed
No findings from the security scan
| Run | Type | Date | Status |
|---|---|---|---|
baseline vs usage-spec With / without contextCompleted | With / without context | Completed |
01a06032-c8ec-749c-ae07-88b48bd37d6e
Run
The run is available. Its result stats will appear here when they are ready.
19a0626
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.