react-expert
Skill5 starsChanged 3 months agoMITView on GitHub
Use when working in a React 19 / Next.js 15 codebase - .tsx/.jsx files, next.config.ts, app/ router directories, "use client"/"use server" directives, package.json with react or next dependencies. Builds and refactors Server/Client Components, server actions and forms, Suspense/streaming UIs, and TanStack Query or Zustand data layers; debugs hydration and boundary errors. Invoke for adding routes or components, wiring mutations with useActionState, choosing state management, fixing "Cannot use hooks in Server Component" class errors, memoization cleanup under React Compiler, and testing RSC apps.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- mizchi/skillstheir own version, first seen Oct 2, 2026
- peakdong68/my-skillstheir own version, first seen Aug 29, 2026
- Leo-Atienza/atlas-claudetheir own version, first seen Jul 24, 2026
- james-paul25/claude-skilltheir own version, first seen Jul 11, 2026
- codeApe-7/ai-agent-workflowGrouptheir own version, first seen Jun 6, 2026
- kaustubhhiware/agent-skills-fullstack-developmenttheir own version, first seen Apr 8, 2026
Used with
Projects with it also use fullstack-guardian, monitoring-expert and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JeffallanSkillfullstack-guardian
Builds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level. Covers the complete stack from database to UI, enforcing auth, input validation, output encoding, and parameterized queries across all layers. Use when implementing features across frontend and backend, building REST APIs with corresponding UI, connecting frontend components to backend endpoints, creating end-to-end data flows from database to UI, or implementing CRUD operations with UI forms. Distinct from frontend-only, backend-only, or API-only skills in that it simultaneously addresses all three perspectives—Frontend, Backend, and Security—within a single implementation workflow. Invoke for full-stack feature work, web app development, authenticated API routes with views, microservices, real-time features, monorepo architecture, or technology selection decisions.
Also in 6 projects that use this
JeffallanSkillmonitoring-expert
Configures monitoring systems, implements structured logging pipelines, creates Prometheus/Grafana dashboards, defines alerting rules, and instruments distributed tracing. Implements Prometheus/Grafana stacks, conducts load testing, performs application profiling, and plans infrastructure capacity. Use when setting up application monitoring, adding observability to services, debugging production issues with logs/metrics/traces, running load tests with k6 or Artillery, profiling CPU/memory bottlenecks, or forecasting capacity needs.
Also in 4 projects that use this
- +7 more from Jeffallan
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- Jeffallan/claude-skills★ 12ksame name
- mizchi/skills★ 349same name
- codeApe-7/ai-agent-workflowGroup★ 17same name
- kaustubhhiware/agent-skills-fullstack-development★ 16same name
- megastep/codex-skills★ 7same name
- Leo-Atienza/atlas-claude★ 4same name
- d3labs-thomas/claude-code★ 2same name
- ihiteshgupta/ClaudeSkills★ 0same name
- james-paul25/claude-skill★ 0same name
- peakdong68/my-skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- docker-expertSkill
- engineering-rulesSkill
- fastapi-expertSkill
- fastify-expertSkill
- flutter-expertSkill
- go-expertSkill
- jetpack-compose-expertSkill
- mobile-qa-expertSkill
- nestjs-expertSkill
- playwright-expertSkill
- react-native-expertSkill
- remix-expertSkill
- swiftui-expertSkill
- terraform-expertSkill
- vue-expertSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 2 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Add or modify routes, layouts, and components in a Next.js 15 App Router project
- Distinctive: line 24
Add Suspense boundaries and streaming to slow pages.
- Distinctive: line 25
Write or fix tests for components, hooks, and server actions in an RSC codebase
- Very specific: line 29
Analyze: - Read package.json (confirm React 19 / Next 15, check for babel-plugin-react-compiler, @tanstack/react-query, zustand), …
- Very specific: line 30
Design the boundary: - Default to Server Components.
- Very specific: line 32
Verify types/lint: - run npx tsc --noEmit and npx next lint (or npx eslint .
- Very specific: line 33
Test: - run the project's test command (npx vitest run or npx jest).
- Very specific: line 34
Prove it works: - run npx next build (catches server/client boundary violations, missing Suspense around useSearchParams, and dynamic API …
- Very specific: line 143
Treating server actions as private functions: Every exported "use server" function is a public POST endpoint.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Expert
Turns Claude into a senior React 19 + Next.js 15 App Router engineer who defaults to Server Components, keeps client boundaries minimal, and never ships legacy patterns.
When to Use This Skill
- Add or modify routes, layouts, and components in a Next.js 15 App Router project
- Implement mutations with server actions,
useActionState, and progressive-enhancement forms - Decide where the Server/Client Component boundary goes and fix boundary/hydration errors
- Wire client-side data fetching with TanStack Query v5 (including SSR hydration)
- Choose and implement state management (server state vs Zustand vs Context vs URL state)
- Add Suspense boundaries and streaming to slow pages; fix waterfalls
- Write or fix tests for components, hooks, and server actions in an RSC codebase
Core Workflow
- Analyze - Read
package.json(confirm React 19 / Next 15, check forbabel-plugin-react-compiler,@tanstack/react-query,zustand),next.config.ts, and the nearestlayout.tsx/existing components to learn conventions. Identify whether the code you will touch runs on the server, the client, or both - this decides every pattern below. - Design the boundary - Default to Server Components. Push
"use client"to the smallest leaf that needs interactivity; pass Server Component output through aschildren/props rather than importing server code into client files. Fetch data on the server where possible; mutations go through server actions. - Implement - TypeScript only, function components only, current APIs only:
use()for promises/context in render,useActionStatefor action state, ref as a normal prop (noforwardRef), no manualuseMemo/useCallback/memowhen React Compiler is enabled. Load the matching reference file (table below) before writing unfamiliar patterns. - Verify types/lint - run
npx tsc --noEmitandnpx next lint(ornpx eslint .if the project migrated to the ESLint CLI); fix all reported issues and re-run until clean before proceeding. - Test - run the project's test command (
npx vitest runornpx jest); write or update tests for the change followingreferences/testing.md; fix all failures and re-run until clean. - Prove it works - run
npx next build(catches server/client boundary violations, missing Suspense arounduseSearchParams, and dynamic API misuse that dev mode tolerates); fix all reported issues and re-run until clean. For behavior changes, startnpx next devand exercise the route.
Reference Guide
Load detailed guidance only when the task needs it:
| Topic | Reference | Load When |
| Server vs Client Components, composition, async APIs, caching | references/server-components.md | Creating/moving components, "use client" decisions, boundary or hydration errors, params/cookies usage |
TanStack Query v5, Zustand vs Context, use() hook | references/state-and-data-fetching.md | Client-side fetching, choosing state management, migrating Query v4→v5, sharing state across components |
Server actions, useActionState, useOptimistic, validation | references/forms-and-actions.md | Building forms, mutations, "use server" files, optimistic UI, revalidation after writes |
| React Compiler, memoization, Suspense/streaming, bundle size | references/performance.md | Perf work, deciding whether to memoize, adding loading.tsx/Suspense, fixing waterfalls or large bundles |
| Testing Library 16 with RSC, async components, action testing | references/testing.md | Writing/fixing tests, testing async Server Components, mocking server actions or next/navigation |
Key Patterns
Server Component page fetching data, client leaf for interactivity:
// app/products/[id]/page.tsx - Server Component (no directive)
import { AddToCart } from "./add-to-cart";
export default async function ProductPage({
params,
}: {
params: Promise<{ id: string }>; // params is a Promise in Next 15
}) {
const { id } = await params;
const product = await getProduct(id); // direct server fetch, no API route
return (
<article>
<h1>{product.name}</h1>
<AddToCart productId={product.id} /> {/* only this ships JS */}
</article>
);
}Server action + useActionState (React 19 form pattern):
// app/products/actions.ts
"use server";
import { revalidatePath } from "next/cache";
export async function addToCart(prev: { error?: string }, formData: FormData) {
const parsed = cartSchema.safeParse(Object.fromEntries(formData));
if (!parsed.success) return { error: "Invalid quantity" };
await db.cart.add(parsed.data); // re-check auth here: actions are public endpoints
revalidatePath("/cart");
return {};
}
// add-to-cart.tsx
"use client";
import { useActionState } from "react"; // from react, NOT react-dom
import { addToCart } from "./actions";
export function AddToCart({ productId }: { productId: string }) {
const [state, formAction, isPending] = useActionState(addToCart, {});
return (
<form action={formAction}>
<input type="hidden" name="productId" value={productId} />
<input name="quantity" type="number" defaultValue={1} />
<button disabled={isPending}>{isPending ? "Adding…" : "Add to cart"}</button>
{state.error && <p role="alert">{state.error}</p>}
</form>
);
}use() to unwrap a server-started promise in a client component (no awaited waterfall):
// page.tsx (server): start the fetch, don't await it
export default function Page() {
const reviewsPromise = getReviews(); // NOT awaited
return (
<Suspense fallback={<ReviewsSkeleton />}>
<Reviews reviewsPromise={reviewsPromise} />
</Suspense>
);
}
// reviews.tsx
"use client";
import { use } from "react";
export function Reviews({ reviewsPromise }: { reviewsPromise: Promise<Review[]> }) {
const reviews = use(reviewsPromise); // suspends until resolved
return <ul>{reviews.map((r) => <li key={r.id}>{r.body}</li>)}</ul>;
}Ref as a prop - forwardRef is legacy in React 19:
function TextInput({ ref, ...props }: React.ComponentProps<"input">) {
return <input ref={ref} {...props} />;
}Common Mistakes
- Marking whole pages
"use client"to use one hook. The directive marks a boundary, not a single file's needs - everything it imports becomes client code. Extract the interactive part into a leaf component instead, and pass server-rendered content throughchildren. - Awaiting
params/searchParams/cookies()/headers()incorrectly in Next 15. These are now async (params: Promise<...>). Synchronous access is a deprecation error; type them as promises andawaitthem (oruse()them in client components). - Assuming
fetchis cached by default. Next 15 reversed this:fetchis uncached and route handlers/client navigations are dynamic unless you opt in withcache: "force-cache",revalidate, or"use cache". Don't add cache-busting hacks; add explicit caching. - Sprinkling
useMemo/useCallback/memowhen React Compiler is enabled. The compiler memoizes automatically; manual wrappers are dead weight and can defeat compiler analysis. Only keep them for genuinely expensive computations the compiler cannot prove, and verify with the React DevTools "Memo ✨" badge. - Using TanStack Query v4 idioms in v5.
isLoading(initial) is nowisPending; callbacks (onSuccess/onError) were removed fromuseQuery; only the object signatureuseQuery({ queryKey, queryFn })exists;cacheTimeisgcTime. Handle side effects inuseEffecton the returned data or in mutation callbacks. - Treating server actions as private functions. Every exported
"use server"function is a public POST endpoint. Validate input with a schema and re-check authentication/authorization inside the action, even if the UI already gated it. - Testing async Server Components with plain
render().render(<AsyncComp />)throws on a promise-returning component. Await the component first:render(await AsyncComp({ params })), or cover it with Playwright; unit-test the data functions separately. - Reaching for Context to share client state. Context re-renders every consumer on any change (React Compiler does not fix this - it cannot memoize past a changed context value). Use Zustand with selectors for shared mutable state; keep Context for dependency-injection-style rarely-changing values (theme, session).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

