architecture-patterns
This skill should be used for system design, design patterns, architectural decisions, SOLID principles, clean code structure, code organization, refactoring strategy, software architecture
When & Why to Use This Skill
This Claude skill provides expert guidance on software architecture and system design, enabling developers to build scalable, maintainable, and robust applications. It focuses on implementing industry-standard design patterns, adhering to SOLID principles, and establishing clean code structures through strategic refactoring and informed architectural decision-making.
Use Cases
- System Design Planning: Defining the high-level structure of new applications using Layered or Clean Architecture to ensure long-term scalability.
- Code Refactoring Strategy: Analyzing legacy codebases to identify technical debt and applying refactoring patterns to improve code organization and maintainability.
- SOLID Principle Integration: Auditing and restructuring code to comply with SOLID principles, ensuring components are decoupled and easily testable.
- Design Pattern Selection: Choosing and implementing appropriate structural and behavioral patterns, such as Repository or Service Layer, to solve specific software engineering challenges.
- Architectural Decision Making: Evaluating trade-offs between different architectural styles and documenting decisions to maintain consistent system integrity.
| name | architecture-patterns |
|---|---|
| description | This skill should be used for system design, design patterns, architectural decisions, SOLID principles, clean code structure, code organization, refactoring strategy, software architecture |
| whenToUse | Architecture design, design patterns, system structure, code organization, refactoring, clean code, SOLID, dependency injection, layered architecture |
| whenNotToUse | Simple implementations, established patterns, trivial changes |
| - skill | superpowers:systematic-debugging |
| when | debugging complex architectural issues, tracing behavior |
Architecture Patterns
Common architectural patterns and design decisions.
Layered Architecture
Presentation → Business Logic → Data Access → Database
Clean Architecture
Controllers
↓
Use Cases
↓
Entities
Common Patterns
Repository
interface UserRepository {
findById(id): User
save(user): void
}
Service Layer
class UserService {
constructor(repo: UserRepository)
createUser(data): User
}
Dependency Injection
- Pass dependencies via constructor
- Program to interfaces, not implementations
- Enables testing with mocks
Design Principles
- SOLID: Single responsibility, Open/closed, Liskov, Interface segregation, Dependency inversion
- DRY: Don't repeat yourself
- KISS: Keep it simple
- YAGNI: You aren't gonna need it