Agent skill

React Best Practices V2

by diegosouzapw in diegosouzapw/awesome-omni-skills

Vercel React Best Practices workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

MITAuto-check passedFrontend & Design

Install React Best Practices V2

skills CLI
$ npx skills add diegosouzapw/awesome-omni-skills --skill react-best-practices-v2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install diegosouzapw/awesome-omni-skills react-best-practices-v2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/diegosouzapw/awesome-omni-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills_omni/react-best-practices-v2 .claude/skills/react-best-practices-v2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
react-best-practices-v2
GitHub stars
159
Token cost
~3.5k tokens
SKILL.md length
1,624 words
Files
69 (incl. scripts, references, assets)
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Vercel React Best Practices workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

  • Works in 9 steps: Confirm the target symptom and success… → Identify execution context. → Capture the intended rendering and… → …
  • The user needs a practical performance optimization workflow for React and Next.js applications
  • SKILL.md covers Overview, When to Use This Skill, Operating Table and Workflow, plus 5 more sections
  • Calls bash

What it does

React Best Practices V2 is an agent skill from diegosouzapw/awesome-omni-skills. Vercel React Best Practices workflow skill. Use this skill when the user needs a practical performance optimization workflow for React and Next.js applications, especially when reviewing rendering strategy, caching behavior, bundle pressure, asset loading, or production measurement, and the operator should preserve provenance and use the packaged runbook, guardrails, and inspection script before merging or handing off.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 72 other files, including scripts, reference files and assets (for example `AGENTS.md`, `ATTRIBUTION.md` and `OMNI_ENHANCED.json`).

It sits in Frontend & Design, covering React components, Runbooks and postmortems and Caching. It works with Next.js, React and Vercel. The repository describes itself as: Public repository of AI coding skills, curated improved best-practice skills, and runtime surfaces for CLI, API, MCP, and A2A. The licence is MIT.

When your agent uses it

  • The user needs a practical performance optimization workflow for React and Next.js applications
  • Especially when reviewing rendering strategy
  • Caching behavior
  • Bundle pressure

Example prompts

  • “/react-best-practices-v2”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the target symptom and success metric.
  2. Identify execution context.
  3. Capture the intended rendering and freshness model before editing.
  4. Run the read-only inspection first.
  5. Review architecture before micro-optimizing.
  6. Check first-party optimization primitives.
  7. Only then consider React-specific render tuning.
  8. Validate safely.
  9. Document deploy and rollback notes.

What it can do on your machine

Read from SKILL.md and the folder at commit c3af004. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

React Best Practices V2 loads about 3.5k tokens when it runs, and up to ~5.9k if it reads all its reference files. Until then it costs about 112 tokens; SKILL.md has 1,624 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~112
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from diegosouzapw/awesome-omni-skills at commit c3af004, republished under its MIT licence (© diegosouzapw). 1,624 words, ~3,503 tokens.

Download SKILL.mdSave it as .claude/skills/react-best-practices-v2/SKILL.md (or your agent's skills folder). This skill also uses 68 other files; get the full folder from GitHub.
name
react-best-practices-v2
description
Vercel React Best Practices workflow skill. Use this skill when the user needs a practical performance optimization workflow for React and Next.js applications, especially when reviewing rendering strategy, caching behavior, bundle pressure, asset loading, or production measurement, and the operator should preserve provenance and use the packaged runbook, guardrails, and inspection script before merging or handing off.
version
0.0.1
category
frontend
tags
react-best-practices-v2, react-best-practices, react, nextjs, performance, caching, core-web-vitals, vercel, omni-enhanced
complexity
advanced
risk
safe
tools
codex-cli, claude-code, cursor, gemini-cli, opencode
source
omni-team
author
Omni Skills Team
date_added
2026-03-27
date_updated
2026-04-19

Vercel React Best Practices

Overview

This skill curates the upstream react-best-practices workflow into an operator-ready execution path for React and Next.js performance work.

Keep the original intent: improve performance without cargo-cult optimizations, preserve provenance, and stay aligned with modern React and Next.js guidance. The upgraded workflow adds sharper activation boundaries, App Router vs Pages Router decision points, measurable validation, and compact local support files that help operators inspect a repository and document safe remediation.

Use this skill for performance-sensitive work in React or Next.js when the task involves one or more of these concerns:

  • route or component slowness
  • excessive client-side JavaScript
  • cache or revalidation confusion
  • hydration mismatch risk
  • image, font, or third-party script regressions
  • code review of React or Next.js performance changes
  • performance validation before deploy or handoff

Ask one clarifying question before changing code if any of these are unclear:

  • Is this App Router or Pages Router?
  • Is the problem seen locally, in preview, or in production?
  • Is the target symptom slow initial load, slow navigation, stale data, hydration mismatch, or poor Core Web Vitals?

When to Use This Skill

Activate this skill when the request is primarily about React or Next.js performance behavior, rendering strategy, loading behavior, or cache-aware delivery.

Good fit
  • Writing or refactoring Next.js pages, layouts, or route segments with performance goals
  • Reviewing use client boundaries or deciding what should stay server-side
  • Fixing slow LCP, CLS, INP, hydration mismatch, or bundle growth
  • Reviewing image, font, script, or lazy-loading decisions
  • Investigating stale data caused by caching or revalidation assumptions
  • Preparing a performance-focused PR review, deployment review, or handoff note
Usually not the right skill
  • Pure styling or design-system work with no performance concern
  • Accessibility audits as the main objective
  • Security reviews unrelated to frontend performance behavior
  • CI/CD pipeline design unrelated to frontend build or deploy verification
  • Generic React bugs with no rendering, loading, or cache dimension

If the request drifts into testing strategy, accessibility, security hardening, or deployment platform design, hand off to a more specific skill after capturing any performance findings already confirmed.

Operating Table

SituationStart hereWhy it matters
You do not know the routing modelInspect for app/ vs pages/, then open references/nextjs-performance-guardrails.mdApp Router and Pages Router have different rendering and caching defaults
Existing repo needs a quick read-only scanRun bash scripts/inspect-nextjs-performance.sh <repo-root>Surfaces likely hotspots before deep manual review
User reports slow first load or high JS costCheck use client spread, top-level imports, images, fonts, and scriptsLarge client boundaries and heavy top-level imports are common regressions
User reports stale production dataReview cache expectation, revalidation path, and route rendering modeMany fixes fail because freshness intent was never stated clearly
User reports hydration mismatchCheck browser-only APIs, non-deterministic values, and client/server markup divergenceHydration bugs often appear after server-first refactors
You need a concrete review flowUse examples/performance-review-runbook.mdGives scenario-based steps and expected observations
You need a quick decision matrixUse references/nextjs-performance-guardrails.mdMaps symptoms to safe checks and likely primitives

Workflow

  1. Confirm the target symptom and success metric.

    • Examples: better LCP on /products/[id], lower client JS on the home route, reduced CLS from font swaps, correct freshness for dashboard data.
    • Do not start with blanket memoization or lazy loading.
  2. Identify execution context.

    • Determine whether the codebase uses App Router, Pages Router, or both.
    • Confirm whether the environment is local, preview, or production.
    • Record whether the issue is route-specific, component-specific, or global.
  3. Capture the intended rendering and freshness model before editing.

    • For App Router, decide whether the target should be static, revalidated, or fully dynamic.
    • For Pages Router, confirm whether the route uses static generation, server-side rendering, or client fetching.
    • Write down the expected freshness window and invalidation path.
  4. Run the read-only inspection first.

    • Use:
      bash
      bash scripts/inspect-nextjs-performance.sh .
    • Treat the output as triage, not proof. Confirm each finding manually in code.
  5. Review architecture before micro-optimizing.

    • In App Router, prefer Server Components by default.
    • Add use client only where interactivity, browser APIs, or client-only hooks are required.
    • Split large client trees into a server shell plus small client islands when possible.
    • Move data fetching out of client effects when framework-native server loading is available.
  6. Check first-party optimization primitives.

    • Images: prefer next/image, correct sizing, and careful priority usage.
    • Fonts: prefer next/font; reduce unnecessary variants.
    • Scripts: justify each third-party script and use the least aggressive loading strategy that works.
    • Lazy loading: use for heavy optional client code, not as a substitute for bad architecture.
  7. Only then consider React-specific render tuning.

    • Investigate state placement, prop churn, broad context updates, and expensive child trees first.
    • Use memo or useMemo only when measurement or code structure shows a real payoff.
    • Do not wrap nearly everything in memoization as a default response.
  8. Validate safely.

    • Prefer narrow, reversible changes.
    • Rebuild and rerun the relevant local checks.
    • Compare route behavior before and after.
    • For production-sensitive work, define what must be verified in preview or production metrics.
  9. Document deploy and rollback notes.

    • Record what changed, why the chosen rendering/cache mode is correct, and what symptom should improve.
    • If a change touches caching, note how to verify stale-content recovery and what fallback action to take if freshness becomes wrong after deploy.

Troubleshooting

Slow initial render or poor LCP

Likely causes:

  • Large client component boundary near the route root
  • Heavy imports in app/layout.*, route entry files, or shared providers
  • Unoptimized hero image or incorrectly prioritized assets
  • Early third-party script execution

Checks:

  • Search for broad use client usage in layouts, templates, and top-level pages
  • Check whether the LCP image uses next/image with correct sizing
  • Check whether fonts are loaded through next/font
  • Review third-party scripts and whether they load before interaction

Safe remediations:

  • Move non-interactive UI back to server-rendered components
  • Split heavy widgets behind client islands or lazy loading
  • Replace plain <img> with next/image where appropriate
  • Delay or remove non-essential third-party scripts
Show full SKILL.md (656 more words)Show less
Stale data in preview or production

Likely causes:

  • Cache expectation was never made explicit
  • Revalidation settings do not match freshness needs
  • Route became static or dynamic unintentionally
  • Operator expects deploy-time behavior to invalidate runtime caches automatically

Checks:

  • Write down the required freshness window
  • Review fetch caching behavior and route-level rendering assumptions
  • Check whether the route should be static, revalidated, or dynamic
  • Confirm how invalidation or refresh is expected to happen operationally

Safe remediations:

  • Align route or fetch behavior with the intended freshness model
  • Prefer the smallest change that corrects freshness without making the whole route unnecessarily dynamic
  • Add handoff notes describing how to verify the fix after deploy
Hydration mismatch after refactor

Likely causes:

  • Browser-only APIs used during server render
  • Non-deterministic values like time, random output, or locale-sensitive formatting without coordination
  • Different markup paths on server and client

Checks:

  • Search for window, document, storage APIs, or time-based rendering in shared components
  • Compare server and client branches for divergent markup
  • Check whether a component should be isolated behind a client boundary instead of partially executing on both sides

Safe remediations:

  • Move browser-only logic into client components or effects where appropriate
  • Make initial render deterministic
  • Keep server markup and client hydration paths aligned
High re-render count or sluggish interaction

Likely causes:

  • State lifted too high
  • Broad context updates
  • Expensive child tree under frequently changing props
  • Memoization added without addressing prop instability

Checks:

  • Identify the smallest subtree that actually depends on the changing state
  • Review whether a provider wraps too much of the tree
  • Look for unstable object or function props passed into expensive children
  • Confirm that the expensive work is real before adding memoization

Safe remediations:

  • Move state closer to where it is used
  • Split expensive children from frequently updated parents
  • Narrow context scope
  • Add memoization only after structural fixes or measured need
Bundle regression after adding a feature

Likely causes:

  • Heavy client-only dependency imported at route root or shared layout
  • Entire route tree converted to use client
  • Optional widgets loaded eagerly

Checks:

  • Review recent imports in layouts, route entries, and shared providers
  • Identify feature code that could be deferred or isolated
  • Check whether the dependency is needed during first render

Safe remediations:

  • Push the dependency deeper into a smaller client island
  • Lazy-load optional or below-the-fold widgets
  • Keep the route shell server-rendered where possible
CLS or visual instability

Likely causes:

  • Images without stable dimensions
  • Font swaps or too many font variants
  • Late-loading embeds or scripts changing layout

Checks:

  • Confirm image sizing strategy
  • Check font loading path and variant count
  • Review late DOM injection from third-party code

Safe remediations:

  • Provide stable image dimensions or fill containers correctly
  • Use next/font and reduce variants
  • Reserve space for embeds where practical

Examples

Example 1: Review an App Router product route with poor LCP

Use examples/performance-review-runbook.md, scenario 1.

Expected pattern:

  • confirm route is App Router
  • inspect whether app/products/[id]/page.* or shared layout became client-heavy
  • verify hero image handling and third-party script timing
  • narrow changes to the route and record measurable validation criteria
Example 2: Investigate stale dashboard data after deploy

Use examples/performance-review-runbook.md, scenario 2.

Expected pattern:

  • document freshness expectation first
  • inspect cache and rendering assumptions
  • avoid turning the whole route dynamic unless required
  • add post-deploy verification and rollback notes

Additional Resources

  • references/nextjs-performance-guardrails.md — compact operator matrix for routing mode, cache intent, optimization primitives, and Core Web Vitals interpretation.
  • Official references to consult when needed:
    • Next.js documentation
    • React documentation
    • Vercel Speed Insights
    • Vercel Analytics
    • web.dev Core Web Vitals guidance

Hand off when the primary task becomes:

  • accessibility auditing rather than performance analysis
  • test strategy or test automation design
  • security review of browser code or third-party dependencies
  • deployment platform configuration outside the frontend performance path
  • visual design or styling with no rendering, loading, or cache concern

Provenance Note

This skill preserves the identity and intent of the upstream community skill while improving its execution quality for operators. Keep provenance explicit in review notes when using imported upstream material or adapting rule guidance into repository-specific remediation.

© diegosouzapw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 68 other files (scripts, references, assets) in skills_omni/react-best-practices-v2 of diegosouzapw/awesome-omni-skills.

  • SKILL.md
  • AGENTS.md
  • ATTRIBUTION.md
  • OMNI_ENHANCED.json
  • ORIGIN.md
  • README.md
  • agents/omni-import-router.md
  • assets/omni-import-source-manifest.json
  • examples/omni-import-operator-packet.md
  • examples/omni-import-prompt-template.md
  • examples/performance-review-runbook.md
  • metadata.json
  • references/nextjs-performance-guardrails.md
  • references/omni-import-checklist.md
  • references/omni-import-playbook.md
  • references/omni-import-rubric.md
  • references/omni-import-source-summary.md
  • … and 52 more

Open the folder on GitHubat commit c3af004

Compare with similar skills

React Best Practices V2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

React Best Practices V2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Best Practices V2 this skilldiegosouzapw/awesome-omni-skills159—~3.5kAutomated safety check: PassMIT
Vercel React Best Practicessanity-io/sanity6.4k130 repos~1.6kAutomated safety check: PassMIT
React Best Practicesryokun6/ryos1.3k—~2kAutomated safety check: PassMIT
Vercel React Best Practicesgambitph/Stackable350—~2kAutomated safety check: PassMIT
React Best Practicesmajiayu000/spellbook286—~1.1kAutomated safety check: PassMIT
React Best Practicesbenchflow-ai/skillsbench1.8k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 130 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • React performance optimization guidelines from Vercel Engineering (vercel-labs/agent-skills).

    1.3k GitHub stars~2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Vercel React Best Practices

    gambitph/Stackable

    React performance optimization guidelines from Vercel Engineering.

    350 GitHub stars~2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • React Best Practices

    majiayu000/spellbook

    React and Next.js performance playbook distilled from Vercel Engineering guidance.

    286 GitHub stars~1.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Best Practices

    benchflow-ai/skillsbench

    IMPORTANT: Any change to React or Next.js code must read through this skill first.

    1.8k GitHub stars~1.3k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Pinak Frontend Guru

    sundial-org/awesome-openclaw-skills

    Expert UI/UX and React performance auditor (PinakBot persona).

    663 GitHub stars~651 tokensUpdated 7 mo ago
    Frontend & DesignAuto-check passed

More from diegosouzapw/awesome-omni-skills

All 39 skills in this repo
  • Content Creator

    diegosouzapw/awesome-omni-skills

    Content Creator workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~4k tokensUpdated 3 mo ago
    Auto-check passed
  • Helm Chart Scaffolding

    diegosouzapw/awesome-omni-skills

    Helm Chart Scaffolding workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Prompt Engineering

    diegosouzapw/awesome-omni-skills

    Prompt Engineering Patterns workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~3.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Prompt Engineering Patterns

    diegosouzapw/awesome-omni-skills

    Prompt Engineering Patterns workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~4k tokensUpdated 3 mo ago
    Auto-check passed
  • Prompt Library

    diegosouzapw/awesome-omni-skills

    📝 Prompt Library workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~3.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Protocol Reverse Engineering

    diegosouzapw/awesome-omni-skills

    Protocol Reverse Engineering workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~3.8k tokensUpdated 3 mo ago
    Auto-check passed

Questions about React Best Practices V2

What does React Best Practices V2 do?

Vercel React Best Practices workflow skill. An agent skill from diegosouzapw/awesome-omni-skills. React Best Practices V2 is an agent skill from diegosouzapw/awesome-omni-skills. Vercel React Best Practices workflow skill.

When should I use React Best Practices V2?

React Best Practices V2 fits situations like: the user needs a practical performance optimization workflow for React and Next.js applications; especially when reviewing rendering strategy; caching behavior; bundle pressure.

How do I install React Best Practices V2 in Claude Code?

Run `npx skills add diegosouzapw/awesome-omni-skills --skill react-best-practices-v2 -a claude-code`. Or copy the skill folder (skills_omni/react-best-practices-v2 in diegosouzapw/awesome-omni-skills) into .claude/skills/react-best-practices-v2 in your project. Claude Code loads it when a task matches its description.

How do I install React Best Practices V2 in Codex?

Run `npx skills add diegosouzapw/awesome-omni-skills --skill react-best-practices-v2 -a codex`. Or copy the skill folder (skills_omni/react-best-practices-v2 in diegosouzapw/awesome-omni-skills) into .agents/skills/react-best-practices-v2 in your project. Codex loads it when a task matches its description.

Can I use React Best Practices V2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add diegosouzapw/awesome-omni-skills --skill react-best-practices-v2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/react-best-practices-v2, .gemini/skills/react-best-practices-v2, .github/skills/react-best-practices-v2 and .opencode/skills/react-best-practices-v2 in your project.

What does React Best Practices V2 need to run?

Going by SKILL.md and its folder, React Best Practices V2 needs the command-line tools its instructions call (bash).

Does React Best Practices V2 access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is React Best Practices V2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does React Best Practices V2 use?

React Best Practices V2 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does React Best Practices V2 use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to React Best Practices V2?

Skills that share tags, products or a category with React Best Practices V2: Vercel React Best Practices (sanity-io/sanity, 6.4k stars), React Best Practices (ryokun6/ryos, 1.3k stars), Vercel React Best Practices (gambitph/Stackable, 350 stars) and React Best Practices (majiayu000/spellbook, 286 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains React Best Practices V2?

diegosouzapw (a GitHub user) maintains it in diegosouzapw/awesome-omni-skills, which has 159 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on July 8, 2026.

Source: diegosouzapw/awesome-omni-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.