clean-architecture
帮助构建可维护、可测试且与框架解耦的系统架构。
基于依赖规则组织代码,保持业务规则独立于框架与基础设施。
按依赖规则把代码层次化,让业务规则不依赖框架、数据库或外部库。适合决定哪层放业务逻辑、想把数据库/框架抽离或准备换技术栈时用。特色是“依赖指向内层”,配合 ports and adapters、onion 架构和 SOLID 原则,方便替换基础设施而不动业务代码。
▸ 展开 SKILL.md 英文原文
Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to entities. Use when the user mentions "architecture layers", "dependency rule", "ports and adapters (hexagonal)", "onion architecture", "screaming architecture", "where should business logic go", "decouple from the database", "swap the framework without a rewrite", or "keep business rules independent". Also trigger when deciding which layer code belongs in, isolating core logic from infrastructure, defining module boundaries, or debating whether the framework should call your code or the reverse. Covers component principles, boundaries, and SOLID. For code-level quality, see clean-code. For domain modeling, see domain-driven-design.
帮我安装这个 skill:https://raw.githubusercontent.com/wondelai/skills/main/clean-architecture/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/wondelai/skills/main/clean-architecture/SKILL.md"# Clean Architecture Framework A disciplined approach to structuring software so that business rules remain independent of frameworks, databases, and delivery mechanisms. Apply these principles when designing system architecture, reviewing module boundaries, or advising on dependency management. ## Core Principle **Source code dependencies must point inward — toward higher-level policies.** Nothing in an inner circle can know anything about an outer circle. This single rule produces systems that are testable and independent of frameworks, UI, database, and any external agency. Business rules are what matter; databases, web frameworks, and delivery mechanisms are details — when details dep