Skip to content
InfratoApp
InfratoApp / Resources / Agent skills / golang-dependency-injection

golang-dependency-injection

golang-dependency-injection is an agent skill published by samber, listed under writing code. It lives in the samber/cc-skills-golang repository, which has 3,672 GitHub stars and is licensed under MIT; we last read it on 2026-09-16.

Provides guidance on implementing dependency injection in Golang, covering manual constructor injection and comparing popular libraries such as google/wire, uber-go/dig, uber-go/fx, and samber/do.

Install

skills is a generic installer for any repository of Claude agent skills -- it reads samber/cc-skills-golang’s own structure rather than assuming one, the same way this page reads the skill’s own SKILL.md rather than assuming a format.

npx skills add samber/cc-skills-golang

Maintenance

Stars
3672
State
listed
Licence
MIT
From the repository

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.

golang-dependency-injection compared with similar skills

golang-dependency-injection compared with other skills for the same job, by publisher, what it does, repository stars and last update
SkillPublisherWhat it doesRepo starsLast update
golang-dependency-injection (this page)samberComprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupli…3,6722026-10-23
golang-data-structures(same repository)samberGolang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals,…3,6722026-10-23
golang-dependency-management(same repository)samberDependency management for Golang projects — go.mod and go.sum, `go get` install and upgrade flows, Minimal Ve…3,6722026-10-23
golang-error-handling(same repository)samberIdiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types,…3,6722026-10-23
golang-google-wire(same repository)samberCompile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind (interface…3,6722026-10-23
golang-graphql(same repository)samberImplements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing…3,6722026-10-23
golang-popular-libraries(same repository)samberGolang library and framework selection — vetted production-ready options by category (web, database, testing,…3,6722026-10-23

Skills from the same repository first, then others for this job by repository stars. Figures are from each repository when we last read it.

Common questions about golang-dependency-injection

What does golang-dependency-injection do?
Provides guidance on implementing dependency injection in Golang, covering manual constructor injection and comparing popular libraries such as google/wire, uber-go/dig, uber-go/fx, and samber/do.
How do I install golang-dependency-injection?
Run npx skills add samber/cc-skills-golang. The skills installer reads the repository’s own structure, so it works for any repository of agent skills.
Who publishes golang-dependency-injection?
samber.
Is golang-dependency-injection maintained, and what licence does it use?
Its repository has 3,672 GitHub stars and its state in our directory is listed. Its last commit we recorded was on 2026-10-23. The repository declares the MIT licence.

More agent skills for writing code

All writing code entries →

Learn this on Infrato