ワンクリックで
react-best-practices
React/Next.js patterns for performant, maintainable, accessible components
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
React/Next.js patterns for performant, maintainable, accessible components
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | react-best-practices |
| description | React/Next.js patterns for performant, maintainable, accessible components |
| version | 2.0.0 |
| allowed-tools | ["Read","Grep","Glob","WebFetch"] |
| load_when | ["writing_react_components","reviewing_react_code","optimizing_react_performance"] |
| inputs | [{"name":"component_requirements","type":"string","required":true},{"name":"existing_design_system","type":"string","required":false}] |
| outputs | [{"name":"component_implementation","type":"string","format":"TypeScript React functional component, hooks, accessible"},{"name":"performance_checklist","type":"checklist","format":"useMemo | useCallback | lazy loading | bundle size"}] |
| constraints | ["functional_components_only_no_class_components","accessibility_attributes_required_on_interactive_elements","no_prop_drilling_beyond_2_levels"] |
| mandatory-fetch-rule | Antes de afirmar "best practice" sobre React, Next.js o React Router, invocar WebFetch contra el dominio canónico correspondiente y citar la URL exacta. NUNCA recitar best practices de memoria — la API evoluciona rápido (Server Components, Server Actions, use, useTransition, useOptimistic, useFormState). |
Skill especializado en patrones React/Next.js. 57 reglas en 8 categorías, organizadas como referencias modulares. Inspirado en estándares Vercel Labs.
Activar este skill cuando:
.tsx, .jsx)NO activar para: lógica de backend pura, scripts CLI, código no-React.
Violaciones duras detectadas durante revisión de código React/Next.js. Cada una mapea a una regla en references/:
useEffect para data fetching del servidor en Next.js 13+ App Router. Usar Server Components con await directo, o TanStack Query en Client Components. Ver references/server-components.md §6.3.setState dentro del render (sin useEffect). Causa loops infinitos. Ver references/fundamentals.md §1.2.array.push, obj.prop = x). Usar spread o useReducer. Ver references/fundamentals.md §1.4.index como key en listas que pueden reordenarse. Usar IDs estables. Ver references/fundamentals.md §1.3.references/components.md §2.6 y references/state-management.md §7.7.references/hooks.md §3.1.useEffect/useMemo/useCallback. Stale closures. Ver references/hooks.md §3.6.useEffect. Memory leaks. Ver references/hooks.md §3.4.references/fundamentals.md §1.1.references/server-components.md §6.5.any en TypeScript. Usar unknown + type guards. Ver references/typescript.md §5.4.getByClassName, querySelector). Testear comportamiento desde la perspectiva del usuario. Ver references/testing.md §8.2.'use client' un árbol completo cuando solo una hoja necesita interactividad. Mover el boundary lo más abajo posible.references/state-management.md §7.1.| Necesito... | Referencia |
|---|---|
| Estructura básica de componente, JSX, keys, fragments, pureza | references/fundamentals.md |
| Composición, naming, render props, controlled forms, props drilling | references/components.md |
useState, useEffect, useMemo, useCallback, useReducer, useRef, custom hooks | references/hooks.md |
React.memo, code splitting, virtualización, debounce, lazy loading, imágenes | references/performance.md |
| Tipar props, generics, type guards, utility types, event handlers | references/typescript.md |
Server Components, 'use client', Server Actions, Suspense, Metadata API, loading/error | references/server-components.md |
| State minimal, lifting state, Context, Zustand, TanStack Query, composition vs drilling | references/state-management.md |
| Testing Library, MSW, jest-axe, behavioral tests, a11y tests | references/testing.md |
| Templates rápidos, patrón de Server Component, patrón de custom hook | references/cheatsheet.md |
# Revisar componente
"Revisa este componente siguiendo react-best-practices"
# Optimizar performance
"Optimiza este código usando react-best-practices para performance"
# Validar arquitectura
"¿Este diseño sigue react-best-practices?"
Versión: 2.0.0 (split en references por regla del proyecto: max 200 líneas/archivo) Última actualización: 2026-05-06 Fuente: Vercel Labs React Best Practices (adaptado)
Review existing Architecture Decision Records. Flag ADRs whose aging signals may have triggered given current state. Categorizes each as valid / aged / superseded and suggests follow-up actions.
Author an Architecture Decision Record (ADR). Captures decisions with implications beyond the current change — lasts months, affects multiple files, hard to reverse. Records context, alternatives considered, consequences, and aging signals so the decision can be revisited when conditions change.
4-phase loop-detection and recovery protocol. Fires when an agent detects it is stuck or repeating the same tool call with no progress — before tool-loop-detection circuit-breaks at 30 calls.
Socratic exploration of requirements before implementation. Refines spec through targeted questions. Use when user asks to 'explore options', 'refine requirements', or mentions 'unclear requirements'.
Generate structured changelog from git history. Groups commits by type, filters noise, produces Keep a Changelog format. Single source of truth — no /commands wrapper.
Generate pipe-delimited commits: Tipo|IdTarea|YYYYMMDD|Descripción. Single source of truth — no /commands wrapper.