React frontend
React 19 + Vite + Tailwind v4 frontend conventions. Activates when working on components, pages, hooks, state management, or styling.From its SKILL.md
npx -y skills add felixhennequin-gif/claude-code-config-template --skill react-frontendAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.3 KB, 988 tokens by cl100k_base, as published. Nobody here has run it
React 19 + Vite + Tailwind v4 — Frontend conventions
Structure
frontend/src/
├── pages/ # Page components (one per route)
├── components/ # ui/ primitives + [feature]/ folders
├── hooks/ # Custom hooks
├── services/ # API calls (fetch wrapper)
├── contexts/ # React contexts (auth, theme)
└── styles/ # Global CSS, Tailwind variables
Components
- One component per file. No multi-export unless sub-components are colocated.
- Max ~200 lines per component. Beyond that, extract sub-components or hooks.
- Destructure props in the signature, with default values.
- No business logic in components. Extract to a hook or a service.
// GOOD
function ItemCard({ item, onFavorite, isFavorited = false }) { /* ... */ }
// BAD — unstructured props, component doing too much
function ItemCard(props) {
const [data, setData] = useState(null);
useEffect(() => { fetch(`/api/items/${props.id}`); }, []);
}
Hooks
- Prefix with
use. One hook = one responsibility. - Prefer returning a named object over an array (except simple two-value hooks like useState) — makes destructuring self-documenting. This is a team preference, not a framework rule.
State management
- React Context for low-frequency state (theme, auth, locale). Context re-renders every consumer on every change — fine when changes are rare.
- Zustand (or similar) for high-frequency shared state that updates often. Selectors avoid the Context re-render problem.
- Local state by default. Lift only when necessary.
React 19
use()(React 19) — unwraps a Promise or a Context inside render. Key constraints:- Promise-only for data.
use()works on an already-existing Promise (or Context); it is not a general side-effect mechanism and is not a replacement foruseEffect. - Requires a parent
<Suspense>boundary. Callinguse(promise)suspends the component; the closest<Suspense>ancestor catches the suspension and renders itsfallback. No boundary → the suspension propagates up the tree and nothing renders (in a Vite app without Suspense wrappers, the whole subtree appears frozen). - Use it when a promise is passed as a prop from a Server Component, or handed down through an explicit Suspense boundary you control.
- For ad-hoc client-side fetching, use TanStack Query (or SWR). Do not hand-roll fetch flows inside components.
- Promise-only for data.
useActionState— wire forms to async actions, track pending/error state without manualuseState.useFormStatus— read parent form's pending state from a child submit button, no prop drilling.- Server Components awareness — even in a client-heavy Vite app, know the
"use client"boundary. Eases any later migration to Next.js or React Router framework mode. - React Compiler / React Forget — when enabled, it auto-memoizes and you can skip manual
useMemo/useCallback. Check if the project has it enabled (look forbabel-plugin-react-compileror thereactCompilerVite plugin). If it's NOT enabled, useuseMemo/useCallbackwhere the profiler shows a real need — don't add them preemptively, but don't ignore measurable perf issues either.
Tailwind v4
- Use the design system's CSS variables — no hardcoded values.
- Utility classes inline in JSX.
cn()/clsx()for conditionals. - Dark mode via
classstrategy. Mobile-first responsive.
Forms & API
- React Hook Form + Zod resolver; share the Zod schema between frontend and backend when possible.
- Centralized
fetchwrapper inservices/api.js— no directfetchinside components. - Every call exposes loading + error states.
Accessibility (minimum)
aria-labelon icon-only buttons, focus trapping in modals, sufficient contrast, keyboard nav.
Anti-patterns
- ❌
useEffectto derive state — useuseMemoor compute during render - ❌ Props drilling deeper than 3 levels — use a Context or store
- ❌
indexas key in dynamic lists - ❌ Components over 200 lines without extraction
- ❌
anyin TypeScript / JSDoc
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most design frontend skills give in 988 tokens
Counted across 1,169 of the 1,878 authors here whose files we hold, read 2026-08-07
- Use CSS variables for color consistencyin 72 of 1169, across 23 files
- Commit to one bold aesthetic direction before codingin 72 of 1169, across 27 files
- Match implementation complexity to the aesthetic visionin 70 of 1169, across 20 files
- Add atmospheric background effects and texturesin 57 of 1169, across 9 files
- Use unexpected spatial compositions and layoutsin 56 of 1169, across 8 files
- Implement real working codein 55 of 1169, across 7 files
- Vary themes and aesthetics across different designsin 48 of 1169, across 7 files
- Launch chromium in headless modein 47 of 1169, across 4 files
- Close the browser when donein 47 of 1169, across 4 files
- Run provided scripts with help flag firstin 47 of 1169, across 4 files
- Wait for network idle statein 47 of 1169, across 4 files
- Use descriptive selectors for elementsin 47 of 1169, across 4 files
Said here and by no other author read
- Put one component per file
- Keep components under two hundred lines
- Destructure props in the signature
- Extract business logic to hooks or services
- Wrap data promises with a Suspense boundary
- Use a centralized fetch wrapper
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.