React Frontend Development Guidelines
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @org-02qudk26/frontend-dev-guidelines.
About this skill
Problem
Production React codebases often drift in three ways: data fetching is fragmented by isLoading flags and manual spinner components, domain logic leaks into components/, and performance defaults depend on individual habits. The code runs, but boundaries, typing, and reuse strategy become inconsistent, and refactoring cost accumulates over time.
How It Works
frontend-dev-guidelines constrains frontend implementation with checkable engineering rules:
- Suspense-first:
useSuspenseQueryis the primary data-fetching pattern; avoid early returns, manual loading states, and in-componentfetchlogic. - Feature-first structure: domain logic lives in
features/, reusable primitives live incomponents/, and each feature owns its API file. - Strict TypeScript: explicit return types,
import type, typed responses, and noany. - Performance defaults: use
useMemofor expensive derivations,useCallbackfor passed-in handlers,React.memofor heavy components, and clean up effects to avoid leaks.
It also provides an FFCI score, component checklist, and anti-pattern list to judge whether a proposed implementation fits the current architecture, performance goals, and maintenance cost before coding starts.
Boundaries
The skill targets production React projects using TypeScript, Suspense, TanStack Router, and MUI. If the project has not adopted a Suspense-based data model, or the main goal is rapid prototyping, adopting it may add migration cost; start with routing, data fetching, and feature boundaries, then expand to stricter style and performance rules.
Use Cases
- {'text': 'When creating components or pages, determine data fetching and boundary structure using Suspense and lazy loading rules.'}
- {'text': 'When reviewing frontend code, check for early-return loaders, inline API calls, and untyped responses.'}
- {'text': 'When refactoring large dialogs, charts, or data grids, decide whether to lazy-load and split component responsibilities.'}
- {'text': 'When adding feature modules, place domain logic in features/ and consolidate API calls into feature API files.'}
Best For
- {'text': 'Frontend engineers standardizing React and TypeScript component conventions'}
- {'text': 'Frontend tech leads reviewing data fetching, routing, and performance defaults'}
- {'text': 'Platform frontend teams maintaining long-lived production React codebases'}
- {'text': 'Senior engineers reducing boundary and type drift during refactors'}
Related Skills
Track multiple GitHub projects, check releases and changelogs, and generate structured update summaries with impact analysis.
Upload local files to Qiniu Object Storage with server-side auto-delete days and public or private permanent URLs, ideal for temporary files and replacing Base64 storage.
Creates themed learning sites by generating flashcards, lessons, quizzes, index, and progress pages into a deployable website.
End-to-end mathematical optimization modeling with Gurobi and Python, covering data validation, code generation, solving, result analysis, and iterative revision.