Skill / SKILL.md

Golang Dependency Injection

samber/cc-skills-golang

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.
2 views 4,013 repository stars 0 commentsUpdated Nov 27, 2026
Overview

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.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/samber/cc-skills-golang' skill-source

Use the complete skill-source/skills/golang-dependency-injection directory with your client’s skill installer.

  • skills/golang-dependency-injection

    main · SKILL.md

    Open installation source

    Source directory recorded from the imported repository path

Source directory skills/golang-dependency-injection

Compatibility & requirements

Declared compatibility

Designed for Claude Code, Codex or similar harness, and for projects using Golang.

Declared tools

Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs AskUserQuestion

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Source & validation
Source status
Awaiting source check
Format validation
Needs source review
Checked at
Pending source check
Content SHA-256
e981b41081caa8a2d5953a5b91ff2968c8ab4df299db9291ba9bc8597c3137d1
Format validation findings
  • Metadata requires string values.
Agent Skills specification
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills