file-organization

Defines folder structure, naming conventions, and export rules for React frontend codebases.

3|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/nghyane/VSTEP --skill file-organization-nghyane
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: file-organization
Source: https://github.com/nghyane/VSTEP/tree/main/apps/frontend-v3/.agents/skills/file-organization
Command: npx skills add https://github.com/nghyane/VSTEP --skill file-organization-nghyane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When creating new features or files in a React frontend project, inconsistent file placement, naming, and export styles quickly lead to a messy codebase. This Skill provides a single source of truth for where files go, how they are named, and how routes and types are organized. ## Core Features & Use Cases - Folder Structure Rules: Defines where shared modules (src/lib/), feature modules (src/features/{name}/), shared types, icons, and TanStack Router routes live. - Naming & Export Conventions: Enforces kebab-case files, use-*.ts hooks, PascalCase components, named exports only, and no barrel files. - Route & Type Conventions: Specifies TanStack Router file-based route patterns (layouts, $paramName, pathless _name routes) and type colocation in feature folders. - Use Case: When adding a new vocabulary practice feature, load this Skill to correctly scaffold src/features/vocabulary/ with types.ts, queries.ts, and a tu-vung route following project conventions. ## Quick Start Load the file-organization skill and create a new feature module for flashcards following the project folder and naming conventions.

Frequently Asked Questions about file-organization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize feature folders in a React project?▼

Place each feature in `src/features/{name}/` containing `types.ts`, `queries.ts`, `actions.ts`, `use-*.ts` hooks, and a `components/` folder. Shared modules go in `src/lib/` with flat, short names like `api.ts` or `auth.ts`.

What naming conventions should React files and components follow?▼

Files use kebab-case without suffixes like `-store` or `-utils`, components use PascalCase, hooks use `use-*.ts`, functions use camelCase, types use PascalCase, and constants use UPPER_SNAKE.

How do file-based routes work with TanStack Router?▼

A layout file `name.tsx` renders `<Outlet />` with content in `name/index.tsx`. Dynamic segments use `$paramName.tsx`, and pathless layouts use `_name.tsx`. Route pages should stay under 80 lines and only compose hooks and components.

Should I use barrel files or default exports in React?▼

No. This convention requires named exports only and forbids barrel files entirely. The single exception is route components, which may use default exports as required by the router.

Where should shared TypeScript types be placed?▼

Colocate types in `features/{name}/types.ts` first, then promote them to `src/types/` only when shared across features. Avoid inline types in `.json<>()` calls or component props; define and import them instead.