BigHugger
sk Skill · samber

golang-google-wire

Compile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.InterfaceValue, wire.FieldsOf, cleanup functions, //go:build wireinject injector files, and generated wire_gen.go. Apply when using or adopting google/wire, when the codebase imports github.com/google/wire, or when wiring an application graph at compile time via…

installs 8w
3,865
30-day movement
starts with the next reading
Related entries
1
Connections
0
gobashGo

A SKILL.md that teaches an AI coding agent how to use google/wire for compile-time dependency injection in Go. It covers provider sets, injectors with //go:build wireinject, interface bindings, wire.Struct/Value/InterfaceValue, cleanup functions, and the wire_gen.go codegen workflow, with rules, pitfalls, and reference bundles.

It gives your coding agent the correct google/wire patterns and common-mistake guardrails so generated dependency graphs stay valid without you restating the conventions.

Use it to

  • Adopt google/wire in an existing Go codebase
  • Write injector files with //go:build wireinject
  • Bind interfaces to concrete types with wire.Bind
  • Disambiguate duplicate provider types with named wrappers
  • Set up the wire codegen workflow and go:generate hooks

For Go developers using Claude Code or similar agents on projects importing github.com/google/wire

Host repository
samber/cc-skills-golang
Version
1.1.2
Installs, lifetime
35k
Installs, 8 weeks
3,865
Compatible with
Designed for Claude Code, Codex or similar harness, and for projects using Golang.
Licence
MIT
Invocable by
user
Host stars
3,273
Host language
Go
topicsgolangdependency-injectiongoogle-wirecode-generationagent-skillcompile-time