From nextjs-claude-code
Architecture pattern reference for Next.js & React projects. Covers Flat, Feature-Based, FSD, and Monorepo patterns with core principles, file placement, and import boundaries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/nextjs-claude-code:architecturesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reference guide for choosing and applying architecture patterns. Used by the `/init` agent when generating `spec/ARCHITECTURE.md`.
Reference guide for choosing and applying architecture patterns. Used by the /init agent when generating spec/ARCHITECTURE.md.
| Pattern | Team size | Core idea | When to use |
|---|---|---|---|
| Flat | Solo | Root-level sharing, no feature grouping | Prototypes, simple apps, < 10 features |
| Feature-Based | Small (2-5) | Self-contained feature modules with public API | Clear feature boundaries, medium complexity |
| FSD | Medium (5-15) | Strict unidirectional layer hierarchy | Complex domain logic, strict discipline needed |
| Monorepo | Large (15+) | apps/ + packages/ with Turborepo | Multiple apps, shared code, independent deploys |
Is this a solo prototype or simple app?
├─ Yes → Flat
└─ No → Does the team need strict layer rules?
├─ Yes → Is the team 15+?
│ ├─ Yes → Monorepo
│ └─ No → FSD
└─ No → Feature-Based
Flat → Feature-Based → FSD → Monorepo
Each pattern is a superset of the previous. Migration is incremental — you don't need to rewrite everything at once.
/init reads the detected pattern and applies the corresponding guide when writing spec/ARCHITECTURE.mdnpx claudepluginhub byeongminlee/nextjs-claude-code --plugin nextjs-claude-codeDesigns 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.
Initializes new projects with architecture-aware setup: researches best practices online, selects from 14 paradigms, customizes templates, creates ADRs. For uncertain architecture choices.