frontend-dev-guidelines

Enforces Suspense-first React and TypeScript standards for building production frontend components and features.

Updated May 8, 2026
One-click install
npx skills add https://github.com/kiprotichgidii/agent-skills --skill frontend-dev-guidelines-kiprotichgidii
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/kiprotichgidii/agent-skills/tree/main/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/kiprotichgidii/agent-skills --skill frontend-dev-guidelines-kiprotichgidii

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, untyped responses, and tangled component logic. This Skill enforces a single opinionated architecture so every component, feature, and route follows the same React, TypeScript, and TanStack Query conventions. ## Core Features & Use Cases - Suspense-First Data Fetching: Mandates useSuspenseQuery with SuspenseLoader boundaries, eliminating isLoading conditionals and early-return spinners that cause layout shift. - Feature-Based Architecture: Defines a canonical directory structure (api/, components/, hooks/, helpers/, types/) with import aliases and public index exports to prevent cross-feature coupling. - FFCI Feasibility Scoring: Provides a quantitative Frontend Feasibility & Complexity Index to decide whether to proceed, simplify, or redesign before writing code. - Use Case: When asked to add 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, and MUI v7 styling that passes the operator validation checklist. ## Quick Start Use the frontend-dev-guidelines skill to create a new React feature component that fetches data with useSuspenseQuery and follows the project's Suspense-first standards.

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 without isLoading checks?▼

Use useSuspenseQuery from TanStack Query wrapped in a Suspense boundary like SuspenseLoader. The data returned is always defined, so components never need isLoading conditionals or early-return spinners, which also prevents layout shift.

How should I organize a React feature folder structure?▼

Create a features/{name}/ directory with api/, components/, hooks/, helpers/, and types/ subdirectories, plus an index.ts for public exports. Keep domain logic in features/ and only truly reusable primitives in components/.

What is the difference between useSuspenseQuery and useQuery?▼

useSuspenseQuery integrates with Suspense boundaries so loading states are handled declaratively and data is always defined. useQuery returns possibly undefined data and requires manual isLoading checks, making it suitable only for legacy code.

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 older <Grid xs={12} md={6} /> pattern is rejected under these guidelines.

When should I lazy load a React component?▼

Lazy load route components, feature entry points, and heavy UI like data grids, charts, editors, and large dialogs using React.lazy. Always wrap lazy components in a SuspenseLoader boundary for consistent loading behavior.

Why should API calls not be made directly inside components?▼

Inline API calls scatter endpoint logic and bypass centralized error handling. The guidelines require one API service file per feature using a shared apiClient, with routes that omit the /api/ prefix since proxying handles routing.