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.

82

1.00x
Quality

86%

Does it follow best practices?

Impact

100%

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 actionable and well-structured with strong code examples and one-level-deep references, but it loses conciseness to conceptual padding and a redundant best-practices/mistakes pair, and its refactor workflow lacks the validation checkpoints the rubric requires for significant operations.

Suggestions

Trim the basic DI definition and the 'Why Dependency Injection?' problem/solution table, or fold the rationale into the existing Best Practices Summary to remove redundancy with the Common Mistakes table.

Add an explicit validation checkpoint to Refactor mode — e.g. 'After wiring, run `go build ./...` and the test suite; only declare the migration complete when both pass' — so the workflow includes a feedback loop.

Consolidate the 'Best Practices Summary' and 'Common Mistakes' table, which overlap heavily (globals/init, container-as-dependency, deep chains), into a single section to reclaim tokens.

DimensionReasoningScore

Conciseness

Mostly efficient with concrete tables and code, but includes unnecessary explanation Claude already knows (the basic DI definition and the 'Why Dependency Injection?' problem/solution table) plus redundancy between the 10-point 'Best Practices Summary' and the 'Common Mistakes' table.

3 / 5

Actionability

Provides multiple complete, copy-paste-ready Go examples covering manual DI (good vs bad), samber/do container wiring, and mock-based testing, which cover the common cases fully.

5 / 5

Workflow Clarity

Design and Refactor modes are clearly sequenced, but refactoring a coupled codebase is a significant operation with no validation checkpoints (no 'run go build' or 'run tests to verify the wiring'), so workflow clarity is capped at 3 per the destructive-operation guideline.

3 / 5

Progressive Disclosure

SKILL.md is a clear overview with four well-signaled, one-level-deep references (all real files in ./references/) for detailed wiring examples, while decision tables stay inline appropriately, giving easy navigation.

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.

A strong, well-structured description that clearly states what the skill covers and when to invoke it, with comprehensive natural trigger terms and explicit pointers to sibling library-specific skills for disambiguation. Third-person/standard imperative voice is used correctly throughout.

DimensionReasoningScore

Specificity

Lists multiple concrete actions and capabilities comprehensively — 'manual constructor injection', 'DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do)', plus design/refactor/singleton use-cases, matching the comprehensive-coverage anchor.

5 / 5

Completeness

Explicitly answers both what ('Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters...') and when ('Use this skill when designing service architecture... or when the user asks about inversion of control, service containers, or wiring dependencies in Go') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Comprehensive natural trigger terms including synonyms — 'dependency injection', 'inversion of control', 'service containers', 'wiring dependencies', 'singletons', 'service factories' — alongside the four library names a user would actually name.

5 / 5

Distinctiveness Conflict Risk

Clear niche (DI in Golang) with distinct triggers and explicit disambiguation to four sibling library skills, giving minimal conflict risk with other skills.

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.