[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JZCE2S3X0WWK38MZSTHH3A":3,"skill-same:01M6JZCE2S3X0WWK38MZSTHH3A":93},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6JZCE2S3X0WWK38MZSTHH3A","golang-dependency-injection",null,"Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google\u002Fwire, uber-go\u002Fdig, uber-go\u002Ffx). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go.","paulohgodinho\u002Fskills","paulohgodinho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F57510522?v=4","01M6JZBW2QZR573QTV4PN1H6DE","Paulo Godinho","01M6JZBW6QM55GHQB0K3BC6D45",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"golang","injection","dependency injection","golang dependency injection","dependency","read","wiring","separation of concerns","false","query","context7","up","MCP","projects","refactoring","Bash","why","code","ai coding agents","architecture","2026-11-10 10:12:30",false,"---\nname: golang-dependency-injection\ndescription: \"Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google\u002Fwire, uber-go\u002Fdig, uber-go\u002Ffx). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go.\"\nuser-invocable: false\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\"\n  openclaw:\n    emoji: \"?\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\n    requires:\n      bins:\n        - go\n    install: []\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\n---\n\n**Persona:** You are a Go software architect. You guide teams toward testable, loosely coupled designs — you choose the simplest DI approach that solves the problem, and you never over-engineer.\n\n**Modes:**\n\n- **Design mode** (new project, new service, or adding a service to an existing DI setup): assess the existing dependency graph and lifecycle needs; recommend manual injection or a library from the decision table; then generate the wiring code.\n- **Refactor mode** (existing coupled code): use up to 3 parallel sub-agents — Agent 1 identifies global variables and `init()` service setup, Agent 2 maps concrete type dependencies that should become interfaces, Agent 3 locates service-locator anti-patterns (container passed as argument) — then consolidate findings and propose a migration plan.\n\n> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-dependency-injection` skill takes precedence.\n\n# Dependency Injection in Go\n\nDependency injection (DI) means passing dependencies to a component rather than having it create or find them. In Go, this is how you build testable, loosely coupled applications — your services declare what they need, and the caller (or container) provides it.\n\nThis skill is not exhaustive. When using a DI library (google\u002Fwire, uber-go\u002Fdig, uber-go\u002Ffx), refer to the library's official documentation and code examples for current API signatures.\n\nFor interface-based design foundations (accept interfaces, return structs), see the `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill.\n\n## Best Practices Summary\n\n1. Dependencies MUST be injected via constructors — NEVER use global variables or `init()` for service setup\n2. Small projects (\u003C 10 services) SHOULD use manual constructor injection — no library needed\n3. Interfaces MUST be defined where consumed, not where implemented — accept interfaces, return structs\n4. NEVER use global registries or package-level service locators\n5. The DI container MUST only exist at the composition root (`main()` or app startup) — NEVER pass the container as a dependency\n6. **Prefer lazy initialization** — only create services when first requested\n7. **Use singletons for stateful services** (DB connections, caches) and transients for stateless ones\n8. **Mock at the interface boundary** — DI makes this trivial\n9. **Keep the dependency graph shallow** — deep chains signal design problems\n10. **Choose the right DI library** for your project size and team — see the decision table below\n\n## Why Dependency Injection?\n\n| Problem without DI | How DI solves it |\n| --- | --- |\n| Functions create their own dependencies | Dependencies are injected — swap implementations freely |\n| Testing requires real databases, APIs | Pass mock implementations in tests |\n| Changing one component breaks others | Loose coupling via interfaces — components don't know each other's internals |\n| Services initialized everywhere | Centralized container manages lifecycle (singleton, factory, lazy) |\n| All services loaded at startup | Lazy loading — services created only when first requested |\n| Global state and `init()` functions | Explicit wiring at startup — predictable, debuggable |\n\nDI shines in applications with many interconnected services — HTTP servers, microservices, CLI tools with plugins. For a small script with 2-3 functions, manual wiring is fine. Don't over-engineer.\n\n## Manual Constructor Injection (No Library)\n\nFor small projects, pass dependencies through constructors. See [Manual DI examples](.\u002Freferences\u002Fmanual-di.md) for a complete application example.\n\n```go\n\u002F\u002F ✓ Good — explicit dependencies, testable\ntype UserService struct {\n    db     UserStore\n    mailer Mailer\n    logger *slog.Logger\n}\n\nfunc NewUserService(db UserStore, mailer Mailer, logger *slog.Logger) *UserService {\n    return &UserService{db: db, mailer: mailer, logger: logger}\n}\n\n\u002F\u002F main.go — manual wiring\nfunc main() {\n    logger := slog.Default()\n    db := postgres.NewUserStore(connStr)\n    mailer := smtp.NewMailer(smtpAddr)\n    userSvc := NewUserService(db, mailer, logger)\n    orderSvc := NewOrderService(db, logger)\n    api := NewAPI(userSvc, orderSvc, logger)\n    api.ListenAndServe(\":8080\")\n}\n```\n\n```go\n\u002F\u002F ✗ Bad — hardcoded dependencies, untestable\ntype UserService struct {\n    db *sql.DB\n}\n\nfunc NewUserService() *UserService {\n    db, _ := sql.Open(\"postgres\", os.Getenv(\"DATABASE_URL\")) \u002F\u002F hidden dependency\n    return &UserService{db: db}\n}\n```\n\nManual DI breaks down when:\n\n- You have 15+ services with cross-dependencies\n- You need lifecycle management (health checks, graceful shutdown)\n- You want lazy initialization or scoped containers\n- Wiring order becomes fragile and hard to maintain\n\n## DI Library Comparison\n\nGo has two main approaches to DI libraries:\n\n- [google\u002Fwire examples](.\u002Freferences\u002Fgoogle-wire.md) — Compile-time code generation\n- [uber-go\u002Fdig + fx examples](.\u002Freferences\u002Fuber-dig-fx.md) — Reflection-based framework\n\n### Decision Table\n\n| Criteria | Manual | google\u002Fwire | uber-go\u002Fdig + fx |\n| --- | --- | --- | --- |\n| **Project size** | Small (\u003C 10 services) | Medium-Large | Large |\n| **Type safety** | Compile-time | Compile-time (codegen) | Runtime (reflection) |\n| **Code generation** | None | Required (`wire_gen.go`) | None |\n| **Reflection** | None | None | Yes |\n| **API style** | N\u002FA | Provider sets + build tags | Struct tags + decorators |\n| **Lazy loading** | Manual | N\u002FA (all eager) | Built-in (fx) |\n| **Singletons** | Manual | Built-in | Built-in |\n| **Transient\u002Ffactory** | Manual | Manual | Built-in |\n| **Scopes\u002Fmodules** | Manual | Provider sets | Module system (fx) |\n| **Health checks** | Manual | Manual | Manual |\n| **Graceful shutdown** | Manual | Manual | Built-in (fx) |\n| **Debugging** | Print statements | Compile errors | `fx.Visualize()` |\n| **Go version** | Any | Any | Any |\n| **Learning curve** | None | Medium | High |\n\n### Quick Comparison: Same App, Four Ways\n\nThe dependency graph: `Config -> Database -> UserStore -> UserService -> API`\n\n**Manual**:\n\n```go\ncfg := NewConfig()\ndb := NewDatabase(cfg)\nstore := NewUserStore(db)\nsvc := NewUserService(store)\napi := NewAPI(svc)\napi.Run()\n\u002F\u002F No automatic shutdown, health checks, or lazy loading\n```\n\n**google\u002Fwire**:\n\n```go\n\u002F\u002F wire.go — then run: wire .\u002F...\nfunc InitializeAPI() (*API, error) {\n    wire.Build(NewConfig, NewDatabase, NewUserStore, NewUserService, NewAPI)\n    return nil, nil\n}\n\u002F\u002F No shutdown or health check support\n```\n\n**uber-go\u002Ffx**:\n\n```go\napp := fx.New(\n    fx.Provide(NewConfig, NewDatabase, NewUserStore, NewUserService),\n    fx.Invoke(func(api *API) { api.Run() }),\n)\napp.Run() \u002F\u002F manages lifecycle, but reflection-based\n```\n\n## Testing with DI\n\nDI makes testing straightforward — inject mocks instead of real implementations:\n\n```go\n\u002F\u002F Define a mock\ntype MockUserStore struct {\n    users map[string]*User\n}\n\nfunc (m *MockUserStore) FindByID(ctx context.Context, id string) (*User, error) {\n    u, ok := m.users[id]\n    if !ok {\n        return nil, ErrNotFound\n    }\n    return u, nil\n}\n\n\u002F\u002F Test with manual injection\nfunc TestUserService_GetUser(t *testing.T) {\n    mock := &MockUserStore{\n        users: map[string]*User{\"1\": {ID: \"1\", Name: \"Alice\"}},\n    }\n    svc := NewUserService(mock, nil, slog.Default())\n\n    user, err := svc.GetUser(context.Background(), \"1\")\n    if err != nil {\n        t.Fatalf(\"unexpected error: %v\", err)\n    }\n    if user.Name != \"Alice\" {\n        t.Errorf(\"got %q, want %q\", user.Name, \"Alice\")\n    }\n}\n```\n\n## When to Adopt a DI Library\n\n| Signal | Action |\n| --- | --- |\n| \u003C 10 services, simple dependencies | Stay with manual constructor injection |\n| 10-20 services, some cross-cutting concerns | Consider a DI library |\n| 20+ services, lifecycle management needed | Strongly recommended |\n| Need health checks, graceful shutdown | Use a library with built-in lifecycle support |\n| Team unfamiliar with DI concepts | Start manual, migrate incrementally |\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Global variables as dependencies | Pass through constructors or DI container |\n| `init()` for service setup | Explicit initialization in `main()` or container |\n| Depending on concrete types | Accept interfaces at consumption boundaries |\n| Passing the container everywhere (service locator) | Inject specific dependencies, not the container |\n| Deep dependency chains (A->B->C->D->E) | Flatten — most services should depend on repositories and config directly |\n| Creating a new container per request | One container per application; use scopes for request-level isolation |\n\n## Cross-References\n\n- → See [golang-structs-interfaces](..\u002Fgolang-structs-interfaces\u002FSKILL.md) for interface design and composition\n- → See [golang-project-layout](..\u002Fgolang-project-layout\u002FSKILL.md) for DI initialization placement\n\n## References\n\n- [google\u002Fwire user guide](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fblob\u002Fmain\u002Fdocs\u002Fguide.md)\n- [uber-go\u002Ffx documentation](https:\u002F\u002Fuber-go.github.io\u002Ffx\u002F)\n- [uber-go\u002Fdig](https:\u002F\u002Fgithub.com\u002Fuber-go\u002Fdig)\n","**Persona:** You are a Go software architect. You guide teams toward testable, loosely coupled designs — you choose the simplest DI approach that solves the problem, and you never over-engineer.\n\n**Modes:**\n\n- **Design mode** (new project, new service, or adding a service to an existing DI setup): assess the existing dependency graph and lifecycle needs; recommend manual injection or a library from the decision table; then generate the wiring code.\n- **Refactor mode** (existing coupled code): use up to 3 parallel sub-agents — Agent 1 identifies global variables and `init()` service setup, Agent 2 maps concrete type dependencies that should become interfaces, Agent 3 locates service-locator anti-patterns (container passed as argument) — then consolidate findings and propose a migration plan.\n\n> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-dependency-injection` skill takes precedence.\n\n# Dependency Injection in Go\n\nDependency injection (DI) means passing dependencies to a component rather than having it create or find them. In Go, this is how you build testable, loosely coupled applications — your services declare what they need, and the caller (or container) provides it.\n\nThis skill is not exhaustive. When using a DI library (google\u002Fwire, uber-go\u002Fdig, uber-go\u002Ffx), refer to the library's official documentation and code examples for current API signatures.\n\nFor interface-based design foundations (accept interfaces, return structs), see the `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill.\n\n## Best Practices Summary\n\n1. Dependencies MUST be injected via constructors — NEVER use global variables or `init()` for service setup\n2. Small projects (\u003C 10 services) SHOULD use manual constructor injection — no library needed\n3. Interfaces MUST be defined where consumed, not where implemented — accept interfaces, return structs\n4. NEVER use global registries or package-level service locators\n5. The DI container MUST only exist at the composition root (`main()` or app startup) — NEVER pass the container as a dependency\n6. **Prefer lazy initialization** — only create services when first requested\n7. **Use singletons for stateful services** (DB connections, caches) and transients for stateless ones\n8. **Mock at the interface boundary** — DI makes this trivial\n9. **Keep the dependency graph shallow** — deep chains signal design problems\n10. **Choose the right DI library** for your project size and team — see the decision table below\n\n## Why Dependency Injection?\n\n| Problem without DI | How DI solves it |\n| --- | --- |\n| Functions create their own dependencies | Dependencies are injected — swap implementations freely |\n| Testing requires real databases, APIs | Pass mock implementations in tests |\n| Changing one component breaks others | Loose coupling via interfaces — components don't know each other's internals |\n| Services initialized everywhere | Centralized container manages lifecycle (singleton, factory, lazy) |\n| All services loaded at startup | Lazy loading — services created only when first requested |\n| Global state and `init()` functions | Explicit wiring at startup — predictable, debuggable |\n\nDI shines in applications with many interconnected services — HTTP servers, microservices, CLI tools with plugins. For a small script with 2-3 functions, manual wiring is fine. Don't over-engineer.\n\n## Manual Constructor Injection (No Library)\n\nFor small projects, pass dependencies through constructors. See [Manual DI examples](.\u002Freferences\u002Fmanual-di.md) for a complete application example.\n\n```go\n\u002F\u002F ✓ Good — explicit dependencies, testable\ntype UserService struct {\n    db     UserStore\n    mailer Mailer\n    logger *slog.Logger\n}\n\nfunc NewUserService(db UserStore, mailer Mailer, logger *slog.Logger) *UserService {\n    return &UserService{db: db, mailer: mailer, logger: logger}\n}\n\n\u002F\u002F main.go — manual wiring\nfunc main() {\n    logger := slog.Default()\n    db := postgres.NewUserStore(connStr)\n    mailer := smtp.NewMailer(smtpAddr)\n    userSvc := NewUserService(db, mailer, logger)\n    orderSvc := NewOrderService(db, logger)\n    api := NewAPI(userSvc, orderSvc, logger)\n    api.ListenAndServe(\":8080\")\n}\n```\n\n```go\n\u002F\u002F ✗ Bad — hardcoded dependencies, untestable\ntype UserService struct {\n    db *sql.DB\n}\n\nfunc NewUserService() *UserService {\n    db, _ := sql.Open(\"postgres\", os.Getenv(\"DATABASE_URL\")) \u002F\u002F hidden dependency\n    return &UserService{db: db}\n}\n```\n\nManual DI breaks down when:\n\n- You have 15+ services with cross-dependencies\n- You need lifecycle management (health checks, graceful shutdown)\n- You want lazy initialization or scoped containers\n- Wiring order becomes fragile and hard to maintain\n\n## DI Library Comparison\n\nGo has two main approaches to DI libraries:\n\n- [google\u002Fwire examples](.\u002Freferences\u002Fgoogle-wire.md) — Compile-time code generation\n- [uber-go\u002Fdig + fx examples](.\u002Freferences\u002Fuber-dig-fx.md) — Reflection-based framework\n\n### Decision Table\n\n| Criteria | Manual | google\u002Fwire | uber-go\u002Fdig + fx |\n| --- | --- | --- | --- |\n| **Project size** | Small (\u003C 10 services) | Medium-Large | Large |\n| **Type safety** | Compile-time | Compile-time (codegen) | Runtime (reflection) |\n| **Code generation** | None | Required (`wire_gen.go`) | None |\n| **Reflection** | None | None | Yes |\n| **API style** | N\u002FA | Provider sets + build tags | Struct tags + decorators |\n| **Lazy loading** | Manual | N\u002FA (all eager) | Built-in (fx) |\n| **Singletons** | Manual | Built-in | Built-in |\n| **Transient\u002Ffactory** | Manual | Manual | Built-in |\n| **Scopes\u002Fmodules** | Manual | Provider sets | Module system (fx) |\n| **Health checks** | Manual | Manual | Manual |\n| **Graceful shutdown** | Manual | Manual | Built-in (fx) |\n| **Debugging** | Print statements | Compile errors | `fx.Visualize()` |\n| **Go version** | Any | Any | Any |\n| **Learning curve** | None | Medium | High |\n\n### Quick Comparison: Same App, Four Ways\n\nThe dependency graph: `Config -> Database -> UserStore -> UserService -> API`\n\n**Manual**:\n\n```go\ncfg := NewConfig()\ndb := NewDatabase(cfg)\nstore := NewUserStore(db)\nsvc := NewUserService(store)\napi := NewAPI(svc)\napi.Run()\n\u002F\u002F No automatic shutdown, health checks, or lazy loading\n```\n\n**google\u002Fwire**:\n\n```go\n\u002F\u002F wire.go — then run: wire .\u002F...\nfunc InitializeAPI() (*API, error) {\n    wire.Build(NewConfig, NewDatabase, NewUserStore, NewUserService, NewAPI)\n    return nil, nil\n}\n\u002F\u002F No shutdown or health check support\n```\n\n**uber-go\u002Ffx**:\n\n```go\napp := fx.New(\n    fx.Provide(NewConfig, NewDatabase, NewUserStore, NewUserService),\n    fx.Invoke(func(api *API) { api.Run() }),\n)\napp.Run() \u002F\u002F manages lifecycle, but reflection-based\n```\n\n## Testing with DI\n\nDI makes testing straightforward — inject mocks instead of real implementations:\n\n```go\n\u002F\u002F Define a mock\ntype MockUserStore struct {\n    users map[string]*User\n}\n\nfunc (m *MockUserStore) FindByID(ctx context.Context, id string) (*User, error) {\n    u, ok := m.users[id]\n    if !ok {\n        return nil, ErrNotFound\n    }\n    return u, nil\n}\n\n\u002F\u002F Test with manual injection\nfunc TestUserService_GetUser(t *testing.T) {\n    mock := &MockUserStore{\n        users: map[string]*User{\"1\": {ID: \"1\", Name: \"Alice\"}},\n    }\n    svc := NewUserService(mock, nil, slog.Default())\n\n    user, err := svc.GetUser(context.Background(), \"1\")\n    if err != nil {\n        t.Fatalf(\"unexpected error: %v\", err)\n    }\n    if user.Name != \"Alice\" {\n        t.Errorf(\"got %q, want %q\", user.Name, \"Alice\")\n    }\n}\n```\n\n## When to Adopt a DI Library\n\n| Signal | Action |\n| --- | --- |\n| \u003C 10 services, simple dependencies | Stay with manual constructor injection |\n| 10-20 services, some cross-cutting concerns | Consider a DI library |\n| 20+ services, lifecycle management needed | Strongly recommended |\n| Need health checks, graceful shutdown | Use a library with built-in lifecycle support |\n| Team unfamiliar with DI concepts | Start manual, migrate incrementally |\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Global variables as dependencies | Pass through constructors or DI container |\n| `init()` for service setup | Explicit initialization in `main()` or container |\n| Depending on concrete types | Accept interfaces at consumption boundaries |\n| Passing the container everywhere (service locator) | Inject specific dependencies, not the container |\n| Deep dependency chains (A->B->C->D->E) | Flatten — most services should depend on repositories and config directly |\n| Creating a new container per request | One container per application; use scopes for request-level isolation |\n\n## Cross-References\n\n- → See [golang-structs-interfaces](..\u002Fgolang-structs-interfaces\u002FSKILL.md) for interface design and composition\n- → See [golang-project-layout](..\u002Fgolang-project-layout\u002FSKILL.md) for DI initialization placement\n\n## References\n\n- [google\u002Fwire user guide](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fwire\u002Fblob\u002Fmain\u002Fdocs\u002Fguide.md)\n- [uber-go\u002Ffx documentation](https:\u002F\u002Fuber-go.github.io\u002Ffx\u002F)\n- [uber-go\u002Fdig](https:\u002F\u002Fgithub.com\u002Fuber-go\u002Fdig)\n",{"name":5,"license":15,"metadata":44,"description":7,"allowed-tools":54,"compatibility":55,"user-invocable":40},{"author":45,"version":46,"openclaw":47},"samber","1.0",{"emoji":48,"install":49,"homepage":50,"requires":51},"?",[],"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills",{"bins":52},[53],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs","Designed for Claude Code or similar AI coding agents, and for projects using Golang.","main","f1ec08caf4f3441b371842829bc5b7e2fae2b11a","skills\u002Fgo\u002Fgolang-dependency-injection","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho","2026-04-04 09:40:33",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add paulohgodinho\u002Fskills --skill golang-dependency-injection",{"tool":67,"command":68},"bunx","bunx skills add paulohgodinho\u002Fskills --skill golang-dependency-injection",{"tool":70,"command":71},"pnpm","pnpm dlx skills add paulohgodinho\u002Fskills --skill golang-dependency-injection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002FSKILL.md",true,[75,81,85,89],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"evals\u002Fevals.json","REFERENCE","参考文档",12046,"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002Fevals\u002Fevals.json",{"path":82,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fgoogle-wire.md",2445,"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002Freferences\u002Fgoogle-wire.md",{"path":86,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fmanual-di.md",2182,"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002Freferences\u002Fmanual-di.md",{"path":90,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fuber-dig-fx.md",3500,"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002Freferences\u002Fuber-dig-fx.md",[94,113,131,148,164,177],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6JZD7VH66ESK96RANN6C5J1","golang-structs-interfaces","Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON\u002FYAML\u002FDB serialization, or choosing between pointer and value receivers. Also use when the user asks about \"accept interfaces, return structs\", compile-time interface checks, or composing small interfaces into larger ones.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-structs-interfaces\u002FSKILL.md",[],[19,101,102,103,37,36,104,34,32,24,105,23,106,107,108,27,109,110,111,112],"golang structs interfaces","design","writing","Composition","write","design patterns","time","db","embedding","types","interface","implementing",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":39},"01M6JZD385E2VQ9MEPJGZK2RH5","golang-project-layout","Provides a guide for setting up Golang project layouts and workspaces. Use this whenever starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, or deciding on directory structure. Apply this for any Go project initialization or restructuring work.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-project-layout\u002FSKILL.md",[],[19,120,121,122,123,124,37,125,36,34,32,126,127,24,105,30,128,56,129,130],"golang project layout","project","layout","directory","cli","packages","monorepo","work","workspaces","structure","initialization",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":39},"01M6JZCXBFYKM5A7W8QHBG5SP6","golang-naming","Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters\u002Fsetters, functional options, acronyms, test functions, and subtest names. Use this skill when writing new Go code, reviewing or refactoring, choosing between naming alternatives (New vs NewTypeName, isConnected vs connected, ErrNotFound vs NotFoundError, StatusReady vs StatusUnknown at iota 0), debating Go package names (utils\u002Fhelpers anti-patterns), or asking about Go naming best practices. Also trigger when the user mentions MixedCaps vs snake_case, ALL_CAPS constants, Get-prefix on getters, or error string casing. Do NOT use for general Go implementation questions that don't involve naming decisions.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-naming\u002FSKILL.md",[],[19,138,139,103,37,125,36,34,33,32,24,140,141,142,27,143,144,145,146,147],"golang naming","naming","anti-patterns","options","get","error","functional","errors","utils","at",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":39},"01M6JZCRJPW41M4A70HYKEMN19","golang-lint","Provides linting best practices and golangci-lint configuration for Go projects. Covers running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and managing linter settings. Use this skill whenever the user runs linters, configures golangci-lint, asks about lint warnings or suppressions, sets up code quality tooling, or asks which linters to enable for a Go project. Also use when the user mentions golangci-lint, go vet, staticcheck, revive, or any Go linting tool.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-linter\u002FSKILL.md",[],[155,19,156,53,37,36,157,34,32,158,159,160,24,105,161,30,121,27,162,163],"lint","golang lint","git","coding","linter","brew","edit","linting","which",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":39},"01M6JZCKDKSZ49ZH7ZS4STSMC7","golang-design-patterns","Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, and streaming. Apply when designing Go APIs, structuring applications, choosing between patterns, making design decisions, architectural choices, or production hardening.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002FSKILL.md",[],[102,19,106,171,172,38,37,173,36,174,34,32,24,23,175,141,27,143,144,176],"golang design patterns","patterns","resilience","streaming","shutdown","resource management",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":39},"01M6JZC9YB4PHATT09BNY5B4WK","golang-code-style","Golang code style, formatting and conventions. Use when writing code, reviewing style, configuring linters, writing comments, or establishing project standards.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-code-style\u002FSKILL.md",[],[184,36,19,185,186,103,53,37,157,34,32,158,24,105,161,187,121,188,27,189],"code style","golang code style","style","standards","formatting","for"]