Skills/00_Core_Utilities/meta/software-architecture/SKILL.md
软件架构设计模式与最佳实践
npx skillsauth add liyecom/liye-ai software-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
来源: ComposioHQ/awesome-claude-skills 适配: LiYe OS 三层架构
实现设计模式,包括 Clean Architecture、SOLID 原则、GoF 设计模式等软件设计最佳实践。
当需要架构设计指导时:
┌─────────────────────────────────────────┐
│ External Interfaces │
│ (UI, DB, Web, Devices, External APIs) │
├─────────────────────────────────────────┤
│ Interface Adapters │
│ (Controllers, Gateways, Presenters) │
├─────────────────────────────────────────┤
│ Application Layer │
│ (Use Cases, Services) │
├─────────────────────────────────────────┤
│ Domain Layer │
│ (Entities, Business Rules) │
└─────────────────────────────────────────┘
| 原则 | 含义 | 示例 | |------|------|------| | Single Responsibility | 单一职责 | 一个类只做一件事 | | Open/Closed | 开闭原则 | 对扩展开放,对修改关闭 | | Liskov Substitution | 里氏替换 | 子类可替换父类 | | Interface Segregation | 接口隔离 | 细粒度接口 | | Dependency Inversion | 依赖倒置 | 依赖抽象而非实现 |
创建型模式:
结构型模式:
行为型模式:
# ADR-001: 选择 PostgreSQL 作为主数据库
## 状态
已接受
## 背景
需要选择生产环境数据库...
## 决策
选择 PostgreSQL 因为...
## 后果
正面: ...
负面: ...
用户: 帮我设计一个电商后端的架构
Claude: [使用 software-architecture 设计分层结构、定义边界、选择模式]
用户: 这个模块太复杂了,帮我重构
Claude: [使用 software-architecture 识别问题、应用 SOLID、提取模式]
用户: 帮我评审这个项目的架构
Claude: [使用 software-architecture 检查依赖方向、职责划分、扩展性]
无外部依赖,纯方法论技能。
此技能被以下业务域引用:
本技能的原则与 LiYe OS 架构宪章一致:
Created: 2025-12-28 | Adapted for LiYe OS
tools
SFC patched skill. Use when "ui-ux" is relevant.
data-ai
持续改进方法论 - 基于精益思想
tools
Claude Skills 创建指南与最佳实践
data-ai
提示工程技术与 Agent 设计模式