[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758RZAXCDFRSAH13N2R1671":3,"skill-same:01M758RZAXCDFRSAH13N2R1671":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":28,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M758RZAXCDFRSAH13N2R1671","dependency-injection",null,"Wire dependencies using constructor-based dependency injection throughout services, repositories, and handlers.","CliqRelay\u002Fcliqrelay","CliqRelay","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F290753656?v=4","01M758RPDEB11FEYA2XK17DSHA","01M758RPEKP0NKH6P43GD2FBDG",41,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbackend\u002Fdependency-injection\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: dependency-injection\ndescription: Wire dependencies using constructor-based dependency injection throughout services, repositories, and handlers.\n---\n\n# Dependency Injection & Construction\n\n## When to use this skill\n\n- Wire services, repositories, and handlers with their dependencies\n- Initialize core services during application bootstrap\n- Pass dependencies to plugins during initialization\n- Create dependency graphs that are testable and mockable\n- Avoid service locators and global state\n\n## Key principles\n\n1. **Constructor-based**: Dependencies passed via function parameters\n2. **Explicit over implicit**: Dependencies visible in constructor signatures\n3. **Interface-based**: Depend on interfaces, not concrete implementations\n4. **Single responsibility**: Each constructor handles one entity's wiring\n5. **Bootstrap concentrated**: Wiring happens in bootstrap.go and plugin Init\n\n## Pattern\n\nDependency injection flow:\n- Repositories accept bun.IDB and return interface\n- Services accept repositories and return interface\n- Use cases accept services and return struct\n- Handlers accept use cases and return struct\n- Plugins accept PluginContext, retrieve services, create dependencies\n- No global state or service locators\n\n## Example\n\nSee [examples\u002Fdi_todo_example.go](examples\u002Fdi_todo_example.go) for:\n- BuildTodosPlugin demonstrating complete DI chain\n- Bottom-up wiring (Database ??? Repository ??? Service ??? UseCase ??? Handler)\n- Dependency graph diagram\n- Unidirectional dependency flow\n\n## Common mistakes\n\n1. Circular dependencies (Service A ??? Service B ??? Service A)\n2. Lazy initialization instead of bootstrap-time\n3. Depending on concrete types instead of interfaces\n4. Creating service instances multiple times\n5. Service retrieval without type assertion\n6. Not checking ok flag on type assertion\n\n## References\n\n- [bootstrap.go](..\u002F..\u002F..\u002Fbootstrap.go) - Main DI entry point\n- [models\u002Fservices.go](..\u002F..\u002F..\u002Fmodels\u002Fservices.go) - Service ID constants\n- [internal\u002Fapi.go](..\u002F..\u002F..\u002Finternal\u002Fapi.go) - Use case wiring\n- [internal\u002Fplugins\u002Fservice_registry.go](..\u002F..\u002F..\u002Finternal\u002Fplugins\u002Fservice_registry.go) - Service registry implementation\n","# Dependency Injection & Construction\n\n## When to use this skill\n\n- Wire services, repositories, and handlers with their dependencies\n- Initialize core services during application bootstrap\n- Pass dependencies to plugins during initialization\n- Create dependency graphs that are testable and mockable\n- Avoid service locators and global state\n\n## Key principles\n\n1. **Constructor-based**: Dependencies passed via function parameters\n2. **Explicit over implicit**: Dependencies visible in constructor signatures\n3. **Interface-based**: Depend on interfaces, not concrete implementations\n4. **Single responsibility**: Each constructor handles one entity's wiring\n5. **Bootstrap concentrated**: Wiring happens in bootstrap.go and plugin Init\n\n## Pattern\n\nDependency injection flow:\n- Repositories accept bun.IDB and return interface\n- Services accept repositories and return interface\n- Use cases accept services and return struct\n- Handlers accept use cases and return struct\n- Plugins accept PluginContext, retrieve services, create dependencies\n- No global state or service locators\n\n## Example\n\nSee [examples\u002Fdi_todo_example.go](examples\u002Fdi_todo_example.go) for:\n- BuildTodosPlugin demonstrating complete DI chain\n- Bottom-up wiring (Database ??? Repository ??? Service ??? UseCase ??? Handler)\n- Dependency graph diagram\n- Unidirectional dependency flow\n\n## Common mistakes\n\n1. Circular dependencies (Service A ??? Service B ??? Service A)\n2. Lazy initialization instead of bootstrap-time\n3. Depending on concrete types instead of interfaces\n4. Creating service instances multiple times\n5. Service retrieval without type assertion\n6. Not checking ok flag on type assertion\n\n## References\n\n- [bootstrap.go](..\u002F..\u002F..\u002Fbootstrap.go) - Main DI entry point\n- [models\u002Fservices.go](..\u002F..\u002F..\u002Fmodels\u002Fservices.go) - Service ID constants\n- [internal\u002Fapi.go](..\u002F..\u002F..\u002Finternal\u002Fapi.go) - Use case wiring\n- [internal\u002Fplugins\u002Fservice_registry.go](..\u002F..\u002F..\u002Finternal\u002Fplugins\u002Fservice_registry.go) - Service registry implementation\n",{"name":5,"description":7},"main","f06510bcaf955afc66bbbc1606871e1a1576492e",".agents\u002Fskills\u002Fbackend\u002Fdependency-injection",0,"https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay","https:\u002F\u002Fcliqrelay.com","https:\u002F\u002Fgithub.com\u002FCliqRelay","Capture and refine workflows instantly to help your teams and AI agents perform at their best.","2026-11-04 22:56:05",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add CliqRelay\u002Fcliqrelay --skill dependency-injection",{"tool":38,"command":39},"bunx","bunx skills add CliqRelay\u002Fcliqrelay --skill dependency-injection",{"tool":41,"command":42},"pnpm","pnpm dlx skills add CliqRelay\u002Fcliqrelay --skill dependency-injection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbackend\u002Fdependency-injection\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"examples\u002Fdi_todo_example.go","SCRIPT","脚本",1120,"https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbackend\u002Fdependency-injection\u002Fexamples\u002Fdi_todo_example.go",[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M758WG0JG18W5MZD6ZPM6PGG","typst","Typst document creation and package development. Use when: (1) Working with .typ files, (2) User mentions typst, typst.toml, or typst-cli, (3) Creating or using Typst packages, (4) Developing document templates, (5) Converting Markdown\u002FLaTeX to Typst","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypst\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M758WACKQMHG2BFF7T758J12","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", or \"switch to --preset\".","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M758W82G2QQ5Q14FKYNHRXQW","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M758W63H60EK55A93199B6NR","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M758W4HD4PF66929V7MDGKW8","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fgrill-me\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M758VYC5CCTP7EA5VKE7YWM5","dont-waffle","Use this skill when answering questions, explaining concepts, writing technical responses, reviewing code, or helping with development tasks. Communicate in clear, simple, standard English. Keep answers concise and focused, remove unnecessary filler and repetition, explain technical ideas in plain language, and structure information so it is easy to read and understand. When showing code, present it clearly with enough context for the developer to understand what it does and where it belongs.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fdont-waffle\u002FSKILL.md",[],[]]