Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/sequenzia/claude-alchemy/blob/main/claude-tools/dev-tools/skills/architecture-patterns/SKILL.md -a claude-code --skill architecture-patternsInstallation paths:
.claude/skills/architecture-patterns/# Architecture Patterns
This skill provides knowledge about common architectural patterns to help design feature implementations. Apply these patterns based on the project's existing architecture and the feature's requirements.
## Pattern Selection Guide
Choose patterns based on:
1. **Existing architecture** - Match what's already in use
2. **Team familiarity** - Use patterns the team knows
3. **Feature requirements** - Some patterns fit better for certain features
4. **Scale requirements** - Consider current and future scale
---
## Layered Architecture (N-Tier)
**When to use:** Most web applications, CRUD operations, clear separation of concerns needed
**Layers:**
```
┌─────────────────────────┐
│ Presentation Layer │ UI, API endpoints, controllers
├─────────────────────────┤
│ Application Layer │ Use cases, orchestration, DTOs
├─────────────────────────┤
│ Domain Layer │ Business logic, entities, rules
├─────────────────────────┤
│ Infrastructure Layer │ Database, external services, I/O
└─────────────────────────┘
```
**Key rules:**
- Dependencies flow downward only
- Each layer only talks to the layer directly below
- Domain layer has no external dependencies
**Implementation tips:**
- Use interfaces at layer boundaries
- Keep domain logic in the domain layer, not controllers
- Use DTOs to transfer data between layers
---
## MVC (Model-View-Controller)
**When to use:** Web applications with server-rendered views, simple CRUD apps
**Components:**
```
User → Controller → Model → Controller → View → User
↓ ↑
Updates Reads
```
**Model:** Data and business logic
**View:** Presentation/UI
**Controller:** Handles input, coordinates model and view
**Implementation tips:**
- Keep controllers thin - delegate to services
- Models should be framework-agnostic when possible
- Views should have minimal logic
---
## Repository Pattern
**When to use:** Data access abstraction, testability, multiple