react-next-performance-review
Skill0 starsChanged 7 months agoApache-2.0View on GitHub
Guardrail for React/Next.js review and refactor work focused on hydration, loading states, rerender paths, and SWR cache behavior.
In this repository57 other files it gives its agents.
- ai-app-integrationSkill
- anti-llm-frontend-designSkill
- aspnet-core-web-developmentSkill
- async-python-patternsSkill
- browser-game-foundationsSkill
- browser-local-qaSkill
- build-mcp-server-sdk-v2Skill
- canva-design-opsSkill
- check-completionSkill
- cli-tool-creatorSkill
- cloudflare-agents-mcpSkill
- cloudflare-durable-objectsSkill
- cloudflare-workers-platformSkill
- deployment-preview-workflowsSkill
- docx-document-artifactsSkill
- durable-workflow-orchestrationSkill
- dynamic-og-imagesSkill
- eval-auditSkill
- evaluate-ragSkill
- figma-design-to-code-rulesSkill
- fine-tuningSkill
- frontend-product-builderSkill
- game-asset-pipeline-expansionSkill
- game-ui-playtestSkill
- generate-synthetic-dataSkill
- github-pr-ci-opsSkill
- gmail-inbox-opsSkill
- golden-datasetSkill
- huggingface-llm-trainerSkill
- javascript-monorepo-buildsSkill
- linear-issue-managementSkill
- media-generation-transcriptionSkill
- millrace-rs-contract-paritySkill
- minecraft-mod-qa-automationSkill
- notion-workspace-flowsSkill
- openai-docsSkill
- optimize-agentic-cliSkill
- pdf-artifact-workflowSkill
- phaser-2d-game-developmentSkill
- postgres-query-performanceSkill
- product-ui-polish-reviewSkill
- pydantic-v2-patternsSkill
- python-repo-refactoring-hygieneSkill
- rag-corpus-hygieneSkill
- rust-best-practicesSkill
- shadcn-ui-compositionSkill
- skill-evaluation-harnessSkill
- tauri-desktopSkill
- tauri-mcp-cliSkill
- tauri-ptySkill
- tile-pixel-art-transitionsSkill
- train-sentence-transformersSkill
- typer-cli-patternsSkill
- using-dbt-for-analytics-engineeringSkill
- validate-evaluatorSkill
- visual-asset-pipelineSkill
- watchdog-file-watcher-patternsSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Check hydration and boundary first, then loading states, then SWR cache or mutation behavior when SWR appears, then rerender cause, then …
- Very specific: line 44
Do not collapse the task class to review, debug, or refactor alone.
- Distinctive: line 45
Do not preface the answer with a skill banner or self-introduction.
- Distinctive: line 47
If SWR is in the diff, check key stability, mutation scope, and revalidation order.
- Very specific: line 48
Do not lead with useMemo or useCallback.
- Very specific: line 50
Prefer server-side restructuring, transitions, or useDeferredValue before memoization when they address the observed bottleneck.
- Distinctive: line 60
Start with the task class and first evidence to inspect.
- Distinctive: line 65
If SWR appears in the diff, keep the cache branch conditional and check key stability, mutation scope, and revalidation order.
- Distinctive: line 66
Keep hydration and server/client concerns separate from loading-state concerns, and loading-state concerns separate from cache concerns.
- Distinctive: line 71
Read the diff and render path before suggesting any change.
- Distinctive: line 73
If SWR appears, inspect key, mutation, and revalidation behavior only as needed.
- Distinctive: line 83
Start from the smallest useful read of the request, then widen only enough to confirm the actual failure or optimization path.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Next Performance Review
Purpose
Help agents review React and Next.js diffs by reading the first evidence first, then choosing the smallest safe change. This is a guardrail, not a React course or SWR manual.
Use When
- React or Next.js component, route, or data-fetching behavior is involved
- hydration, loading, rerender, or SWR cache behavior may regress
- behavior must stay stable while performance changes
Do Not Use When
- styling only
- backend only
- broad optimization advice without a concrete diff or render path
Quick Start
- Classify the task as
hydration-and-cache regression reviewordata-fetching render-performance refactor. - Inspect the diff and first evidence: render path, server/client boundary, SWR key or mutation path, and any hydration or loading-state snapshot.
- Check hydration and boundary first, then loading states, then SWR cache or mutation behavior when SWR appears, then rerender cause, then accessibility and state coverage.
- Choose the smallest safe change class and the next verifier.
Operating Constraints
- Do not collapse the task class to
review,debug, orrefactoralone. - Do not preface the answer with a skill banner or self-introduction.
- Separate hydration and server/client concerns from loading-state concerns, and loading-state concerns from cache concerns.
- If SWR is in the diff, check key stability, mutation scope, and revalidation order.
- Do not lead with
useMemooruseCallback; prove the rerender path first. - For refactors, preserve request semantics, loading and error states, cache key behavior when present, and visible output.
- Prefer server-side restructuring, transitions, or
useDeferredValuebefore memoization when they address the observed bottleneck.
Inputs This Skill Expects
- diff or code region
- render path and server/client split
- loading, empty, and error states
- SWR details if present
- accessibility and state coverage when relevant
Output Contract
- Start with the task class and first evidence to inspect.
- For Next.js diff reviews, use
hydration-and-cache regression review. - For fetch-driven React refactors, use
data-fetching render-performance refactor. - Name the likely regression class before suggesting changes on review prompts.
- Name the rerender path before suggesting optimization on refactor prompts.
- If SWR appears in the diff, keep the cache branch conditional and check key stability, mutation scope, and revalidation order.
- Keep hydration and server/client concerns separate from loading-state concerns, and loading-state concerns separate from cache concerns.
- For refactors, preserve request semantics, loading and error states, cache-key behavior when present, and visible output.
- End with the next verifier and the evidence intentionally captured.
Procedure
- Read the diff and render path before suggesting any change.
- Classify the work by surface and shape, then decide whether the blocker is boundary, loading, cache, rerender, or state coverage.
- If SWR appears, inspect key, mutation, and revalidation behavior only as needed.
- Recommend the smallest safe change class and the next verifier.
Pitfalls And Gotchas
- Blanket memoization without proof.
- Moving logic to the server when the bug is hydration or loading.
- Treating SWR as generic cache.
- Turning the answer into a React tutorial or SWR manual.
Progressive Disclosure
Start from the smallest useful read of the request, then widen only enough to confirm the actual failure or optimization path. Keep the skill short enough that it steers the answer instead of becoming a generic guide.
Verification Pattern
- Confirm the task class names both the surface and the shape.
- Confirm first evidence points to the diff or render path, not a guessed optimization.
- Confirm hydration and server/client checks happen before memoization advice.
- Confirm SWR checks appear only when SWR is present.
- Confirm the next verifier and evidence captured are named explicitly.
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.

