From framework-dev
Use when selecting architecture patterns (MVC, hexagonal, clean, microservices) for a new project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/framework-dev:architecture-patternsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides the selection of appropriate architecture patterns during Phase 2, providing decision criteria, trade-offs, and implementation guidance.
This skill guides the selection of appropriate architecture patterns during Phase 2, providing decision criteria, trade-offs, and implementation guidance.
| Pattern | Best For | Team Size | Complexity | Scalability |
|---|---|---|---|---|
| MVC | Simple CRUD apps | 1-3 | Low | Medium |
| Layered | Traditional enterprise | 3-10 | Medium | Medium |
| Hexagonal | Domain-focused apps | 3-15 | Medium-High | High |
| Clean | Complex business logic | 5-20 | High | High |
| Microservices | Large distributed systems | 10+ | Very High | Very High |
| Modular Monolith | Growing apps, unclear boundaries | 3-10 | Medium | Medium-High |
┌─────────────────────────────────────┐
│ Controller │
│ (Handles requests, routes) │
└────────────┬───────────┬────────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Model │ │ View │
│ (Data) │ │ (UI) │
└──────────┘ └──────────┘
When to Use:
Pros:
Cons:
Example Structure:
src/
├── controllers/
│ ├── userController.ts
│ └── taskController.ts
├── models/
│ ├── User.ts
│ └── Task.ts
└── views/
└── (templates or React components)
┌─────────────────────────────────────┐
│ Presentation Layer │
│ (Controllers, Views, DTOs) │
└─────────────────┬───────────────────┘
│
┌─────────────────▼───────────────────┐
│ Business Layer │
│ (Services, Domain Logic) │
└─────────────────┬───────────────────┘
│
┌─────────────────▼───────────────────┐
│ Data Access Layer │
│ (Repositories, ORM) │
└─────────────────┬───────────────────┘
│
┌─────────────────▼───────────────────┐
│ Database │
└─────────────────────────────────────┘
When to Use:
Pros:
Cons:
┌─────────────────┐
│ REST API │
│ (Adapter) │
└────────┬────────┘
│
┌─────────────┐ ┌─────────▼─────────┐ ┌─────────────┐
│ CLI │◄───│ │───►│ PostgreSQL │
│ (Adapter) │ │ DOMAIN CORE │ │ (Adapter) │
└─────────────┘ │ │ └─────────────┘
│ (Business │
┌─────────────┐ │ Logic) │ ┌─────────────┐
│ Message │◄───│ │───►│ Redis │
│ Queue │ │ [Ports define │ │ (Adapter) │
│ (Adapter) │ │ interfaces] │ └─────────────┘
└─────────────┘ └───────────────────┘
When to Use:
Pros:
Cons:
Example Structure: See references/pattern-examples.md for the complete directory structure showing domain (entities, services, ports) and adapters (primary/driving and secondary/driven) with dependency injection configuration.
See references/pattern-examples.md for the complete layer diagram. Clean Architecture uses concentric circles with dependencies pointing inward: Frameworks & Drivers (outermost) → Interface Adapters → Application Business (Use Cases) → Enterprise Business (Entities, innermost).
When to Use:
Pros:
Cons:
┌──────────┐ ┌──────────┐ ┌──────────┐
│ User │ │ Order │ │ Payment │
│ Service │ │ Service │ │ Service │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
└──────┬──────┴──────┬──────┘
│ │
┌────▼────┐ ┌────▼────┐
│API GW │ │Event Bus│
└─────────┘ └─────────┘
When to Use:
Pros:
Cons:
When NOT to Use:
See references/pattern-examples.md for the structure diagram. Single deployable with independent modules (Users, Orders, Payment) each containing domain logic and API layer, sharing common infrastructure while maintaining clear boundaries.
When to Use:
Pros:
Cons:
START
│
▼
Is the domain complex?
│
├─ NO → Is it a simple CRUD app?
│ │
│ ├─ YES → MVC
│ └─ NO → Layered Architecture
│
└─ YES → Do you need independent deployments?
│
├─ YES → Do you have 10+ developers?
│ │
│ ├─ YES → Microservices
│ └─ NO → Modular Monolith
│
└─ NO → Need to swap infrastructure easily?
│
├─ YES → Hexagonal
└─ NO → Clean Architecture
For each pattern considered:
### Pattern Research: [Name]
**Official Sources:**
- [URL to authoritative source]
**Pros for Our Project:**
- [Specific benefit]
**Cons for Our Project:**
- [Specific drawback]
**Team Familiarity:** Low | Medium | High
**Verdict:** SUITABLE | NOT SUITABLE | NEEDS DISCUSSION
During Phase 2:
npx claudepluginhub ankurjain1121/dev-workflow-skills --plugin framework-devDesigns software architecture and selects appropriate patterns (layered, clean, hexagonal) based on project size and team size. Activate when structuring new projects or making architectural decisions.
Evaluates architecture options (onion, MVC, simple) enforcing dependency direction and YAGNI-based abstraction decisions. Calls when deciding layer structure or dependency rules.
Interactively selects and routes to architecture paradigms for new systems via scenario matching, compares trade-offs, creates ADRs, evaluates fit for team size and complexity.