/frontend-skills:frontend-architecturefrom frontend-skills
Code organization and architecture decisions for React 19 + Next.js 15 App Router (TypeScript). WHERE code lives, not HOW to write it. Covers: project folder structure, feature-based organization, component splitting rules, constants/utils/helpers/services placement, business logic separation, naming conventions, state colocation, and Next.js Server/Client Component boundary decisions. TRIGGER when: "where to put", "folder structure", "project structure", "how to organize", "where does X live", "code organization", "feature folder", "colocation", "business logic", "utils vs helpers", "constants", "component splitting", "Server Component or Client Component", "Server Action or Route Handler", "where do I place". Does NOT cover: React hooks API, component implementation style, Next.js caching/metadata features, state management APIs (use react-best-practices, next-best-practices, or typescript-expert for those).
Ships in frontend-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
WHERE code lives, not HOW to write it.
This skill covers structural and organizational decisions for React 19 + Next.js 15 App Router projects. It answers "where does this go?" — not "how do I implement it?". For component patterns and hooks API, see react-best-practices. For Next.js feature usage (caching, metadata, image optimization), see next-best-practices.
| Skill | What it covers (NOT this skill) |
|---|---|
react-best-practices | Component APIs, hooks patterns, performance, anti-patterns |
next-best-practices | RSC data fetching, caching, metadata, image optimization |
typescript-expert | Type-level programming, generic patterns, type utilities |
Is it used in only one feature?
├── YES → put it inside features/<name>/components/
│ (or colocated in the route segment if Next.js page)
└── NO → Is it a generic UI primitive (Button, Modal, Input)?
├── YES → components/ui/
└── NO (domain logic but shared) → components/ or shared/components/
Is it a pure function with no React dependency?
├── YES → Does it belong to one feature only?
│ ├── YES → features/<name>/utils.ts
│ └── NO (2+ features use it) → shared/utils/ or lib/
└── NO (uses React) → Is it a hook?
├── YES → features/<name>/hooks/ or shared/hooks/
└── NO → rethink: move React logic out
Used in one feature only?
├── YES → features/<name>/constants.ts (or colocated in the file that uses them)
└── NO → shared/constants/<domain>.constants.ts
Start with Server Component (default).
Add "use client" only if the component needs:
├── useState / useReducer
├── useEffect / useLayoutEffect
├── Browser APIs (window, document, localStorage)
├── Event handlers that trigger state changes
├── Third-party client-only libraries
└── Context consumers (that aren't server-compatible)
Rule: push "use client" as DEEP in the tree as possible.
Who calls this endpoint?
├── Your own UI (forms, buttons) → Server Action in app/lib/actions.ts
└── External system / third-party / webhook → Route Handler (route.ts)
Also Route Handler for:
├── Streaming responses
├── Large file uploads
└── Public REST API
"use client" last resort| File | What it covers |
|---|---|
| rules/folder-structure.md | Canonical directory tree, org strategies, src/ vs root |
| rules/feature-organization.md | features/ dir anatomy, boundary rules, FSD overview |
| rules/component-splitting.md | When to split, SRP test, composition patterns |
| rules/constants-utils.md | constants.ts, utils/, helpers/, services/ — what goes where |
| rules/business-logic.md | 3-layer model, hooks, API layer, DTOs |
| rules/naming-conventions.md | File/folder/export naming rules |
| rules/state-placement.md | Colocation, lifting state, Zustand scoping |
| rules/nextjs-specifics.md | Server/Client boundary, Server Actions, Route Handlers, route groups |
All 51 research URLs → README.md
README.md (opens in a new tab)rules/business-logic.md (opens in a new tab)rules/component-splitting.md (opens in a new tab)rules/constants-utils.md (opens in a new tab)rules/feature-organization.md (opens in a new tab)rules/folder-structure.md (opens in a new tab)rules/naming-conventions.md (opens in a new tab)rules/nextjs-specifics.md (opens in a new tab)rules/state-placement.md (opens in a new tab)tile.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/next-best-practicesNext.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling/react-best-practicesModern React best practices and anti-pattern catalog (2025-26). Use when writing, reviewing, or refactoring React components, hooks, and state management. Covers component design, state patterns, hooks misuse, performance, data fetching, and code organization.Other plugins' skills for the same job
npx claudepluginhub burnjohn/ai-demo-marketplace --plugin frontend-skills