CtrlK
BlogDocsLog inGet started
Tessl Logo

golang-dependency-injection

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.

80

1.00x
Quality

86%

Does it follow best practices?

Impact

83%

1.00x

Average score across 2 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

72%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A highly actionable, well-structured skill with executable code and good progressive disclosure into real reference files. It loses points on conciseness for re-explaining DI basics Claude already knows and on workflow clarity for lacking explicit validation checkpoints in its refactor/migration flow.

Suggestions

Trim the opening definition sentence and the 'Why Dependency Injection?' table that re-explain testability and loose coupling — Claude already knows these; keep only the Go-specific framing.

Add an explicit validation checkpoint to Refactor mode (e.g., 'after wiring, run `go build ./...` and `golangci-lint run` before proposing the migration plan') to turn implicit sequence into a verify-fix-retry loop.

Consider moving the full four-way code comparison into a reference file to further shrink SKILL.md while keeping the decision table inline as the entry point.

DimensionReasoningScore

Conciseness

Mostly efficient with concrete code and tables, but retains concepts Claude already knows — the opening 'Dependency injection (DI) means passing dependencies to a component rather than having it create or find them' and the 'Why Dependency Injection?' table re-explaining testability/loose coupling basics — so it could be tightened.

2 / 3

Actionability

Fully executable, copy-paste-ready Go examples throughout — manual DI good/bad, the same-app-four-ways comparison, mock injection tests, and samber/do clone-and-override — plus concrete decision and when-to-adopt tables with specific fixes.

3 / 3

Workflow Clarity

Design mode (assess → recommend → generate) and Refactor mode (3 parallel sub-agents → consolidate → migration plan) are clearly sequenced, but no explicit validation or verify-fix-retry checkpoints are present for the refactor/migration work, leaving checkpoints implicit.

2 / 3

Progressive Disclosure

SKILL.md acts as an overview with well-signaled, one-level-deep references to four real bundle files (manual-di.md, google-wire.md, uber-dig-fx.md, samber-do.md) via markdown links, with library details appropriately split out and clearly organized sections.

3 / 3

Total

10

/

12

Passed

Description

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, specific description that clearly states capabilities, enumerates natural trigger terms, and gives an explicit Use-when clause scoped to Go DI. It avoids fluff and distinguishes itself via library names and sub-skill cross-references.

DimensionReasoningScore

Specificity

Lists multiple concrete capabilities — 'manual constructor injection', 'DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do)', 'designing service architecture', 'refactoring tightly coupled code', 'managing singletons or service factories' — matching the anchor for multiple specific concrete actions.

3 / 3

Completeness

Explicitly answers what ('Comprehensive guide for dependency injection (DI) in Golang. Covers... manual constructor injection, and DI library comparison') and when via an explicit 'Use this skill when...' clause enumerating design, setup, refactor, and library scenarios.

3 / 3

Trigger Term Quality

Natural terms a Go developer would say are well covered — 'dependency injection', 'service architecture', 'refactoring tightly coupled code', 'singletons', 'service factories', 'inversion of control', 'service containers', 'wiring dependencies in Go' — beyond jargon to common phrasings.

3 / 3

Distinctiveness Conflict Risk

A clear niche (DI in Go) with distinct triggers and named libraries, plus pointers to per-library sub-skills, making collision with other skills unlikely; voice is third person throughout.

3 / 3

Total

12

/

12

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_field

'metadata' should map string keys to string values

Warning

relative_links

Relative link issues: 4 missing

Warning

Total

14

/

16

Passed

Repository
samber/cc-skills-golang
Reviewed

Table of Contents

Is this your skill?

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.