下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“architecture-patterns”。 Design a Clean Architecture structure for a user management system
预期结果:
- Layer 1: Domain - User entity with business rules (activation, validation)
- Layer 2: Use Cases - CreateUser, UpdateUser, DeactivateUser
- Layer 3: Interface Adapters - UserController, UserPresenter
- Layer 4: Infrastructure - PostgresUserRepository, RedisCache
正在使用“architecture-patterns”。 Explain the difference between entities and value objects
预期结果:
- Entities: Have identity, mutable, equality by ID (e.g., Order, User)
- Value Objects: No identity, immutable, equality by attributes (e.g., Email, Money, Address)
安全审计
安全Static analysis flagged 32 potential issues including external_commands, env_access, and weak cryptographic algorithms. After evaluation, all findings are FALSE POSITIVES. The skill contains only documentation and Python code examples for software architecture patterns. No actual command execution, cryptographic code, or secret access exists. The flagged patterns are innocent uses of architecture terminology (domain, ports, adapters) and placeholder interface definitions.
高风险问题 (1)
中风险问题 (1)
低风险问题 (1)
质量评分
你能构建什么
设计新的后端系统
使用清洁架构和适当的分层及依赖规则设计新的后端服务。
重构单体代码库
将紧耦合代码迁移到具有清晰端口和适配器的六边形架构。
应用DDD战术模式
为复杂业务领域使用实体、值对象和聚合体实现领域模型。
试试这些提示
帮我为电子商务应用程序设计清洁架构结构。我应该创建哪些层,它们之间的依赖关系是什么?
向我展示如何使用六边形架构实现支付服务。包括端口和适配器以及Stripe示例。
为订单管理系统创建DDD领域模型。包括实体、值对象、聚合体和领域事件。
我有一个Rails单体应用程序。如何逐步迁移到清洁架构而不进行完全重写?
最佳实践
- 将业务逻辑保持在领域层,独立于框架
- 在实现适配器之前先定义清晰的接口(端口)
- 确保内层对外层一无所知
避免
- 将业务逻辑放在控制器中(肥控制器)
- 将领域逻辑与基础设施代码混合
- 创建没有行为的贫血领域模型