react-architecture

Design and review React application structure, feature boundaries, and dependency direction.

1|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/pnewsam/skills --skill react-architecture-pnewsam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-architecture
Source: https://github.com/pnewsam/skills/tree/main/archive/react-pilot/react-architecture
Command: npx skills add https://github.com/pnewsam/skills --skill react-architecture-pnewsam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React codebases often grow into tangled structures where features are scattered across generic folders, imports create hidden coupling, and the app shell becomes an unmaintainable nest of providers. This Skill provides architectural guidance for designing or reviewing a React application's structure so ownership and dependency direction stay clear as the codebase evolves. ## Core Features & Use Cases - Application infrastructure design: Guidance for startup, app shell, providers, routing, configuration validation, authentication bootstrap, API adapters, code splitting, and deployment assumptions. - Feature structure and boundaries: Rules for organizing product code by ownership, exposing narrow public entrypoints, enforcing import direction, and sharing code deliberately. - Incremental migration planning: Proposes a target structure and a step-by-step migration path that keeps the application runnable without simultaneous moves and behavior changes. - Use Case: When joining a React project where components, hooks, and services are scattered across top-level folders, use this Skill to map the current structure, define feature boundaries with public APIs, and plan a safe reorganization. ## Quick Start Use the react-architecture skill to review my React app's folder structure and propose a feature-based organization with clear dependency rules.

Frequently Asked Questions about react-architecture

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

FAQPage Schema
How do I structure a React application by features?▼

Organize product code into feature folders that colocate components, hooks, model, API access, and tests, each exposing a narrow public entrypoint. Keep app startup and providers in a separate app layer, and place neutral shared code in domain, platform, or UI layers.

How to enforce dependency direction in a React project?▼

Define a layer order such as app/routes depending on features, which depend on shared domain and platform adapters. Use lint or build rules to block feature-to-feature internal imports and prevent shared layers from depending on product features.

Does this approach work with server-rendered React frameworks?▼

Yes, the guidance respects the existing framework and rendering model rather than imposing a single-page-app template. For RSC or server-rendered apps, it honors the 'use client'/'use server' boundary and fetches data at the server or route-loader level.

When should code be moved into a shared folder in React?▼

Promote code only when it has a stable responsibility, neutral ownership, and an API clearer than duplication, such as design-system primitives or platform adapters. Avoid sharing feature-specific components or creating unbounded utility folders like helpers or common.

When should I not use this architecture skill?▼

Do not use it for isolated component API, state management, data-fetching, testing, or performance questions unless structure is the central issue. Those concerns are handled by dedicated skills such as react-component-design, react-state-management, or react-data-fetching.