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.

87

1.01x
Quality

82%

Does it follow best practices?

Impact

100%

1.01x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Quality

Content

64%

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

This is a solid, comprehensive DI guide for Go with excellent actionability — the side-by-side library comparison with executable code for the same dependency graph is particularly valuable. The main weaknesses are moderate verbosity (explaining DI concepts Claude already knows, lengthy tables) and lack of explicit validation/verification steps in the refactor workflow. The progressive disclosure structure is reasonable with references to sub-files and other skills, but the main file carries more inline content than ideal.

Suggestions

Trim the 'Why Dependency Injection?' table and introductory paragraphs — Claude already understands DI concepts; focus on Go-specific patterns and decisions.

Add explicit validation checkpoints to the Refactor mode workflow (e.g., 'run tests after each migration step', 'verify no remaining global state with grep').

Move the testing section and common mistakes table to reference files to reduce the main skill's token footprint.

DimensionReasoningScore

Conciseness

The skill is generally well-structured but includes some unnecessary content that Claude already knows — the 'Why Dependency Injection?' table explains basic DI concepts, and the testing section with mock examples covers patterns Claude is already familiar with. The 'Common Mistakes' table and 'When to Adopt' table add value but could be more compact. The comparison table and quick comparison section are valuable but together are somewhat verbose.

2 / 3

Actionability

The skill provides fully executable Go code examples for manual DI, all four library approaches with the same dependency graph, and complete testing examples with mocks. The decision table gives concrete criteria for choosing an approach, and the code is copy-paste ready with clear good/bad patterns.

3 / 3

Workflow Clarity

The skill defines two modes (Design and Refactor) with clear steps, and the refactor mode includes a parallel sub-agent approach. However, neither mode has explicit validation checkpoints or feedback loops — the refactor mode describes analysis steps but doesn't include verification that the migration was successful. The 'When to Adopt' table provides decision guidance but lacks a step-by-step migration workflow.

2 / 3

Progressive Disclosure

The skill references several external files (./references/manual-di.md, ./references/google-wire.md, ./references/uber-dig-fx.md, ./references/samber-do.md) and cross-references other skills, which is good structure. However, no bundle files were provided to verify these references exist, and the main file itself is quite long (~200+ lines) with substantial inline content (full comparison tables, testing examples, common mistakes) that could have been split into reference files.

2 / 3

Total

9

/

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.

This is an excellent skill description that hits all the marks. It provides specific capabilities, comprehensive trigger terms covering both conceptual and practical user queries, an explicit 'Use when' clause with diverse scenarios, and clear differentiation from related library-specific skills via cross-references. The third-person voice is used correctly throughout.

DimensionReasoningScore

Specificity

Lists multiple specific concrete actions and concepts: constructor injection, DI library comparison (with named libraries), testability, loose coupling, separation of concerns, lifecycle management, singletons, service factories. Very detailed and actionable.

3 / 3

Completeness

Clearly answers both 'what' (comprehensive guide for DI in Golang covering concepts, manual injection, and library comparison) and 'when' (explicit 'Use this skill when...' clause listing multiple trigger scenarios like designing service architecture, refactoring tightly coupled code, managing singletons).

3 / 3

Trigger Term Quality

Excellent coverage of natural terms users would say: 'dependency injection', 'DI', 'Golang', 'Go', 'testability', 'loose coupling', 'inversion of control', 'service containers', 'wiring dependencies', 'singletons', 'service factories', plus specific library names like 'wire', 'dig', 'fx', 'samber/do'.

3 / 3

Distinctiveness Conflict Risk

Highly distinctive — scoped specifically to dependency injection in Go, and even differentiates itself from related library-specific skills by cross-referencing them. The niche is clear and unlikely to conflict with other skills.

3 / 3

Total

12

/

12

Passed

Validation

81%

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

Validation9 / 11 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_field

'metadata' should map string keys to string values

Warning

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

9

/

11

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.