‹ 首页

clean-architecture

@wondelai · 收录于 1 周前 · 上游提交 1 周前

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.

适合你,如果正在设计或重构分层架构,想让业务逻辑独立于框架和数据库

/ 通过 npx 安装 校验哈希
npx oh-my-skill add wondelai/skills/clean-architecture
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- wondelai/skills/clean-architecture
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify wondelai/skills/clean-architecture
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
1589GitHub stars
~3.3K最小装载
~21.4K含声明引用
~21.4K文本包总量
镜像托管

怎么用

商店整理自技能原文 · 版本 326b380 · 表述以原文为准
它做什么

Claude 会帮你按照依赖规则组织软件架构,确保业务逻辑独立于框架、数据库等外部细节。它会分析你的代码分层,指出依赖方向是否正确,并给出修复建议。

什么时候触发

当你提到“架构分层”、“依赖规则”、“六边形架构”等关键词,或询问业务逻辑该放哪、如何解耦数据库时触发。

装好后可以这样说
Claude 会分析代码分层和依赖方向。
Claude 会解释实体、用例等层的职责。
Claude 会建议使用接口适配器模式。

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。