frontend-dev-guidelines

Enforces opinionated React and TypeScript frontend standards with Suspense-first data fetching.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com --skill frontend-dev-guidelines-ratnesh-maurya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com/tree/main/.claude/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com --skill frontend-dev-guidelines-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend codebases drift into inconsistent patterns—scattered API calls, loading spinners causing layout shift, prop drilling, and untyped responses. This Skill gives an AI assistant a strict, enforceable rulebook so every component, feature, and route follows the same production-grade architecture. ## Core Features & Use Cases - Architectural Doctrine Enforcement: Mandates Suspense-first data fetching with useSuspenseQuery, lazy loading of heavy components, feature-based folder organization, and strict TypeScript (no any, explicit return types). - Feasibility Scoring (FFCI): Scores proposed components or features on architectural fit, complexity, performance risk, reusability, and maintenance cost before implementation. - Pattern Libraries: Provides ready-to-use patterns for forms (React Hook Form + Zod), dialogs, DataGrid wrappers, mutations with cache invalidation, optimistic updates, and MUI v7 styling. - Use Case: When asked to build a new user profile page, the assistant creates a feature folder with an isolated API layer, a lazy-loaded route with breadcrumb metadata, a SuspenseLoader boundary, and a typed component using useSuspenseQuery—no early-return spinners or inline fetch calls. ## Quick Start Use the frontend-dev-guidelines skill to scaffold a new React feature with Suspense-based data fetching and feature-based folder structure.

Frequently Asked Questions about frontend-dev-guidelines

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

FAQPage Schema
How do I structure a new React feature with feature-based architecture?▼

Create a features/{feature-name}/ directory with api/, components/, hooks/, helpers/, and types/ subdirectories. Isolate API calls in the api/ layer, export public members via index.ts, lazy load the feature entry component, and place a Suspense boundary at the feature level.

What is the difference between useSuspenseQuery and useQuery in TanStack Query?▼

useSuspenseQuery delegates loading states to React Suspense boundaries, so data is always defined and no isLoading checks are needed. useQuery returns possibly undefined data and requires manual loading handling, and is recommended only for legacy code.

How do I avoid layout shift from loading spinners in React?▼

Never early-return a spinner; instead wrap components in a SuspenseLoader boundary paired with useSuspenseQuery, or use a LoadingOverlay that reserves content space. Skeleton placeholders must match the final content layout exactly.

Does MUI v7 Grid still support the xs and md props?▼

No. MUI v7 requires the size prop syntax: <Grid size={{ xs: 12, md: 6 }} />. The legacy <Grid xs={12} md={6} /> form is rejected under these guidelines.

When should I use Zustand versus TanStack Query for state management?▼

Use TanStack Query for all server state including fetching, caching, and mutations. Reserve Zustand for minimal global client state like theme or sidebar preferences, and useState for local UI state only.

What is the FFCI score and when should a feature be redesigned?▼

FFCI combines architectural fit, reusability, and performance minus complexity and maintenance cost, ranging from -5 to +15. Scores of 3-5 mean simplify or split the work, and scores of 2 or below require a redesign before implementation.