From specialist-agent
Transforms project architecture patterns (e.g., flat to modular, MVC to clean, monolith to modular monolith) while preserving functionality. Supports frontend/backend with full/lite variants.
How this skill is triggered — by the user, by Claude, or both
Slash command
/specialist-agent:migrate-architectureThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Migrate a project's architecture from one pattern to another while preserving all functionality.
Migrate a project's architecture from one pattern to another while preserving all functionality.
Arguments: $ARGUMENTS (e.g., "flat to modular full project", "mvc to clean lite src/modules/auth")
| Pattern | Description |
|---|---|
| Flat / Component-Driven | Single components/ dir, minimal structure |
| Modular (Feature-Based) | Vertical slicing by feature with services/adapters/types |
| Feature-Sliced Design (FSD) | Strict layered: app > pages > features > entities > shared |
| Atomic Design | Components by granularity: atoms > molecules > organisms |
| Clean Architecture | Domain > Use Cases > Adapters > Frameworks |
| Hexagonal (Ports & Adapters) | Core with ports, infrastructure in adapters |
| Pattern | Description |
|---|---|
| MVC / Layered | Horizontal: controllers, services, repositories |
| Modular Monolith | Single deployment, strict module boundaries |
| Clean Architecture | Concentric layers, dependency rule inward |
| Hexagonal | Ports & Adapters, domain isolated |
| DDD | Bounded contexts, aggregates, domain events |
| CQRS | Separate command/query paths |
| Event-Driven | Async communication via events |
| Microservices | Independent services, own databases |
| Variant | Description |
|---|---|
| Full | Complete implementation with all layers and patterns |
| Lite (Simplified) | Fewer layers, same principles. For smaller teams |
docs/ARCHITECTURE.md if it existssrc/ (or root if no src/)── Architecture Assessment ──
Current: [detected pattern] (confidence: high/medium/low)
Target: [requested pattern] ([variant])
Scope: [project | specific module/path]
Estimated files to move: X
Estimated files to create: X
Risk: low/medium/high
Execute the migration plan step by step:
docs/ARCHITECTURE.md for the target patternnpx tsc --noEmit 2>&1 | head -50
npm test 2>&1 | tail -20
── Architecture Migration Complete ──
From: [source pattern]
To: [target pattern] ([variant])
Files moved: X
Files created: X
Imports updated: X
Barrel exports created: X
Validation:
TypeScript: ✓ compiles
Import rules: ✓ no violations
Tests: ✓ passing (or N/A)
docs/ARCHITECTURE.md: ✓ generated
modules/[feature]/components/ for each groupshared/components/| Mistake | Correct Approach |
|---|---|
| Moving files without updating imports | Use TypeScript compiler to verify after each move |
| Creating empty architectural layers | Only create layers with actual content |
| Migrating everything at once | One module at a time, least coupled first |
| Skipping barrel exports | Always create index.ts - it enforces boundaries |
| Copying patterns blindly | Adapt to the project's actual needs (Full vs Lite) |
| Ignoring existing tests | Move tests alongside their source files |
npx claudepluginhub herbertjulio/specialist-agent --plugin specialist-agentUse when converting existing code to modular architecture. Detects Laravel (FuseCore or standard) / Next.js / React and applies correct modular patterns. Triggers: "modularize", "convert to modules", "migrate to modular", "restructure modules".
Designs 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.
Guides structured conversations to define repository architecture principles in clean (default), hexagonal/ports & adapters, modular monolith, or custom styles. Produces formal architecture.md document for project standards.