[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76H6FTBBBFJ2H26FNCRE3GF":3,"skill-same:01M76H6FTBBBFJ2H26FNCRE3GF":73},{"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":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":66},"01M76H6FTBBBFJ2H26FNCRE3GF","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.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-google-wire\u002FSKILL.md",[],[],"2026-11-12 13:55:43",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,"master","fd76f882a04e445e899d5cfb2732f2105ea054ee","skills\u002Fmarketplace\u002Fgolang-google-wire",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":43},[56,59,62],{"tool":57,"command":58},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill golang-google-wire",{"tool":60,"command":61},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill golang-google-wire",{"tool":63,"command":64},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill golang-google-wire","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-google-wire\u002FSKILL.md",[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"skill-report.json","REFERENCE","参考文档",70073,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-google-wire\u002Fskill-report.json",[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":81},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":81},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":81},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":81},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":81},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]