/engineering-paved-path:react-best-practicesfrom Engineering Paved Path
Modern React best practices and anti-pattern catalog (2025-26). Use when writing, reviewing, or refactoring React components, hooks, and state management. Covers component design, state patterns, hooks misuse, performance, data fetching, and code organization.
Ships in Engineering Paved Path. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Modern React conventions (2025-26). Covers what to do and what to avoid. For code examples, see examples.md.
Each rule is tagged with a severity for use by consuming agents:
children prop and composition over deep prop drillingThe #1 React anti-pattern. Look for it in every review.
useState — compute during renderuseState + useEffect to sync a computed value — just compute ituseMemo ONLY if the computation is expensive (measured, not assumed)useState — only values that change over time and affect the UIuseReducer instead of multiple useState callsBefore each useEffect, ask: Is there an external system being synchronized? If no, it's misused.
useEffect for derived state — compute during renderuseEffect for event handling — put logic in the event handleruseEffects that trigger each other — usually means derived stateMost useMemo/useCallback calls are unnecessary. Be skeptical:
useMemo — only for actually expensive computations (sorting large datasets, complex transforms)useCallback — only when the function is passed to a React.memo childcamelCase functions returning JSX are NOT React components. They break reconciliation, hooks, and dev tools.
renderThing() pattern — use <Thing /> component syntaxNew arrays, objects, and functions created inline in JSX props break React.memo on children.
useMemouseCallback (only when passed to memoized children)null are unnecessary — call the hook directlyuseApiQuery/useApiMutation core hooksstyle={} objectssm:, md:, lg:) for responsive designcomponents/ui/ over recreating common elementsreact-error-boundary package for function component-friendly APIresetKeys={[location.pathname]} so boundaries reset on navigationresetErrorBoundary in fallback UIkey when lists can be reordered, filtered, or modifiedMath.random() or other unstable values as keys — causes full unmount/remountkey on <React.Fragment key={id}>, not on a child{count && <Component />} when count can be 0 — renders literal 0{count > 0 && <Component />} or ternary insteadaria-label to icon-only buttons — without it, they're invisible to screen readersaria-describedby and aria-invalidaria-live="polite" for dynamic content updates (search results, notifications, toasts)React.lazy() + <Suspense> for route-level code splittingmanualChunks to split vendor bundles for better cachinglazy(() => import('./X')) — dynamic paths break build analysisuseEffect cleanup using AbortControllerbaseURL, default headers, and interceptorsref as a regular prop instead of using forwardRef (React 19+)memo/useMemo/useCallback unless measuredutils/ or components/ui/What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/fastify-best-practicesGuides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts./next-best-practicesNext.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling/onion-architectureEnforces Onion Architecture (dependencies point inward) on a TypeScript backend (a Fastify + Drizzle + Zod server/ package and a pure domain core, reviewer-core in the reference layout). Use this skill whenever you add or change a backend route, service, repository, adapter, DB query, contract, or DI wiring — and whenever deciding WHERE a piece of logic, an external-tool call (LLM/OpenAI/Anthropic/OpenRouter, GitHub/octokit, git, ripgrep/ast-grep, Postgres), a type, or a validation belongs across layers. Also use when reviewing layering, an import that crosses package/layer boundaries, a leaked Drizzle query, a directly-instantiated SDK client, or business logic creeping into a route. Trigger terms: onion architecture, layer, dependency direction/rule, ports and adapters, repository, service, adapter, composition root, container, dependency inversion, where should this live, layering violation./react-frontend-architectureReact/Next.js frontend architecture & code organization (2025-26): where files live, how to split components, feature-based structure, co-location, constants/utils/helpers/types/hooks placement, where business logic goes, import boundaries, barrel files, path aliases, and naming conventions. Use when structuring a new frontend, deciding where a file or piece of logic belongs, splitting an oversized component/module, reviewing folder layout, or naming files. Stack-agnostic (React 19 + Next.js 15 App Router aware)./react-testing-libraryGeneral-purpose React Testing Library guide with Vitest. Use when writing, reviewing, or setting up React component and hook tests. Covers project setup from scratch, RTL query priority, userEvent, async patterns, mocking strategies, and common anti-patterns. Applicable to any Vite + React project./securityApplication-CODE security review based on OWASP Top 10:2025, for a React + Express + MongoDB/Mongoose + JWT stack. Use when reviewing source code for vulnerabilities, implementing or auditing auth/authorization, handling untrusted input, working with file uploads, managing secrets in code, or hardening an API endpoint. Covers A01-A10 for that stack, including supply-chain risk in npm dependencies. Trigger terms: security review, is this code safe, vulnerability, OWASP, injection, XSS, IDOR, broken access control, auth bypass, mass assignment, rate limiting, JWT verification. NOT for infrastructure or network security — VPC and security-group design, firewall rules, which ports to open, public IPs, TLS termination, OS or container hardening, and cloud IAM policy are all out of scope: this skill reads application source code and has nothing to say about them.15 plugins ship this exact skill · first indexed Jul 20, 2026
Showing 6 of 15 plugins, one per repository first
npx claudepluginhub syukpublic/ai-dev-toolkit --plugin engineering-paved-path