frontend-dev-guidelines

Enforces Suspense-first React, TypeScript, and feature-based architecture standards for frontend code.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/RobinMillford/GopherNotebook --skill frontend-dev-guidelines-robinmillford
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/RobinMillford/GopherNotebook/tree/main/.claude/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/RobinMillford/GopherNotebook --skill frontend-dev-guidelines-robinmillford

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 responsibilities. This Skill enforces a single opinionated standard for writing React and TypeScript code so every component, feature, and route follows the same production-grade architecture. ## Core Features & Use Cases - Suspense-First Data Fetching: Mandates useSuspenseQuery with SuspenseLoader boundaries, eliminating isLoading conditionals and early-return spinners. - Feature-Based Organization: Defines a 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 decide whether a design should proceed, be simplified, or be 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, MUI v7 styling, and snackbar-based error feedback. ## Quick Start Ask the assistant to create a new React feature or component following the frontend-dev-guidelines, for example: build a user list page with search, lazy loading, and Suspense-based 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 without isLoading checks?

Use useSuspenseQuery from TanStack Query wrapped in a Suspense boundary component like SuspenseLoader. The data returned is always defined, so no isLoading conditionals or early-return spinners are needed, 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 React Suspense boundaries and always returns defined data, while useQuery requires manual isLoading checks and returns possibly undefined data. New components should prefer useSuspenseQuery; useQuery suits legacy code.

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

No, MUI v7 requires the new size prop syntax: <Grid size={{ xs: 12, md: 6 }} />. The legacy <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 Suspense boundary such as SuspenseLoader.

Why should early-return loading spinners be avoided in React?

Early returns cause cumulative layout shift, jarring UX, and lost scroll position when content swaps in. Suspense boundaries or overlay loaders reserve the layout so content appears without shifting the page.