No slash command · from engineering-paved-path
Answers 'what goes where' on the client — the placement decision tree for every new file in an App Router project. Use when adding a page, a feature component, a shared component, a data hook, a helper, or a test and you're unsure which directory and naming pattern to follow. Use when reviewing a PR for structural correctness, or when a new contributor asks where to put something. Covers the annotated directory map, the _components/ colocation pattern with its internal file anatomy, file naming conventions (kebab-case directories, PascalCase components, use<Domain> hooks), test placement rules (colocated *.test.tsx — no separate __tests__/), shared vs. feature component decision boundary, and vendor zones that must not be modified. Trigger terms: where to put, where does X go, project structure, file placement, colocation, feature folder, new page, new component, new hook, shared component, frontend architecture, directory layout, where do tests go.
Trending skills
7-day visitors to each skill page
Ships in engineering-paved-path. 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.
The placement decision tree for the client package (src/). For how to write components and hooks, see react-best-practices. For Next.js file conventions (RSC boundaries, special files, async APIs), see next-best-practices.
src/
├── app/ # Next.js App Router — routes and their colocated components
│ ├── layout.tsx # Root layout + QueryClientProvider
│ ├── page.tsx # Root — redirects to first repo
│ ├── repos/[repoId]/pulls/
│ │ ├── page.tsx # PR list page (thin)
│ │ └── _components/ # Feature components for this route only
│ │ ├── PRRow/
│ │ └── FilterBar/
│ ├── repos/[repoId]/pulls/[number]/
│ │ ├── page.tsx # PR detail page (thin)
│ │ └── _components/ # Feature components for this route only
│ │ ├── FindingCard/
│ │ ├── RunTraceDrawer/
│ │ │ └── _components/ # Sub-components (nested colocation, max 2 levels)
│ │ │ ├── TraceBody/
│ │ │ └── PromptBlock/
│ │ └── RunStatus/
│ ├── agents/
│ ├── settings/[section]/
│ └── onboarding/
│
├── components/ # Shared components — used by 2+ routes
│ ├── FindingsCounter/ # Simple shared component
│ ├── RunCostBadge/
│ ├── app-shell/ # Complex shared: nav, breadcrumbs, shortcuts
│ │ ├── AppShell.tsx
│ │ ├── constants.ts
│ │ ├── helpers.ts
│ │ ├── hooks/ # Component-specific hooks subfolder
│ │ └── index.ts
│ └── diff-viewer/ # Complex shared: own sub-components
│ ├── DiffViewer/ # PascalCase subfolders (no _ prefix outside app/)
│ ├── CodeLine/
│ ├── constants.ts
│ ├── helpers.ts
│ ├── styles.ts
│ └── index.ts
│
├── lib/ # Non-visual shared code
│ ├── api.ts # ALL fetch calls — single entry point
│ ├── hooks/ # TanStack Query hooks, one file per domain
│ │ ├── core.ts # Base query client config
│ │ ├── reviews.ts
│ │ ├── agents.ts
│ │ ├── repo-intel.ts
│ │ ├── trace.ts
│ │ └── index.ts
│ ├── types.ts # Shared TypeScript interfaces/types
│ ├── providers.tsx # React context providers (QueryClient, etc.)
│ ├── repo-context.tsx # Repo selection state context
│ └── [utility].ts # Domain helpers: github-urls, model-label, etc.
│
├── vendor/
│ ├── ui/ # Vendored UI primitives — IMPORT ONLY, NEVER MODIFY
│ └── shared/ # Zod contracts mirrored from server — UPDATE IN LOCKSTEP ONLY
│
├── i18n/
│ └── request.ts # next-intl config
│
└── test/
└── setup.ts # Vitest globals + fetch mock — NOT for component tests
When you need to add something, find it in this table:
| What you're adding | Where it goes |
|---|---|
| A new page / route | app/<route>/page.tsx |
| A component used only by one route | app/<route>/_components/<Name>/ |
| A component used by two or more routes | components/<Name>/ |
| A sub-component of a feature component | app/<route>/_components/<Parent>/_components/<Name>/ |
| A sub-component of a shared component | components/<feature-dir>/<Name>/ (no _ prefix) |
| A data-fetching / mutation hook | lib/hooks/<domain>.ts — add a new export |
| A new HTTP call to the API | lib/api.ts — add a new exported async function |
| A shared TypeScript type | lib/types.ts |
| A domain utility (URL builder, formatter) | lib/<utility-name>.ts |
| A React context or provider | lib/<context-name>.tsx |
| An i18n string | messages/<locale>/*.json |
| A UI primitive (button, badge, input, dialog) | Use existing from vendor/ui/ — do not create your own |
| A shared Zod contract | vendor/shared/ — only when server vendor also changes |
| Test setup or global test fixtures | test/setup.ts |
| A component test | <same folder as component>/<Name>.test.tsx |
Feature components live inside _components/ next to their page. The _ prefix prevents Next.js from treating the folder as a route segment.
app/<route>/
├── page.tsx # Thin: composes from _components only
└── _components/
└── <ComponentName>/
├── <ComponentName>.tsx # Main export (aim for < 200 lines)
├── index.ts # Barrel: re-exports <ComponentName> only
├── constants.ts # Static data local to this component (omit if empty)
├── helpers.ts # Pure utility functions (omit if trivial)
├── styles.ts # Tailwind class strings via cn() (omit if trivial)
└── <ComponentName>.test.tsx # Component test, colocated here
Nesting: A feature component that grows complex enough to need its own sub-components adds _components/<Name>/_components/<SubName>/. Keep nesting to two levels; if a third level is needed, the inner component is complex enough to promote to components/.
Pages are thin. A page.tsx imports one top-level component from _components/ and renders it. It does not contain JSX logic, hooks, or data fetching itself.
components/ follows the same folder-per-component convention. Complex shared features (like diff-viewer) get a kebab-case directory with PascalCase sub-component folders. No _ prefix is needed here because components/ is not under app/.
components/
└── <feature-name>/ # kebab-case root directory
├── <SubComponent>/ # PascalCase subfolder per sub-component
│ ├── <SubComponent>.tsx
│ └── index.ts
├── constants.ts # Constants shared across sub-components
├── helpers.ts # Helpers shared across sub-components
├── styles.ts # Shared Tailwind class strings
└── index.ts # Barrel exporting the public surface
| File type | Convention | Examples |
|---|---|---|
| Directories | kebab-case | diff-viewer/, app-shell/, repo-intel/ |
| Component files | PascalCase.tsx | FindingCard.tsx, RunStatus.tsx |
| Hook domain files | <domain>.ts inside lib/hooks/ | reviews.ts, agents.ts |
| Utility/helper files | kebab-case.ts | github-urls.ts, model-label.ts |
| Barrel files | index.ts | Required in every component folder |
| Test files | <ComponentName>.test.tsx | FindingCard.test.tsx |
| Constants | constants.ts | Inside component or shared feature folder |
| Helpers | helpers.ts | Pure functions only, no side effects |
| Styles | styles.ts | cn()-based Tailwind string exports |
app/<route>/_components/<Name>/<Name>.test.tsx — colocatedcomponents/<Name>/<Name>.test.tsx — colocated.test.ts colocated next to the file under testsrc/test/setup.ts — Vitest configuration and fetch mocking__tests__/ directories — colocation is the enforced conventionTests run under Vitest + jsdom with fetch mocked. They need no running API or browser.
These paths are locked. Import from them; never modify them.
| Path | What it is | Rule |
|---|---|---|
src/vendor/ui/ | Vendored UI primitives (@devdigest/ui) | Import as-is. Build wrappers in components/ using these as building blocks. |
src/vendor/shared/ | Zod contracts mirrored from server/src/vendor/shared/ | Update only when the server vendor changes; both sides must stay in sync. |
fetch in a component body — all HTTP calls go through exported functions in lib/api.ts. Components import from lib/api.ts, not fetch directly.useEffect + useState for server data — async data always goes through TanStack Query hooks in lib/hooks/. No useEffect+useState chains for fetching.components/ — components/ is for cross-route reuse. A component used by exactly one route belongs in that route's _components/.messages/<locale>/*.json and is consumed via next-intl. No string literals in JSX.vendor/ui/ primitive — always check vendor/ui/ before building a button, badge, input, or dialog from scratch.lib/ — lib/*.ts is for cross-page utilities. Helpers used by only one component belong in that component's helpers.ts.app/<route>/ — feature components must be inside _components/<Name>/; a bare file at the route level breaks colocation and is invisible to reviewers scanning the folder structure.index.ts barrel — every component folder must export via index.ts so callers import from './_components/Foo' not './_components/Foo/Foo'.src/test/; keep them out of individual *.test.tsx files.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub vadimpoltoratskiy/dev-digest-ai-marketplace --plugin engineering-paved-path14 skills in this plugin
/dependency-checkerAudits all dependencies across the repo's 6 independent packages (server, client, reviewer-core, e2e, evals, mcp-server) — no shared workspace. Distinguishes external npm dependencies from internal cross-package dependencies (tsconfig path aliases, not workspace:*), draws a Mermaid schematic of dependency relationships, breaks down installed size per package, and prioritizes findings into P0/P1/P2/Info tiers with concrete, file-specific recommendations. Read-only: reports and advises, never runs pnpm remove/update itself. Invoke explicitly: /dependency-checker, 'check our dependencies', 'audit deps', 'why is node_modules so big', 'draw the dependency graph'./drizzle-orm-patternsProvides comprehensive Drizzle ORM patterns for schema definition, CRUD operations, relations, queries, transactions, and migrations. Proactively use for any Drizzle ORM development including defining database schemas, writing type-safe queries, implementing relations, managing transactions, and setting up migrations with Drizzle Kit. Supports PostgreSQL, MySQL, SQLite, MSSQL, and CockroachDB./fastify-best-practicesGuides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts./mermaid-diagramCreate Mermaid diagrams in markdown. Use when the user wants to visualize workflows, architectures, API flows, data models, state machines, or system designs. Covers flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, and more./next-best-practicesNext.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling/onion-architectureAnswers 'what goes where' in the server — the layer and placement decision tree for every new file in the Fastify backend. Use when adding a new feature module, a route handler, a service method, a repository query, a new adapter, or a platform utility. Use when reviewing a PR for layer violations (routes querying the DB directly, services importing adapters without DI). Covers the annotated server directory map, the four-layer onion model (routes → service → repository → platform/adapters), module file anatomy, DI container usage patterns, module registration steps, import boundary rules, and anti-patterns. Trigger terms: where to put, new module, add route, service method, repository query, adapter, DI container, module registration, layer violation, backend architecture, server structure, which layer.