react-files-structure-standards
React files & folder structure standards
This skill applies file and folder naming and structure standards. It focuses solely on paths, directory layout, and file naming (suffixes/prefixes by intent). For in-code naming (variables, booleans, etc.), use react-coding-standards.
Reference
Standards are defined in the references/ folder. Load this file when you need the exact Avoid/Prefer rules and examples:
| Category | File | Scope |
|---|---|---|
| File & folder names | references/file-and-folder-naming-patterns.md | kebab-case, suffixes/prefixes, folder structure |
Two-phase workflow
When the skill is invoked on a codebase (selected paths, git staged files, or a branch):
Phase 1 — Collect violations
- Analyze the provided file and folder paths against references/file-and-folder-naming-patterns.md.
- List every file or folder that does not match as a violation with:
- Category: "File and folder naming"
- Rule name (e.g. "File/folder not kebab-case", "Generic filename at root")
- Location (current path)
- Preferred name/path (from the reference)
- Short reason (what is wrong)
- If no violation is found, state that file and folder names comply and stop. Otherwise proceed to Phase 2.
Phase 2 — Apply corrections
- Rename files and folders to the preferred names/paths from the reference.
- Update all import paths (and any other references) that point to renamed files or folders.
- Preserve business logic and behavior; only change paths and names.
- Prefer minimal edits: one logical rename per violation, then update imports in one pass.
Rules of thumb
- Strict avoid/prefer: Only treat as violations what is explicitly described as Avoid in the reference; only apply renames that are explicitly described as Prefer.
- Imports first: After renames, always update imports and references so the project still resolves correctly.
- Readability and structure: After corrections, the project layout should be easier to navigate and consistent with the reference.
Quick reference
- Collect first: Complete the full list of file/folder violations before renaming.
- One violation, one rename: Apply the preferred name/path from the reference; then update all references in one go.
- Scope: This skill does not cover variable naming, boolean prefixes, or in-file code patterns—use react-coding-standards for those.
More from lichens-innovation/ai-dev-tools
react-coding-standards
Enforces internal React and TypeScript coding standards using avoid/prefer rules. Use when reviewing or refactoring React/TS code, applying company standards, or when the user asks to align code with coding standards.
23generate-pr-description
Generates pull request descriptions by comparing current branch with parent branch. Creates semantic commit-style PR titles and fills PR templates. Use when the user asks to generate PR description, prepare pull request, or create merge request description. The user may include ticket IDs in the request (e.g. tickets: NN-123, TB-456) from the company tracking system; treat those as the related issue IDs for the PR.
20react-single-responsibility
Strategies to simplify components, hooks, and methods: decomposition order (utilities, hooks, sub-components), early returns, control flow, parameter design, and code smell fixes. Use when the user says: ungodify this method/function/component, simplify this method/function/component, make this method/function/component less complex; or when refactoring a large component, hook, or function, reducing complexity, applying single responsibility, or asking how to simplify a component, hook, or method.
19review-staged-changes
Reviews staged git changes for code quality, maintainability, readability, and potential regressions. Verifies changes make sense in context, improve maintainability, enhance readability, and don't introduce side effects. Use when reviewing staged changes, examining git diffs, or when the user asks to review modifications before committing.
14react-linter-setup
Sets up ESLint for React and TypeScript projects aligned with company standards. Use when installing or configuring the project linter, adding devDependencies, custom ESLint rules, package.json scripts, or when the user asks to set up or migrate to the company React/TypeScript ESLint stack.
12review-code-changes
Reviews code changes for quality, maintainability, readability, and potential regressions. Supports reviewing explicitly mentioned files, git staged files, or changes between branches. Verifies changes make sense in context, improve maintainability, enhance readability, and don't introduce side effects. Use when reviewing code changes, examining git diffs, reviewing staged changes, comparing branches, or when the user asks to review modifications.
3