frontend-dev-guidelines

Enforces opinionated React and TypeScript standards for Suspense-first, feature-based frontend development.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --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/mdconverter/tree/main/.claude/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill frontend-dev-guidelines-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Frontend codebases often drift into inconsistent patterns: scattered API calls, loading spinners causing layout shift, prop drilling, and untyped data. This Skill enforces a single, strict architectural doctrine so every component, feature, and route follows the same production-grade conventions. ## Core Features & Use Cases - Suspense-First Data Fetching: Mandates useSuspenseQuery with TanStack Query, cache-first strategies, and forbids isLoading early returns. - Feature-Based Architecture: Defines canonical directory structure (api/, components/, hooks/, helpers/, types/) with import aliases and public index exports. - FFCI Feasibility Scoring: Provides a quantitative Frontend Feasibility & Complexity Index to evaluate whether a design should proceed, be simplified, or redesigned. - Use Case: When asked to build a new user profile page, the Skill produces a lazy-loaded route, a feature folder with an isolated API layer, a React.FC component using useSuspenseQuery wrapped in SuspenseLoader, and MUI v7 styling with typed props. ## Quick Start Ask the assistant to create a new React feature or component following the frontend-dev-guidelines standards, for example a lazy-loaded user list page with Suspense 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 structure a new React feature with feature-based architecture?

Create a features/{name}/ directory with api/, components/, hooks/, helpers/, and types/ subdirectories, plus an index.ts for public exports. Keep API calls isolated in the api/ layer and lazy load the feature entry component behind a Suspense boundary.

Should I use useSuspenseQuery or useQuery with TanStack Query?

Use useSuspenseQuery for all new components because it eliminates isLoading checks and integrates with Suspense boundaries. Reserve regular useQuery for legacy code or simple polling cases without Suspense.

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

Early returns with spinners cause layout shift, hurt CLS scores, and create jarring UX. Instead wrap components in a SuspenseLoader boundary or use a LoadingOverlay so the content area keeps its layout while loading.

What is the correct MUI v7 Grid syntax?

MUI v7 uses the size prop: <Grid size={{ xs: 12, md: 6 }} />. The older xs={12} md={6} prop pattern is deprecated and rejected under these guidelines.

When should I use Zustand versus TanStack Query for state?

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