[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CWH5TK84G8WRQPS07BCYC8":3,"skill-same:01M7CWH5TK84G8WRQPS07BCYC8":63},{"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":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":62},"01M7CWH5TK84G8WRQPS07BCYC8","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.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fsamber-cc-skills-golang\u002Fgolang-google-wire\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 or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.0.6\"\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__*\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. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber\u002Fcc-skills-golang@golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber\u002Fcc-skills-golang@golang-gopls` skill (`gopls`). 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. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber\u002Fcc-skills-golang@golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber\u002Fcc-skills-golang@golang-gopls` skill (`gopls`). 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,"license":15,"metadata":24,"description":7,"allowed-tools":39,"compatibility":40,"user-invocable":41},{"author":25,"version":26,"openclaw":27},"samber","1.0.6",{"emoji":28,"install":29,"homepage":35,"requires":36,"skill-library-version":38},"🪡",[30],{"bins":31,"kind":33,"package":34},[32],"wire","go","github.com\u002Fgoogle\u002Fwire\u002Fcmd\u002Fwire@latest","https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":37},[33,32],"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 or similar AI coding agents, and for projects using Golang.",true,"main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fsamber-cc-skills-golang\u002Fgolang-google-wire\u002Fskills\u002Fgolang-google-wire",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":41},[52,55,58],{"tool":53,"command":54},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill golang-google-wire",{"tool":56,"command":57},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill golang-google-wire",{"tool":59,"command":60},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill golang-google-wire","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fsamber-cc-skills-golang\u002Fgolang-google-wire\u002Fskills\u002Fgolang-google-wire\u002FSKILL.md",[],[64,71,76,83,88,95],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":72,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":84,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":96,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]