Automated summary
This skill supplies non-obvious React and Next.js architecture and performance rules, with routing to topic-specific reference files.
Strengths
- Concrete critical rules: derive instead of syncing state, stable keys, memoize only after profiling
- A quick routing table that points to the right tool (TanStack Query, Zustand, react-hook-form + Zod, Radix)
- An explicit anti-pattern list that is easy to scan during code review
- Loads only the reference file matching the task, keeping injected context small
Limitations
- The substantive detail lives in four references/ files not included here, so the SKILL.md alone is a checklist
- Library choices are opinionated (TanStack Query, Zustand, Radix) and assume an already-aligned stack
- Covers neither Vue/Svelte nor backend concerns, and assumes fluency with standard React APIs
Use it when writing or reviewing React/Next.js components, managing state, building forms, dialogs, or optimizing rendering.
Avoid it on non-React/Next.js projects, or when you need the in-depth guidance but cannot access the reference files.
Security analysis
SafeThis is a pure documentation/guidance skill with no declared tools, no executable commands, no network calls, and no file-system or secret-handling instructions. It only points to relative reference files and describes React/Next.js best practices, so there is no meaningful execution risk.
No concerns found
How this analysis is madeExamples
This React component copies props into useState and syncs them with a useEffect. Refactor it to derive values instead, and tell me what state can be removed entirely.I'm adding a dashboard with filters and pagination in Next.js. Should this data live in TanStack Query, a Zustand store, or server components? Walk me through the trade-offs.Review my custom modal component for accessibility: keyboard focus handling, accessible name, focus trapping, and reduced-motion support.name: frontend-patterns description: 'Guides React and Next.js component architecture and performance. Use when composing components, managing React state, or optimizing rendering and accessibility.'
Frontend Development Patterns
Non-obvious React/Next.js rules. Standard React API usage is assumed.
When to Activate
- Building or reviewing React components, hooks, or state
- Fetching data or choosing client versus server state
- Optimizing rendering, bundle size, or long lists
- Building forms, error handling, dialogs, or animation
Critical Rules
- Compose with children and slots; derive values instead of mirroring them in state.
- Server data belongs in TanStack Query, SWR, or framework data APIs, not global stores.
- Effects clean up timers, listeners, subscriptions, and stale async results.
- Keys are stable data IDs, never indexes, for reorderable or removable lists.
- Memoize after profiling, not speculatively.
- Prefer native elements and Radix/Headless UI over custom ARIA widgets.
- Interactive elements need keyboard access, visible focus, and an accessible name.
- Validate on the server even when the client validates.
- Honor
prefers-reduced-motion; animate transform/opacity only.
References
Paths are relative to this SKILL.md's directory. Read only the file matching the task. If a file cannot be read, say so.
- references/components-and-state.md Read when: writing compound components, render props, custom hooks, or context reducers, or choosing a state library.
- references/data-and-performance.md Read when: fixing async races, or deciding on memoization, lazy loading, or virtualization.
- references/forms-errors-a11y.md Read when: building forms, error boundaries, keyboard navigation, or modal focus handling.
- references/animation.md Read when: adding Framer Motion list or modal transitions.
Quick Routing
| Situation | Choose |
| ----------------------------- | --------------------------------- |
| Slot-based UI | Composition / compound components |
| Shared logic | Custom hook |
| Small shared state | useReducer + Context |
| Larger client state | Zustand or Redux Toolkit |
| Server state | TanStack Query or SWR |
| Lists over a few hundred rows | @tanstack/react-virtual |
| Forms | react-hook-form + Zod |
| Dialog/popover/menu | Radix or Headless UI |
Anti-Patterns
- Syncing state with effects when a derived value works.
- One big Context value rerendering all consumers.
- Fetching in
useEffectwithout ignoring superseded requests. - Fresh object or function literals passed to memoized children.
divclick handlers instead ofbuttonora.
Related ycc Skills
ycc:frontend-design— visual direction, typography, color, and motion intent to pair with these implementation patterns
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/react-next-js-frontend-patterns-mvda8993' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/react-next-js-frontend-patterns-mvda8993/download' --output '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md.part' && mv '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md.part' '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md' && test -s '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/frontend-patterns' && cp -R '.skill-downloads/react-next-js-frontend-patterns-mvda8993' '.claude/skills/frontend-patterns'Cursor
test -f '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md' && test -s '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/frontend-patterns' && cp -R '.skill-downloads/react-next-js-frontend-patterns-mvda8993' '.cursor/skills/frontend-patterns'Codex
test -f '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md' && test -s '.skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/frontend-patterns' && cp -R '.skill-downloads/react-next-js-frontend-patterns-mvda8993' '.agents/skills/frontend-patterns'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/react-next-js-frontend-patterns-mvda8993'openskills read 'react-next-js-frontend-patterns-mvda8993'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/react-next-js-frontend-patterns-mvda8993/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.