frontend-dev-guidelines

Provides React and TypeScript development guidelines covering Suspense, TanStack Query, MUI v7, and file organization.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Boulea7/ohmyclaude --skill frontend-dev-guidelines-boulea7
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/Boulea7/ohmyclaude/tree/main/src/ohmyclaude/templates/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/Boulea7/ohmyclaude --skill frontend-dev-guidelines-boulea7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend teams often produce inconsistent React code with layout-shifting loading states, scattered file structures, and ad-hoc data fetching. This Skill enforces a single set of modern React/TypeScript conventions so components, features, and routes follow the same patterns. ## Core Features & Use Cases - Component & Data Fetching Standards: Mandates React.FC typing, React.lazy code splitting, SuspenseLoader boundaries, and useSuspenseQuery with cache-first strategies via TanStack Query. - Project Structure Rules: Defines the features/ directory layout (api/, components/, hooks/, helpers/, types/), import aliases (@/, ~types, ~components, ~features), and MUI v7 styling conventions. - Use Case: When asked to build a new user profile page, the Skill guides creation of the feature folder, API service layer, lazy-loaded route with TanStack Router, and a Suspense-wrapped component with proper error handling via useMuiSnackbar. ## Quick Start Ask the AI to create a new React component or feature following the frontend development guidelines, for example a lazy-loaded user list page with useSuspenseQuery data fetching.

Frequently Asked Questions about frontend-dev-guidelines

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

FAQPage Schema
How do I fetch data in React with TanStack Query and Suspense?▼

Use useSuspenseQuery inside a component wrapped in a SuspenseLoader boundary. The query's data is always defined, eliminating isLoading checks, while the Suspense boundary handles the loading indicator without layout shift.

How should I organize React feature folders?▼

Create a features/{name}/ directory with api/, components/, hooks/, helpers/, and types/ subdirectories, plus an index.ts exporting the public API. Put only truly reusable UI in the shared components/ directory.

useSuspenseQuery vs useQuery: which should I use?▼

Use useSuspenseQuery for all new components because it integrates with Suspense boundaries and guarantees defined data. Reserve useQuery for legacy code or cases without Suspense, paired with LoadingOverlay instead of early returns.

Why should I avoid early returns for loading states in React?▼

Early returns with spinners cause Cumulative Layout Shift because the rendered layout changes when loading completes. SuspenseLoader or LoadingOverlay reserves the content area, keeping layout stable and preserving scroll position.

Does MUI v7 Grid use a different syntax than older versions?▼

Yes. MUI v7 uses the size prop, such as <Grid size={{ xs: 12, md: 6 }}>, instead of the old xs and md props directly on Grid. The guidelines require the v7 syntax for all grid layouts.

When should React component styles go in a separate file?▼

Keep styles inline as a Record<string, SxProps<Theme>> object when under 100 lines. Move them to a separate .styles.ts file when they exceed 100 lines, always using the sx prop with theme access.