[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FE9GKTNBGNE65WCV0FQ4HH":3,"skill-same:01M6FE9GKTNBGNE65WCV0FQ4HH":48},{"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":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6FE9GKTNBGNE65WCV0FQ4HH","clean-architecture",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fpproenca\u002Fdot-skills\u002Fclean-architecture\u002FSKILL.md",[],[18,19,20],"architecture","clean","clean architecture","2026-11-10 10:12:30",false,"# Clean Architecture Best Practices\n\nComprehensive guide to Clean Architecture principles for designing maintainable, testable software systems. Based on Robert C. Martin's \"Clean Architecture: A Craftsman's Guide to Software Structure and Design.\" Contains 42 rules across 8 categories, prioritized by architectural impact.\n\n## When to Apply\n\nReference these guidelines when:\n- Designing new software systems or modules\n- Structuring dependencies between layers\n- Defining boundaries between business logic and infrastructure\n- Reviewing code for architectural violations\n- Refactoring coupled systems toward cleaner structure\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | Dependency Direction | CRITICAL | `dep-` |\n| 2 | Entity Design | CRITICAL | `entity-` |\n| 3 | Use Case Isolation | HIGH | `usecase-` |\n| 4 | Component Cohesion | HIGH | `comp-` |\n| 5 | Boundary Definition | MEDIUM-HIGH | `bound-` |\n| 6 | Interface Adapters | MEDIUM | `adapt-` |\n| 7 | Framework Isolation | MEDIUM | `frame-` |\n| 8 | Testing Architecture | LOW-MEDIUM | `test-` |\n\n## Quick Reference\n\n### 1. Dependency Direction (CRITICAL)\n\n- [`dep-inward-only`](references\u002Fdep-inward-only.md) - Source dependencies point inward only\n- [`dep-interface-ownership`](references\u002Fdep-interface-ownership.md) - Interfaces belong to clients not implementers\n- [`dep-no-framework-imports`](references\u002Fdep-no-framework-imports.md) - Avoid framework imports in inner layers\n- [`dep-data-crossing-boundaries`](references\u002Fdep-data-crossing-boundaries.md) - Use simple data structures across boundaries\n- [`dep-acyclic-dependencies`](references\u002Fdep-acyclic-dependencies.md) - Eliminate cyclic dependencies between components\n- [`dep-stable-abstractions`](references\u002Fdep-stable-abstractions.md) - Depend on stable abstractions not volatile concretions\n\n### 2. Entity Design (CRITICAL)\n\n- [`entity-pure-business-rules`](references\u002Fentity-pure-business-rules.md) - Entities contain only enterprise business rules\n- [`entity-no-persistence-awareness`](references\u002Fentity-no-persistence-awareness.md) - Entities must not know how they are persisted\n- [`entity-encapsulate-invariants`](references\u002Fentity-encapsulate-invariants.md) - Encapsulate business invariants within entities\n- [`entity-value-objects`](references\u002Fentity-value-objects.md) - Use value objects for domain concepts\n- [`entity-rich-not-anemic`](references\u002Fentity-rich-not-anemic.md) - Build rich domain models not anemic data structures\n\n### 3. Use Case Isolation (HIGH)\n\n- [`usecase-single-responsibility`](references\u002Fusecase-single-responsibility.md) - Each use case has one reason to change\n- [`usecase-input-output-ports`](references\u002Fusecase-input-output-ports.md) - Define input and output ports for use cases\n- [`usecase-orchestrates-not-implements`](references\u002Fusecase-orchestrates-not-implements.md) - Use cases orchestrate entities not implement business rules\n- [`usecase-no-presentation-logic`](references\u002Fusecase-no-presentation-logic.md) - Use cases must not contain presentation logic\n- [`usecase-explicit-dependencies`](references\u002Fusecase-explicit-dependencies.md) - Declare all dependencies explicitly in constructor\n- [`usecase-transaction-boundary`](references\u002Fusecase-transaction-boundary.md) - Use case defines the transaction boundary\n\n### 4. Component Cohesion (HIGH)\n\n- [`comp-screaming-architecture`](references\u002Fcomp-screaming-architecture.md) - Structure should scream the domain not the framework\n- [`comp-common-closure`](references\u002Fcomp-common-closure.md) - Group classes that change together\n- [`comp-common-reuse`](references\u002Fcomp-common-reuse.md) - Avoid forcing clients to depend on unused code\n- [`comp-reuse-release-equivalence`](references\u002Fcomp-reuse-release-equivalence.md) - Release components as cohesive units\n- [`comp-stable-dependencies`](references\u002Fcomp-stable-dependencies.md) - Depend in the direction of stability\n\n### 5. Boundary Definition (MEDIUM-HIGH)\n\n- [`bound-humble-object`](references\u002Fbound-humble-object.md) - Use humble objects at architectural boundaries\n- [`bound-partial-boundaries`](references\u002Fbound-partial-boundaries.md) - Use partial boundaries when full separation is premature\n- [`bound-boundary-cost-awareness`](references\u002Fbound-boundary-cost-awareness.md) - Weigh boundary cost against ignorance cost\n- [`bound-main-component`](references\u002Fbound-main-component.md) - Treat main as a plugin to the application\n- [`bound-defer-decisions`](references\u002Fbound-defer-decisions.md) - Defer framework and database decisions\n- [`bound-service-internal-architecture`](references\u002Fbound-service-internal-architecture.md) - Services must have internal clean architecture\n\n### 6. Interface Adapters (MEDIUM)\n\n- [`adapt-controller-thin`](references\u002Fadapt-controller-thin.md) - Keep controllers thin\n- [`adapt-presenter-formats`](references\u002Fadapt-presenter-formats.md) - Presenters format data for the view\n- [`adapt-gateway-abstraction`](references\u002Fadapt-gateway-abstraction.md) - Gateways hide external system details\n- [`adapt-mapper-translation`](references\u002Fadapt-mapper-translation.md) - Use mappers to translate between layers\n- [`adapt-anti-corruption-layer`](references\u002Fadapt-anti-corruption-layer.md) - Build anti-corruption layers for external systems\n\n### 7. Framework Isolation (MEDIUM)\n\n- [`frame-domain-purity`](references\u002Fframe-domain-purity.md) - Domain layer has zero framework dependencies\n- [`frame-orm-in-infrastructure`](references\u002Fframe-orm-in-infrastructure.md) - Keep ORM usage in infrastructure layer\n- [`frame-web-in-infrastructure`](references\u002Fframe-web-in-infrastructure.md) - Web framework concerns stay in interface layer\n- [`frame-di-container-edge`](references\u002Fframe-di-container-edge.md) - Dependency injection containers live at the edge\n- [`frame-logging-abstraction`](references\u002Fframe-logging-abstraction.md) - Abstract logging behind domain interfaces\n\n### 8. Testing Architecture (LOW-MEDIUM)\n\n- [`test-tests-are-architecture`](references\u002Ftest-tests-are-architecture.md) - Tests are part of the system architecture\n- [`test-testable-design`](references\u002Ftest-testable-design.md) - Design for testability from the start\n- [`test-layer-isolation`](references\u002Ftest-layer-isolation.md) - Test each layer in isolation\n- [`test-boundary-verification`](references\u002Ftest-boundary-verification.md) - Verify architectural boundaries with tests\n\n## How to Use\n\nRead individual reference files for detailed explanations and code examples:\n\n- [Section definitions](references\u002F_sections.md) - Category structure and impact levels\n- [Rule template](assets\u002Ftemplates\u002F_template.md) - Template for adding new rules\n\n## Reference Files\n\n| File | Description |\n|------|-------------|\n| [references\u002F_sections.md](references\u002F_sections.md) | Category definitions and ordering |\n| [assets\u002Ftemplates\u002F_template.md](assets\u002Ftemplates\u002F_template.md) | Template for new rules |\n| [metadata.json](metadata.json) | Version and reference information |\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fpproenca\u002Fdot-skills\u002Fclean-architecture",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill clean-architecture",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill clean-architecture",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill clean-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fpproenca\u002Fdot-skills\u002Fclean-architecture\u002FSKILL.md",true,[],[49,58,67,76,82,88],{"skillNo":50,"name":51,"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":52,"categories":53,"keywords":54,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[55,56,57],"model","model hierarchy","model hierarchy skill",{"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":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[64,65,66],"MCP","zoom","zoom mcp",{"skillNo":68,"name":69,"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":70,"categories":71,"keywords":72,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[73,74,75,65],"sdk","zoom apps sdk","apps",{"skillNo":77,"name":78,"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":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[78],{"skillNo":83,"name":84,"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":85,"categories":86,"keywords":87,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[84],{"skillNo":89,"name":90,"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":91,"categories":92,"keywords":93,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[90]]