Skip to content
Back to skills

React Best Practices

ASecurity

Analyzes React/Next.js code for performance bottlenecks, focusing on waterfalls, bundle size, and rendering efficiency.

  • 32 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 7, 2026
toolsreactnextjsperformance

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills- --skill React_Best_Practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mdbabumiamssm-react-best-practices/badge)](https://www.skillsdirectory.com/skills/mdbabumiamssm-react-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: 'react-performance-optimizer'
description: 'Analyzes React/Next.js code for performance bottlenecks, focusing on waterfalls, bundle size, and rendering efficiency.'
---


# React Performance Optimization Skill

This skill assists in identifying and resolving common performance issues in React and Next.js applications. It applies rules from Vercel's engineering best practices.

## When to Use This Skill

*   When a user asks to "optimize" a React component or page.
*   When a user mentions "slow loading", "waterfalls", or "large bundle size".
*   When reviewing code for production readiness.

## Core Capabilities

1.  **Waterfall Detection**: Identifies nested data fetching patterns that block rendering.
2.  **Bundle Size Analysis**: Suggests dynamic imports (`next/dynamic`, `React.lazy`) for heavy components.
3.  **Render Optimization**: Checks for unnecessary re-renders and suggests `useMemo`, `useCallback`, or composition patterns.
4.  **Image Optimization**: Verifies usage of `next/image` and proper sizing attributes.
5.  **Server Components**: Recommends moving logic to Server Components (RSC) where appropriate to reduce client JS.

## Workflow

1.  **Analyze Imports**: Check for heavy libraries (e.g., moment.js, lodash) that could be tree-shaken or replaced.
2.  **Check Data Fetching**:
    *   Look for `await` inside loops or sequential `await` calls that could be `Promise.all`.
    *   Identify Client Components fetching data that could be Server Components.
3.  **Inspect Rendering Logic**:
    *   Look for expensive computations directly in the render body.
    *   Check for `useEffect` usage that triggers cascading updates.
4.  **Review References**: Consult `references/performance_rules.md` for specific patterns to avoid.

## Example Usage

**User**: "Why is my dashboard loading so slowly?"

**Agent**:
1.  Read `src/app/dashboard/page.tsx` and components.
2.  Identify multiple sequential `await fetch(...)` calls.
3.  Suggest using `Promise.all` or moving data fetching up to a layout/parent RSC.
4.  Suggest wrapping the Chart component with `next/dynamic`.

## References

*   `references/performance_rules.md`: detailed explanation of the rules.

Files in this skill

  • SKILL.md2.2 KB
  • references/performance_rules.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…