golang-google-wire Skill for Claude: What It Does and How to Install It
Makes Claude set up and fix Go dependency injection with google/wire, where the compiler catches missing pieces.
- Installs
- 37.7K
- on skills.sh
- Stars
- 3.7K
- on GitHub
- Files
- 4
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
golang-google-wire teaches Claude how to build a Go app graph with google/wire. It covers provider sets, injector files, interface bindings and the generated wire_gen.go, which the skill says to commit and never edit by hand.
The description tells Claude to use it when you adopt google/wire, when the code imports github.com/google/wire, or when you wire an app at compile time. The frontmatter lists the go and wire commands as requirements. The skill also notes that google/wire was archived in August 2025.
Good for
- Go developers who use or are adopting google/wire
- Teams that want missing dependencies to fail at build time, not at startup
- Developers choosing between wire, dig and fx
Install golang-google-wire
Claude Code
- 1
Copy this prompt.
Install the golang-google-wire skill in Claude Code. Run this command: npx skills add https://github.com/samber/cc-skills-golang --skill golang-google-wire Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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 `wire.Build`. For runtime DI with reflection, see `samber/cc-skills-golang@golang-uber-dig` skill.
Sections in SKILL.md
- wire vs. Runtime DI
- Providers
- Provider Sets
- Injectors and //go:build wireinject
- Interface Bindings
- Struct Providers and Values
- Disambiguating Duplicate Types
- Full Application Example
- Codegen Workflow
- Best Practices
- Common Mistakes
- Testing
- Further Reading
- Cross-References
Key facts
- Author
- samber
- Repository
- samber/cc-skills-golang
- Installs on skills.sh
- 37,653 as of 2026-11-02
- License
- MIT (SKILL.md frontmatter)
- Last commit to the repo
- 2026-11-01
- What is inside
- 5 files including SKILL.md: evals/evals.json and 3 reference guides (advanced, recipes, testing)
- Version
- 1.1.2 (SKILL.md frontmatter)
- skills.sh audits
- Gen Agent Trust Hub pass, Socket pass, Snyk pass
What it includes
Group constructors with wire.NewSet, one set per package
Claude treats any Go function as a provider and groups related ones into sets. The skill says to keep library sets small, because adding inputs or removing outputs breaks downstream injectors.
Read ·
Providers and provider setsDeclare the init function that wire fills in
Claude writes the injector stub with wire.Build and the wireinject build tag. Wire then generates the body into wire_gen.go.
Try: “Add a wire injector that builds App from the config, database and user service sets.”
Write ·
Injectors with //go:build wireinjectwire.Bind says which concrete type satisfies an interface
Wire does not guess which type fits an interface. Claude adds an explicit binding to the provider set.
Write ·
Interface bindingswire.Struct, Value, InterfaceValue and FieldsOf
Claude fills struct fields from the graph without a hand-written constructor, or promotes config fields into the graph.
Write ·
Struct providers and valuesNamed types per provider; (T, func(), error) cleanups
Wire allows one provider per type, so Claude wraps repeated types such as two DSN strings in named types. Providers that return a cleanup function get chained in reverse order.
Write ·
Duplicate types and cleanup functionsRegenerates wire_gen.go; check validates without regenerating
Claude re-runs wire after every constructor change and commits wire_gen.go so CI builds stay in sync.
Try: “I changed NewDB, regenerate the wire code and check the graph.”
Runs code ·
Codegen workflow: wire ./... and wire check ./...advanced.md, recipes.md, testing.md
Deeper notes load only when needed: cleanup chains and error catalogue, an HTTP server and CLI example, and test injectors with a CI stale check.
Read ·
Reference guides
From the official docs
Permissions
Low risk
Claude can edit your Go files and run go, git and wire commands in your project. Review the diff, including the generated wire_gen.go, before you commit.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It runs wire and writes wire_gen.go
The codegen step rewrites generated files across the module. Commit first so you can diff the result. github.com
It lists go install and go get commands for wire
The Dependencies section names a go install of the wire tool at @latest, and the code block shows go get -tool github.com/google/wire/cmd/wire@latest and go get github.com/google/wire, which change your go.mod. Run them yourself if you prefer to control versions. github.com
Technical details
| Turning on read-only | No read-only switch is documented in SKILL.md. |
|---|---|
| Talks to | WebFetch and the Context7 documentation tools appear in allowed-tools |
| Scopes |
|
Questions
What does golang-google-wire do?
It gives Claude a working method for google/wire, the compile-time dependency injection tool for Go. Claude writes provider sets and injector files, adds interface bindings, and re-runs wire ./... after graph changes.
How do I install golang-google-wire?
Use the install box at the top of this page. The README says the Go skills are designed as cross-referencing units, so installing only a subset gives a partial view of the guidelines. The skill itself expects the Go toolchain and the wire command on your machine.
Does it need the wire tool installed?
Yes. The frontmatter lists go and wire as required commands, and the Dependencies section names a go install for the wire tool. The skill runs wire ./... to generate wire_gen.go.
Is golang-google-wire safe to use?
It is a set of instructions plus an evals file and three guides. Its allowed-tools line lets Claude read and edit files, run go, git, golangci-lint, wire, godig and gopls commands, and fetch web pages. Review the diff before you commit, especially the generated wire_gen.go.
Is google/wire still maintained?
The skill says google/wire was archived in August 2025 and is feature-complete, with bug fixes still accepted. Check that this fits your project before adopting it.
wire vs dig vs fx: which should I use?
The skill compares them. Wire resolves the graph at compile time with generated code and has no lifecycle hooks. Dig and fx resolve it at runtime with reflection, and fx adds OnStart and OnStop hooks. The repo has separate golang-uber-dig and golang-uber-fx skills for those.
Does it work in Codex or the Claude app?
The frontmatter says it is designed for Claude Code, Codex or a similar harness, for Go projects. The SKILL.md does not mention the Claude app, and the skill needs your local Go toolchain.
Information
updated Nov 2, 2026
- Repository
- samber/cc-skills-golang
- Folder
skills/golang-google-wire
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- golang-google-wire SKILL.md · github.com
- samber/cc-skills-golang README · github.com
- golang-uber-dig SKILL.md · github.com
- golang-uber-fx SKILL.md · github.com