[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DFGD3307SMNVXNXC72BANN":3,"skill-same:01M7DFGD3307SMNVXNXC72BANN":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":64},"01M7DFGD3307SMNVXNXC72BANN","golang-google-wire",null,"Compile-time dependency injection in Golang using google\u002Fwire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.InterfaceValue, wire.FieldsOf, cleanup functions, \u002F\u002Fgo:build wireinject injector files, and generated wire_gen.go. Apply when using or adopting google\u002Fwire, when the codebase imports `github.com\u002Fgoogle\u002Fwire`, or when wiring an application graph at compile time via `wire.Build`. For runtime DI with reflection, see `samber\u002Fcc-skills-golang@golang-uber-dig` skill.","heynemann\u002Fomp-marketplace","heynemann","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F60965?v=4","01M7DFBD9ZDB2J2QE7R4AR0PES","Bernardo Heynemann","01M7DFBDAM3NXF540P210W3NYT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fgolang-google-wire\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: golang-google-wire\ndescription: \"Compile-time dependency injection in Golang using google\u002Fwire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.InterfaceValue, wire.FieldsOf, cleanup functions, \u002F\u002Fgo:build wireinject injector files, and generated wire_gen.go. Apply when using or adopting google\u002Fwire, when the codebase imports `github.com\u002Fgoogle\u002Fwire`, or when wiring an application graph at compile time via `wire.Build`. For runtime DI with reflection, see `samber\u002Fcc-skills-golang@golang-uber-dig` skill.\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code, Codex or similar harness, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.1.2\"\n  openclaw:\n    emoji: \"🪡\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n        - wire\n    install:\n      - kind: go\n        package: github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest\n        bins: [wire]\n    skill-library-version: \"0.7.0\"\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs Bash(wire:*) Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*\npaths:\n  - \"**\u002F*.go\"\n---\n\n**Persona:** You are a Go architect using wire for compile-time DI. You let the compiler catch missing dependencies, treat `wire_gen.go` as committed source, and re-run `wire .\u002F...` after every graph change.\n\n**Dependencies:**\n\n- wire: `go install github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest`\n\n# Using google\u002Fwire for Compile-Time Dependency Injection in Go\n\nCode-generation DI toolkit. Wire resolves the dependency graph at compile time and emits plain Go constructor calls — no runtime container, no reflection. Errors appear when you run `wire .\u002F...`, not at first request.\n\nNote: `google\u002Fwire` was archived in August 2025 (feature-complete; bug fixes still accepted).\n\n**Official Resources:** [pkg.go.dev](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgoogle\u002Fwire) · [github.com\u002Fgoogle\u002Fwire](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire) · [User Guide](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fblob\u002Fmain\u002Fdocs\u002Fguide.md) · [Best Practices](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fblob\u002Fmain\u002Fdocs\u002Fbest-practices.md)\n\nThis skill is not exhaustive — refer to library documentation and code examples for more information:\n\n- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber\u002Fcc-skills-golang@golang-pkg-go-dev` skill (`godig`), preferred over Context7 for Go package facts.\n- To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber\u002Fcc-skills-golang@golang-gopls` skill (`gopls`).\n- Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n```bash\ngo get -tool github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest\ngo get github.com\u002Fgoogle\u002Fwire\n```\n\n## wire vs. Runtime DI\n\n| Concern           | wire                      | dig \u002F fx \u002F samber\u002Fdo   |\n| ----------------- | ------------------------- | ---------------------- |\n| Resolution        | Compile time (codegen)    | Runtime (reflection)   |\n| Error detection   | `wire .\u002F...` fails        | First `Invoke`\u002Fstartup |\n| Runtime container | None — plain Go calls     | Present                |\n| Lifecycle hooks   | Not built in              | fx: OnStart\u002FOnStop     |\n| Generated files   | `wire_gen.go` (committed) | None                   |\n\nFor lifecycle, lazy loading, and a full matrix see `samber\u002Fcc-skills-golang@golang-dependency-injection`.\n\n## Providers\n\nA provider is any Go function — inputs are dependencies, outputs are provided types. Three return forms:\n\n```go\nfunc NewConfig() *Config                          { return &Config{Addr: \":8080\"} }\nfunc NewDB(cfg *Config) (*sql.DB, error)          { return sql.Open(\"postgres\", cfg.DSN) }\nfunc NewRedis(cfg *Config) (*redis.Client, func(), error) { \u002F\u002F cleanup chained in reverse order\n    c := redis.NewClient(&redis.Options{Addr: cfg.RedisAddr})\n    return c, func() { c.Close() }, nil\n}\n```\n\n## Provider Sets\n\n`wire.NewSet` groups providers for reuse. Sets can reference other sets.\n\n```go\n\u002F\u002F infra\u002Fwire.go\nvar InfraSet = wire.NewSet(\n    NewConfig,\n    NewDB,\n    NewRedis,\n)\n\n\u002F\u002F service\u002Fwire.go\nvar ServiceSet = wire.NewSet(\n    NewUserRepo,\n    NewUserService,\n    wire.Bind(new(UserStore), new(*UserRepo)), \u002F\u002F interface binding\n)\n```\n\nKeep sets small: library sets expose a stable surface (adding inputs or removing outputs breaks downstream injectors). One set per package is a useful default.\n\n## Injectors and `\u002F\u002Fgo:build wireinject`\n\nThe injector file declares the initialization function. Wire generates its body into `wire_gen.go` and replaces the stub.\n\n```go\n\u002F\u002Fgo:build wireinject\n\npackage main\n\nimport \"github.com\u002Fgoogle\u002Fwire\"\n\n\u002F\u002F Wire generates the body of this function.\nfunc InitApp() (*App, func(), error) {\n    wire.Build(InfraSet, ServiceSet, NewApp)\n    return nil, nil, nil \u002F\u002F replaced by codegen\n}\n```\n\nThe `\u002F\u002Fgo:build wireinject` tag prevents the stub from being compiled into the binary — only `wire_gen.go` (which has no such tag) makes it through `go build`. Without this tag, both files define the same function, causing a compile error.\n\nAlternative syntax when a dummy return is inconvenient:\n\n```go\nfunc InitApp() (*App, func(), error) {\n    panic(wire.Build(InfraSet, ServiceSet, NewApp))\n}\n```\n\n## Interface Bindings\n\nWire forbids implicit interface satisfaction — you must declare bindings explicitly so the graph is unambiguous when multiple types implement the same interface.\n\n```go\nvar Set = wire.NewSet(\n    NewPostgresUserRepo,\n    wire.Bind(new(UserStore), new(*PostgresUserRepo)), \u002F\u002F tell wire: *PostgresUserRepo satisfies UserStore\n)\n```\n\nExplicit bindings prevent graph breakage when a new type implementing the same interface is added elsewhere.\n\n## Struct Providers and Values\n\n`wire.Struct` fills struct fields from the graph without a manual constructor. Tag fields `wire:\"-\"` to exclude them.\n\n```go\nwire.Struct(new(Server), \"Logger\", \"DB\") \u002F\u002F inject named fields\nwire.Struct(new(Server), \"*\")            \u002F\u002F inject all non-excluded fields\nwire.Value(Foo{X: 42})                   \u002F\u002F constant expression (no fn calls \u002F channels)\nwire.InterfaceValue(new(io.Reader), os.Stdin) \u002F\u002F interface-typed literal\nwire.FieldsOf(new(Config), \"DSN\", \"Addr\")    \u002F\u002F promote struct fields as graph nodes\n```\n\nSee [advanced.md](references\u002Fadvanced.md) for the `wire:\"-\"` exclusion tag and `wire.FieldsOf` details.\n\n## Disambiguating Duplicate Types\n\nWire forbids two providers for the same type. Wrap the underlying type in distinct named types so each has exactly one provider:\n\n```go\ntype PrimaryDSN string\ntype ReplicaDSN string\n```\n\n## Full Application Example\n\n```go\n\u002F\u002F wire.go — injector, excluded from binary via build tag\n\u002F\u002Fgo:build wireinject\n\npackage main\n\nfunc InitApp() (*App, func(), error) {\n    wire.Build(config.ConfigSet, infra.InfraSet, service.ServiceSet, NewApp)\n    return nil, nil, nil\n}\n\n\u002F\u002F main.go\nfunc main() {\n    app, cleanup, err := InitApp()\n    if err != nil { log.Fatal(err) }\n    defer cleanup()\n    app.Run()\n}\n```\n\nWire generates `wire_gen.go` (plain Go, committed, DO NOT EDIT). For a full example with per-package sets, cleanup-heavy graphs, and generated output, see [recipes.md](references\u002Frecipes.md).\n\n## Codegen Workflow\n\n```bash\nwire .\u002F...           # regenerate all injectors in the module\nwire check .\u002F...     # validate graph without regenerating (fast CI check)\n```\n\nRun `wire .\u002F...` after every constructor signature change. Add `\u002F\u002Fgo:generate go run github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire` to injector files so `go generate .\u002F...` also works. Commit `wire_gen.go` — it must stay in sync for CI builds.\n\n## Best Practices\n\n1. Never edit `wire_gen.go` — it is overwritten on every `wire .\u002F...` run. Treat it as a build artifact that happens to be committed; source of truth is the provider and injector files.\n2. Always add `\u002F\u002Fgo:build wireinject` to injector files — omitting it causes duplicate-symbol compile errors because both the stub and the generated file define the same function.\n3. Use named types to distinguish values of the same underlying type — wire enforces one provider per type; named types like `type DSN string` let you have `PrimaryDSN` and `ReplicaDSN` coexist.\n4. Keep library provider sets minimal and backward-compatible — adding new required inputs breaks downstream injectors; removing outputs does too. Introduce only newly-created types in the same release.\n5. Return `(T, func(), error)` from cleanup providers and let wire chain them — wire generates the correct reverse-order cleanup and handles partial failures (if construction fails midway, only already-built cleanups run).\n6. Keep injector files focused — one function per file, one package import at a time. Fat injectors with dozens of `wire.Build` arguments are hard to reason about; delegate to per-package sets.\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Editing `wire_gen.go` manually | Never edit it. Change providers or injectors and re-run `wire .\u002F...`. |\n| Missing `\u002F\u002Fgo:build wireinject` | Add the tag as the very first line of every injector file. |\n| Two providers returning `*sql.DB` | Wrap with a named struct type: `type PrimaryDB struct { *sql.DB }` — Wire does not distinguish pointer type aliases. |\n| Injecting an interface without `wire.Bind` | Add `wire.Bind(new(MyInterface), new(*MyImpl))` to the provider set. |\n| Forgetting to re-run `wire .\u002F...` after changes | Run wire before `go build`; add it to `go generate` or a Makefile target. |\n| Calling `cleanup()` without guarding for nil | Wire returns nil cleanup on construction error; guard with `if cleanup != nil { defer cleanup() }`. |\n\n## Testing\n\nWire generates plain Go constructors, so unit tests use manual injection — no container to clone or reset. For testing patterns (test injectors swapping real providers for fakes, CI stale-check for `wire_gen.go`), see [testing.md](references\u002Ftesting.md).\n\n## Further Reading\n\n- [advanced.md](references\u002Fadvanced.md) — cleanup chains, multiple injectors, set nesting, error catalogue, codegen flags, quick reference\n- [recipes.md](references\u002Frecipes.md) — HTTP server, multi-injector build, cleanup-heavy graph, CLI embedding\n- [testing.md](references\u002Ftesting.md) — test injectors, fake bindings, CI stale check\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-dependency-injection` skill for DI concepts and library comparison\n- → See `samber\u002Fcc-skills-golang@golang-uber-dig` skill for runtime reflection-based DI without lifecycle\n- → See `samber\u002Fcc-skills-golang@golang-uber-fx` skill for runtime DI with lifecycle hooks, modules, and signal-aware Run()\n- → See `samber\u002Fcc-skills-golang@golang-samber-do` skill for generics-based DI without reflection\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for interface design patterns\n- → See `samber\u002Fcc-skills-golang@golang-testing` skill for general testing patterns\n\nIf you encounter a bug or unexpected behavior in google\u002Fwire, open an issue at \u003Chttps:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fissues>.\n","**Persona:** You are a Go architect using wire for compile-time DI. You let the compiler catch missing dependencies, treat `wire_gen.go` as committed source, and re-run `wire .\u002F...` after every graph change.\n\n**Dependencies:**\n\n- wire: `go install github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest`\n\n# Using google\u002Fwire for Compile-Time Dependency Injection in Go\n\nCode-generation DI toolkit. Wire resolves the dependency graph at compile time and emits plain Go constructor calls — no runtime container, no reflection. Errors appear when you run `wire .\u002F...`, not at first request.\n\nNote: `google\u002Fwire` was archived in August 2025 (feature-complete; bug fixes still accepted).\n\n**Official Resources:** [pkg.go.dev](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgoogle\u002Fwire) · [github.com\u002Fgoogle\u002Fwire](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire) · [User Guide](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fblob\u002Fmain\u002Fdocs\u002Fguide.md) · [Best Practices](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fblob\u002Fmain\u002Fdocs\u002Fbest-practices.md)\n\nThis skill is not exhaustive — refer to library documentation and code examples for more information:\n\n- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber\u002Fcc-skills-golang@golang-pkg-go-dev` skill (`godig`), preferred over Context7 for Go package facts.\n- To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber\u002Fcc-skills-golang@golang-gopls` skill (`gopls`).\n- Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n```bash\ngo get -tool github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest\ngo get github.com\u002Fgoogle\u002Fwire\n```\n\n## wire vs. Runtime DI\n\n| Concern           | wire                      | dig \u002F fx \u002F samber\u002Fdo   |\n| ----------------- | ------------------------- | ---------------------- |\n| Resolution        | Compile time (codegen)    | Runtime (reflection)   |\n| Error detection   | `wire .\u002F...` fails        | First `Invoke`\u002Fstartup |\n| Runtime container | None — plain Go calls     | Present                |\n| Lifecycle hooks   | Not built in              | fx: OnStart\u002FOnStop     |\n| Generated files   | `wire_gen.go` (committed) | None                   |\n\nFor lifecycle, lazy loading, and a full matrix see `samber\u002Fcc-skills-golang@golang-dependency-injection`.\n\n## Providers\n\nA provider is any Go function — inputs are dependencies, outputs are provided types. Three return forms:\n\n```go\nfunc NewConfig() *Config                          { return &Config{Addr: \":8080\"} }\nfunc NewDB(cfg *Config) (*sql.DB, error)          { return sql.Open(\"postgres\", cfg.DSN) }\nfunc NewRedis(cfg *Config) (*redis.Client, func(), error) { \u002F\u002F cleanup chained in reverse order\n    c := redis.NewClient(&redis.Options{Addr: cfg.RedisAddr})\n    return c, func() { c.Close() }, nil\n}\n```\n\n## Provider Sets\n\n`wire.NewSet` groups providers for reuse. Sets can reference other sets.\n\n```go\n\u002F\u002F infra\u002Fwire.go\nvar InfraSet = wire.NewSet(\n    NewConfig,\n    NewDB,\n    NewRedis,\n)\n\n\u002F\u002F service\u002Fwire.go\nvar ServiceSet = wire.NewSet(\n    NewUserRepo,\n    NewUserService,\n    wire.Bind(new(UserStore), new(*UserRepo)), \u002F\u002F interface binding\n)\n```\n\nKeep sets small: library sets expose a stable surface (adding inputs or removing outputs breaks downstream injectors). One set per package is a useful default.\n\n## Injectors and `\u002F\u002Fgo:build wireinject`\n\nThe injector file declares the initialization function. Wire generates its body into `wire_gen.go` and replaces the stub.\n\n```go\n\u002F\u002Fgo:build wireinject\n\npackage main\n\nimport \"github.com\u002Fgoogle\u002Fwire\"\n\n\u002F\u002F Wire generates the body of this function.\nfunc InitApp() (*App, func(), error) {\n    wire.Build(InfraSet, ServiceSet, NewApp)\n    return nil, nil, nil \u002F\u002F replaced by codegen\n}\n```\n\nThe `\u002F\u002Fgo:build wireinject` tag prevents the stub from being compiled into the binary — only `wire_gen.go` (which has no such tag) makes it through `go build`. Without this tag, both files define the same function, causing a compile error.\n\nAlternative syntax when a dummy return is inconvenient:\n\n```go\nfunc InitApp() (*App, func(), error) {\n    panic(wire.Build(InfraSet, ServiceSet, NewApp))\n}\n```\n\n## Interface Bindings\n\nWire forbids implicit interface satisfaction — you must declare bindings explicitly so the graph is unambiguous when multiple types implement the same interface.\n\n```go\nvar Set = wire.NewSet(\n    NewPostgresUserRepo,\n    wire.Bind(new(UserStore), new(*PostgresUserRepo)), \u002F\u002F tell wire: *PostgresUserRepo satisfies UserStore\n)\n```\n\nExplicit bindings prevent graph breakage when a new type implementing the same interface is added elsewhere.\n\n## Struct Providers and Values\n\n`wire.Struct` fills struct fields from the graph without a manual constructor. Tag fields `wire:\"-\"` to exclude them.\n\n```go\nwire.Struct(new(Server), \"Logger\", \"DB\") \u002F\u002F inject named fields\nwire.Struct(new(Server), \"*\")            \u002F\u002F inject all non-excluded fields\nwire.Value(Foo{X: 42})                   \u002F\u002F constant expression (no fn calls \u002F channels)\nwire.InterfaceValue(new(io.Reader), os.Stdin) \u002F\u002F interface-typed literal\nwire.FieldsOf(new(Config), \"DSN\", \"Addr\")    \u002F\u002F promote struct fields as graph nodes\n```\n\nSee [advanced.md](references\u002Fadvanced.md) for the `wire:\"-\"` exclusion tag and `wire.FieldsOf` details.\n\n## Disambiguating Duplicate Types\n\nWire forbids two providers for the same type. Wrap the underlying type in distinct named types so each has exactly one provider:\n\n```go\ntype PrimaryDSN string\ntype ReplicaDSN string\n```\n\n## Full Application Example\n\n```go\n\u002F\u002F wire.go — injector, excluded from binary via build tag\n\u002F\u002Fgo:build wireinject\n\npackage main\n\nfunc InitApp() (*App, func(), error) {\n    wire.Build(config.ConfigSet, infra.InfraSet, service.ServiceSet, NewApp)\n    return nil, nil, nil\n}\n\n\u002F\u002F main.go\nfunc main() {\n    app, cleanup, err := InitApp()\n    if err != nil { log.Fatal(err) }\n    defer cleanup()\n    app.Run()\n}\n```\n\nWire generates `wire_gen.go` (plain Go, committed, DO NOT EDIT). For a full example with per-package sets, cleanup-heavy graphs, and generated output, see [recipes.md](references\u002Frecipes.md).\n\n## Codegen Workflow\n\n```bash\nwire .\u002F...           # regenerate all injectors in the module\nwire check .\u002F...     # validate graph without regenerating (fast CI check)\n```\n\nRun `wire .\u002F...` after every constructor signature change. Add `\u002F\u002Fgo:generate go run github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire` to injector files so `go generate .\u002F...` also works. Commit `wire_gen.go` — it must stay in sync for CI builds.\n\n## Best Practices\n\n1. Never edit `wire_gen.go` — it is overwritten on every `wire .\u002F...` run. Treat it as a build artifact that happens to be committed; source of truth is the provider and injector files.\n2. Always add `\u002F\u002Fgo:build wireinject` to injector files — omitting it causes duplicate-symbol compile errors because both the stub and the generated file define the same function.\n3. Use named types to distinguish values of the same underlying type — wire enforces one provider per type; named types like `type DSN string` let you have `PrimaryDSN` and `ReplicaDSN` coexist.\n4. Keep library provider sets minimal and backward-compatible — adding new required inputs breaks downstream injectors; removing outputs does too. Introduce only newly-created types in the same release.\n5. Return `(T, func(), error)` from cleanup providers and let wire chain them — wire generates the correct reverse-order cleanup and handles partial failures (if construction fails midway, only already-built cleanups run).\n6. Keep injector files focused — one function per file, one package import at a time. Fat injectors with dozens of `wire.Build` arguments are hard to reason about; delegate to per-package sets.\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Editing `wire_gen.go` manually | Never edit it. Change providers or injectors and re-run `wire .\u002F...`. |\n| Missing `\u002F\u002Fgo:build wireinject` | Add the tag as the very first line of every injector file. |\n| Two providers returning `*sql.DB` | Wrap with a named struct type: `type PrimaryDB struct { *sql.DB }` — Wire does not distinguish pointer type aliases. |\n| Injecting an interface without `wire.Bind` | Add `wire.Bind(new(MyInterface), new(*MyImpl))` to the provider set. |\n| Forgetting to re-run `wire .\u002F...` after changes | Run wire before `go build`; add it to `go generate` or a Makefile target. |\n| Calling `cleanup()` without guarding for nil | Wire returns nil cleanup on construction error; guard with `if cleanup != nil { defer cleanup() }`. |\n\n## Testing\n\nWire generates plain Go constructors, so unit tests use manual injection — no container to clone or reset. For testing patterns (test injectors swapping real providers for fakes, CI stale-check for `wire_gen.go`), see [testing.md](references\u002Ftesting.md).\n\n## Further Reading\n\n- [advanced.md](references\u002Fadvanced.md) — cleanup chains, multiple injectors, set nesting, error catalogue, codegen flags, quick reference\n- [recipes.md](references\u002Frecipes.md) — HTTP server, multi-injector build, cleanup-heavy graph, CLI embedding\n- [testing.md](references\u002Ftesting.md) — test injectors, fake bindings, CI stale check\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-dependency-injection` skill for DI concepts and library comparison\n- → See `samber\u002Fcc-skills-golang@golang-uber-dig` skill for runtime reflection-based DI without lifecycle\n- → See `samber\u002Fcc-skills-golang@golang-uber-fx` skill for runtime DI with lifecycle hooks, modules, and signal-aware Run()\n- → See `samber\u002Fcc-skills-golang@golang-samber-do` skill for generics-based DI without reflection\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for interface design patterns\n- → See `samber\u002Fcc-skills-golang@golang-testing` skill for general testing patterns\n\nIf you encounter a bug or unexpected behavior in google\u002Fwire, open an issue at \u003Chttps:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fissues>.\n",{"name":5,"paths":24,"license":15,"metadata":26,"description":7,"allowed-tools":41,"compatibility":42,"user-invocable":43},[25],"**\u002F*.go",{"author":27,"version":28,"openclaw":29},"samber","1.1.2",{"emoji":30,"install":31,"homepage":37,"requires":38,"skill-library-version":40},"🪡",[32],{"bins":33,"kind":35,"package":36},[34],"wire","go","github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest","https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":39},[35,34],"0.7.0","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs Bash(wire:*) Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","2147d79c9cd764770418b462c29634bcdc710096","plugins\u002Fbase\u002Fskills\u002Fgolang-google-wire","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace","https:\u002F\u002Fgithub.com\u002Fheynemann","http:\u002F\u002Fwww.thumbor.org","CTO @ Flutter Brazil | Former Meta & Coinbase","2026-09-29 21:26:05",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":43},[54,57,60],{"tool":55,"command":56},"npx","npx skills add heynemann\u002Fomp-marketplace --skill golang-google-wire",{"tool":58,"command":59},"bunx","bunx skills add heynemann\u002Fomp-marketplace --skill golang-google-wire",{"tool":61,"command":62},"pnpm","pnpm dlx skills add heynemann\u002Fomp-marketplace --skill golang-google-wire","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fgolang-google-wire\u002FSKILL.md",[65,71,75,79],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"evals\u002Fevals.json","REFERENCE","参考文档",16019,"https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fgolang-google-wire\u002Fevals\u002Fevals.json",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fadvanced.md",7521,"https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fgolang-google-wire\u002Freferences\u002Fadvanced.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Frecipes.md",7069,"https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fgolang-google-wire\u002Freferences\u002Frecipes.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Ftesting.md",5607,"https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fgolang-google-wire\u002Freferences\u002Ftesting.md",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7DFXDYP0N6P8KR0AF7C0TDK","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7DFX9C5B0T1T0AVDCWNR5P2","write-skill","Use when creating, designing, or fixing an agent skill (SKILL.md pack) — triggers include \"write a skill\", \"make me a skill\", \"create a skill\", skill directories, and skills that fail to trigger or fire on the wrong tasks.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7DFX64VSTQV0CSGYR76MPZF","write-agent","Use when creating, designing, or fixing an omp subagent (task agent) — triggers include \"write an agent\", \"make me an agent\", \"create a subagent\", agent `.md` definitions, and agents that misbehave when spawned via task.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fwrite-agent\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7DFX22JEY7ZN9EDESM732K5","wizard","Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fwizard\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7DFWYXR5V2CY2BPDAAS19R1","wayfinder","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7DFWXFFMBKV294WS66S475V","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fomp-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fbase\u002Fskills\u002Fwait-what\u002FSKILL.md",[],[]]