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%Weight 40%Scale 1-5

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

The body is well-structured with executable examples and excellent progressive disclosure to real reference files. The main weakness is the absence of explicit validation/feedback loops in the refactor workflow for destructive code transformations.

Suggestions

Add a validation checkpoint to Refactor mode (e.g., run `go build ./...` and `golangci-lint run` after consolidating findings, then iterate on failures before finalizing the migration plan).

Tighten redundancy between the 'Why DI?' table and the 'Best Practices Summary', which restate overlapping rationale.

Define or inline the helper types referenced in code examples (UserStore, OrderService) so snippets are fully copy-paste runnable.

DimensionReasoningScore

Conciseness

Lean and assumes Claude's Go knowledge without explaining DI or library basics, but the 'Why DI?' table and four-way quick comparison partially restate concepts in the Best Practices Summary and could be tightened.

4 / 5

Actionability

Provides executable Go code for manual wiring, mocking, and samber/do override plus a concrete decision table, though some examples reference types (UserStore, OrderService) not defined inline.

4 / 5

Workflow Clarity

Design and Refactor modes are sequenced with sub-agent roles, but the destructive refactor operations lack explicit validation checkpoints or validate→fix→retry feedback loops, capping this dimension.

3 / 5

Progressive Disclosure

Clear overview body 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) plus external doc links, all verified present.

5 / 5

Total

16

/

20

Passed

Description

100%Weight 40%Scale 1-5

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

The description is comprehensive, specific, and well-differentiated, with a clear 'Use when...' trigger clause and natural keyword coverage including synonyms. It is a strong, concise skill description.

DimensionReasoningScore

Specificity

Names the domain and multiple concrete actions — manual constructor injection and DI library comparison across four specific libraries (google/wire, uber-go/dig, uber-go/fx, samber/do) — for comprehensive coverage.

5 / 5

Completeness

Explicitly answers both what (covers why DI matters, manual injection, library comparison) and when via a concrete 'Use this skill when...' clause listing trigger scenarios.

5 / 5

Trigger Term Quality

Comprehensive natural terms including synonyms: 'setting up dependency injection', 'refactoring tightly coupled code', 'inversion of control', 'service containers', 'wiring dependencies in Go'.

5 / 5

Distinctiveness Conflict Risk

Clear Go-DI niche with distinct triggers and explicit cross-references that disambiguate from sibling per-library skills, minimizing conflict risk.

5 / 5

Total

20

/

20

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.