frontend-dev-guidelines
sickn33/agentic-awesome-skills
Senior frontend engineering standards for scalable React apps with Suspense-first data fetching and strict TypeScript discipline.
What is frontend-dev-guidelines?
A comprehensive architectural guide for building production-grade React applications using Suspense-first data fetching, feature-based code organization, and strict TypeScript. Use this skill when creating components, pages, adding features, or handling data fetching to ensure code meets enterprise-level standards for maintainability, performance, and scalability.
- Defines Suspense-first data fetching patterns using useSuspenseQuery as the primary hook
- Enforces feature-based code organization with strict separation of concerns
- Provides Frontend Feasibility & Complexity Index (FFCI) scoring to assess component viability before implementation
- Establishes TypeScript strict mode standards with explicit types and no implicit any
- Specifies lazy loading patterns for routes, components, and heavy features to optimize bundle size
- Mandates MUI v7 styling standards with inline vs. separate file guidelines
How to install frontend-dev-guidelines
npx skills add https://github.com/sickn33/agentic-awesome-skills --skill frontend-dev-guidelines- React 18+ with Suspense support
- TypeScript with strict mode enabled
- TanStack React Query for data fetching
- TanStack Router for routing
- Material-UI (MUI) v7 for component library
- Node.js project with import alias configuration (@/, ~types, ~components, ~features)
How to use frontend-dev-guidelines
- 1.Before implementing any component or feature, calculate its FFCI score across five dimensions (Architectural Fit, Complexity Load, Performance Risk, Reusability, Maintenance Cost) to determine feasibility
- 2.Organize code using feature-based structure: create features/{feature-name}/ with subdirectories for api/, components/, hooks/, helpers/, and types/
- 3.Use useSuspenseQuery as the primary data-fetching hook; wrap components in SuspenseLoader boundaries and never use isLoading conditionals or early-return spinners
- 4.Write all components with explicit React.FC<Props> interfaces, lazy load non-trivial components, and follow the required structure order: Types → Hooks → Derived Values → Handlers → Render
- 5.Apply MUI v7 styling: use inline sx for components under 100 lines, separate .styles.ts files for larger components, and use Grid size prop syntax (not xs/md props)
- 6.Validate completed code against the operator checklist: FFCI ≥ 6, correct Suspense usage, respected feature boundaries, explicit types, lazy loading applied, and performance safety confirmed
Use cases
- Building new React components or pages with guaranteed performance and maintainability standards
- Organizing feature code into isolated domains with clear API boundaries and type safety
- Assessing architectural fit and complexity of proposed features before implementation using FFCI scoring
- Refactoring existing frontend code to meet production-grade standards and eliminate anti-patterns
- Setting up routing with TanStack Router using folder-based lazy loading and breadcrumb metadata
- Senior frontend engineers building production React applications
- Teams maintaining long-term codebases requiring strict architectural consistency
- Developers transitioning to Suspense-first patterns and modern React practices
- Engineering leads establishing frontend standards and code review criteria
- Full-stack developers needing clear frontend architecture guidance
frontend-dev-guidelines FAQ
FFCI is a scoring system (−5 to +15) that assesses component viability before implementation. Score five dimensions (1–5 each): Architectural Fit, Complexity Load, Performance Risk, Reusability, and Maintenance Cost. Use the formula: (Architectural Fit + Reusability + Performance) − (Complexity + Maintenance Cost). Scores 10–15 mean proceed; 6–9 proceed with care; 3–5 simplify or split; ≤2 redesign entirely.
Suspense eliminates loading-state boilerplate, prevents race conditions, and forces proper error boundaries at the component tree level. useSuspenseQuery throws promises that Suspense boundaries catch, making loading states implicit and eliminating early-return spinners that fragment UI logic.
Create features/{feature-name}/ with subdirectories: api/ (isolated API calls), components/ (feature-specific UI), hooks/ (custom hooks), helpers/ (utilities), and types/ (TypeScript interfaces). Export public APIs via index.ts. Keep feature logic isolated; reusable primitives belong in src/components/.
Never use early loading returns, place feature logic in components/, prop-drill shared state instead of using hooks, make inline API calls, leave responses untyped, or combine multiple responsibilities in one component. These patterns cause maintenance debt and performance regressions.
Use inline sx for components under 100 lines of code. For larger components, extract styles to a separate {Component}.styles.ts file. Always use MUI v7 Grid syntax (size prop) and ensure theme access is type-safe.
Full instructions (SKILL.md)
Source of truth, from sickn33/agentic-awesome-skills.
name: frontend-dev-guidelines description: "You are a senior frontend engineer operating under strict architectural and performance standards. Use when creating components or pages, adding new features, or fetching or mutating data." risk: critical source: community date_added: "2026-02-27"
Frontend Development Guidelines
(React · TypeScript · Suspense-First · Production-Grade)
You are a senior frontend engineer operating under strict architectural and performance standards.
Your goal is to build scalable, predictable, and maintainable React applications using:
- Suspense-first data fetching
- Feature-based code organization
- Strict TypeScript discipline
- Performance-safe defaults
This skill defines how frontend code must be written, not merely how it can be written.
1. Frontend Feasibility & Complexity Index (FFCI)
Before implementing a component, page, or feature, assess feasibility.
FFCI Dimensions (1–5)
| Dimension | Question |
|---|---|
| Architectural Fit | Does this align with feature-based structure and Suspense model? |
| Complexity Load | How complex is state, data, and interaction logic? |
| Performance Risk | Does it introduce rendering, bundle, or CLS risk? |
| Reusability | Can this be reused without modification? |
| Maintenance Cost | How hard will this be to reason about in 6 months? |
Score Formula
FFCI = (Architectural Fit + Reusability + Performance) − (Complexity + Maintenance Cost)
Range: -5 → +15
Interpretation
| FFCI | Meaning | Action |
|---|---|---|
| 10–15 | Excellent | Proceed |
| 6–9 | Acceptable | Proceed with care |
| 3–5 | Risky | Simplify or split |
| ≤ 2 | Poor | Redesign |
2. Core Architectural Doctrine (Non-Negotiable)
1. Suspense Is the Default
useSuspenseQueryis the primary data-fetching hook- No
isLoadingconditionals - No early-return spinners
2. Lazy Load Anything Heavy
- Routes
- Feature entry components
- Data grids, charts, editors
- Large dialogs or modals
3. Feature-Based Organization
- Domain logic lives in
features/ - Reusable primitives live in
components/ - Cross-feature coupling is forbidden
4. TypeScript Is Strict
- No
any - Explicit return types
import typealways- Types are first-class design artifacts
When to Use
Use frontend-dev-guidelines when:
- Creating components or pages
- Adding new features
- Fetching or mutating data
- Setting up routing
- Styling with MUI
- Addressing performance issues
- Reviewing or refactoring frontend code
3. Quick Start Checklists
New Component Checklist
-
React.FC<Props>with explicit props interface - Lazy loaded if non-trivial
- Wrapped in
<SuspenseLoader> - Uses
useSuspenseQueryfor data - No early returns
- Handlers wrapped in
useCallback - Styles inline if <100 lines
- Default export at bottom
- Uses
useMuiSnackbarfor feedback
New Feature Checklist
- Create
features/{feature-name}/ - Subdirs:
api/,components/,hooks/,helpers/,types/ - API layer isolated in
api/ - Public exports via
index.ts - Feature entry lazy loaded
- Suspense boundary at feature level
- Route defined under
routes/
4. Import Aliases (Required)
| Alias | Path |
|---|---|
@/ | src/ |
~types | src/types |
~components | src/components |
~features | src/features |
Aliases must be used consistently. Relative imports beyond one level are discouraged.
5. Component Standards
Required Structure Order
- Types / Props
- Hooks
- Derived values (
useMemo) - Handlers (
useCallback) - Render
- Default export
Lazy Loading Pattern
const HeavyComponent = React.lazy(() => import('./HeavyComponent'));
Always wrapped in <SuspenseLoader>.
6. Data Fetching Doctrine
Primary Pattern
useSuspenseQuery- Cache-first
- Typed responses
Forbidden Patterns
❌ isLoading
❌ manual spinners
❌ fetch logic inside components
❌ API calls without feature API layer
API Layer Rules
- One API file per feature
- No inline axios calls
- No
/api/prefix in routes
7. Routing Standards (TanStack Router)
- Folder-based routing only
- Lazy load route components
- Breadcrumb metadata via loaders
export const Route = createFileRoute('/my-route/')({
component: MyPage,
loader: () => ({ crumb: 'My Route' }),
});
8. Styling Standards (MUI v7)
Inline vs Separate
<100 lines: inlinesx>100 lines:{Component}.styles.ts
Grid Syntax (v7 Only)
<Grid size={{ xs: 12, md: 6 }} /> // ✅
<Grid xs={12} md={6} /> // ❌
Theme access must always be type-safe.
9. Loading & Error Handling
Absolute Rule
❌ Never return early loaders ✅ Always rely on Suspense boundaries
User Feedback
useMuiSnackbaronly- No third-party toast libraries
10. Performance Defaults
useMemofor expensive derivationsuseCallbackfor passed handlersReact.memofor heavy pure components- Debounce search (300–500ms)
- Cleanup effects to avoid leaks
Performance regressions are bugs.
11. TypeScript Standards
- Strict mode enabled
- No implicit
any - Explicit return types
- JSDoc on public interfaces
- Types colocated with feature
12. Canonical File Structure
src/
features/
my-feature/
api/
components/
hooks/
helpers/
types/
index.ts
components/
SuspenseLoader/
CustomAppBar/
routes/
my-route/
index.tsx
13. Canonical Component Template
import React, { useState, useCallback } from 'react';
import { Box, Paper } from '@mui/material';
import { useSuspenseQuery } from '@tanstack/react-query';
import { featureApi } from '../api/featureApi';
import type { FeatureData } from '~types/feature';
interface MyComponentProps {
id: number;
onAction?: () => void;
}
export const MyComponent: React.FC<MyComponentProps> = ({ id, onAction }) => {
const [state, setState] = useState('');
const { data } = useSuspenseQuery<FeatureData>({
queryKey: ['feature', id],
queryFn: () => featureApi.getFeature(id),
});
const handleAction = useCallback(() => {
setState('updated');
onAction?.();
}, [onAction]);
return (
<Box sx={{ p: 2 }}>
<Paper sx={{ p: 3 }}>
{/* Content */}
</Paper>
</Box>
);
};
export default MyComponent;
14. Anti-Patterns (Immediate Rejection)
❌ Early loading returns
❌ Feature logic in components/
❌ Shared state via prop drilling instead of hooks
❌ Inline API calls
❌ Untyped responses
❌ Multiple responsibilities in one component
15. Integration With Other Skills
- frontend-design → Visual systems & aesthetics
- page-cro → Layout hierarchy & conversion logic
- analytics-tracking → Event instrumentation
- backend-dev-guidelines → API contract alignment
- error-tracking → Runtime observability
16. Operator Validation Checklist
Before finalizing code:
- FFCI ≥ 6
- Suspense used correctly
- Feature boundaries respected
- No early returns
- Types explicit and correct
- Lazy loading applied
- Performance safe
17. Skill Status
Status: Stable, opinionated, and enforceable Intended Use: Production React codebases with long-term maintenance horizons
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
More from sickn33/agentic-awesome-skills and the wider catalog.

frontend-developer
Build modern React and Next.js applications with expert component architecture, server-side rendering, and performance optimization.

2d-games
2D game development principles: sprites, physics, cameras, and genre patterns for canvas/Phaser/Kaplay/Pixi games.

gcp-cloud-run
Build production-ready serverless applications on GCP Cloud Run with optimized cold starts and event-driven architecture.

github-workflow-automation
Automate GitHub workflows and CI/CD pipelines with AI-assisted patterns and DevOps integration.

i18n-localization
Detect hardcoded strings, manage translations, and implement RTL support across locales.

interactive-portfolio
Build portfolios that convert visitors into job offers and client opportunities.