[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FT72FW9WDWYWSTSYMHWD4":3,"skill-same:01M74FT72FW9WDWYWSTSYMHWD4":57},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M74FT72FW9WDWYWSTSYMHWD4","dependency-injection-architecture",null,"Astrumon\u002Fspovishun-skills","Astrumon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F67917191?v=4","01M74FSGPFMM3XWY2PMSEN8Z2W","Danylo Bidnyk","01M74FSGQ12JX4QM4FEY6NEH6N",0,"MIT","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdependency-injection-architecture\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"# Dependency Injection & Architecture (Kotlin)\n\nExpert in clean architecture and dependency injection for Kotlin applications.\n\n## Workflow\n\n1. Identify whether the task is about layer boundaries or Koin wiring.\n2. Match it to the **Decision Table** below.\n3. Read `references\u002F\u003Cchosen>.md` using the `Read` tool.\n4. Apply the patterns, enforcing the Always-Active Rules below.\n\n## Decision Table\n\n| If the task is about… | Read first |\n|---|---|\n| Layer responsibilities, allowed dependency direction, per-layer hard rules | `references\u002Flayers.md` |\n| Koin modules, `single`\u002F`factory`, profile-based config, naming, adding a service, coroutine scope \u002F `CoroutineExceptionHandler` provider | `references\u002Fkoin-patterns.md` |\n\n## Always-Active Rules\n\n- Dependency direction is `presentation → domain ← data`; `common` has zero project imports.\n- Only `data\u002Fdb\u002FDatabaseFactory.kt` may use `Dispatchers.IO`.\n- Prefer constructor injection over `by inject()` — it is explicit and testable.\n- Use interface types for all repository\u002Fservice bindings.\n- Never inject the DI container itself (service-locator anti-pattern).\n- Use `Service`, never `UseCase`, for the naming of domain orchestration classes.\n- Provide `CoroutineExceptionHandler` as its own DI dependency keyed by a typed qualifier (annotation class, not string `@Named`), then compose the scope as `CoroutineScope(SupervisorJob() + dispatcher + exceptionHandler)`. A scope without an injected handler silently swallows background exceptions.\n\n## Do NOT\n\n- Do NOT load both reference files unless the task spans layering and wiring.\n- Do NOT put business logic in `presentation\u002F` Command classes.\n- Do NOT import Exposed\u002FJDBC or the Telegram SDK into `domain\u002F`.\n- Do NOT create circular dependencies — redesign with an intermediate service.\n\n## Error Handling\n\n- If the task does not match a Decision Table row, ask the user to clarify.\n- If a reference file is missing, STOP and report the expected path.\n\n## Related Skills\n\n- `kotlin-specialist` — coroutine scope ownership and dispatcher rules wired through DI\n- `unit-testing-kotlin` — MockImpl bindings and how DI enables test doubles\n- `postgresql-exposed-orm` — `DatabaseFactory` is the single `Dispatchers.IO` owner referenced above\n",{},"main","4ad702b3d4f403306c1a016277020693dd669f55","skills\u002Fdependency-injection-architecture","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills","https:\u002F\u002Fgithub.com\u002FAstrumon","Software Engineer","2026-10-14 01:01:46",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Astrumon\u002Fspovishun-skills --skill dependency-injection-architecture",{"tool":35,"command":36},"bunx","bunx skills add Astrumon\u002Fspovishun-skills --skill dependency-injection-architecture",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Astrumon\u002Fspovishun-skills --skill dependency-injection-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdependency-injection-architecture\u002FSKILL.md",true,[43,49,53],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"manifest.yaml","REFERENCE","参考文档",563,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdependency-injection-architecture\u002Fmanifest.yaml",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fkoin-patterns.md",3869,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdependency-injection-architecture\u002Freferences\u002Fkoin-patterns.md",{"path":54,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Flayers.md",962,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdependency-injection-architecture\u002Freferences\u002Flayers.md",[58,64,70,77,82,87],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M74FX71JH2KNG5KX7TZHSKCB","universal-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Funiversal-skill\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M74FX57GTEFPJVCPWPSP6CCW","notion-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Fnotion-skill\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M74FX30F3K8906P5ASQ3DNXR","inline-frontmatter-skill","Hand-authored description that already lives in the body and must not be double-wrapped.","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Finline-frontmatter-skill\u002FSKILL.md",[],[],{"skillNo":78,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M74FX18AGHM2KHQ502PMJZRJ","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource-v2\u002Fskills\u002Funiversal-skill\u002FSKILL.md",[],[],{"skillNo":83,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M74FWZJ193G810P0ZJ1PKEZ9","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource-v2\u002Fskills\u002Fnotion-skill\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M74FWPNEZWWGQ2Q37N6MMWP1","write-a-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[],[]]