Skip to content
cccskills
FreePublished on GitHub

react-best-practices

React/Next.js performance optimization with 40+ rules in 8 categories

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

When to Use

  • Writing React/Next.js components
  • Data fetching implementation
  • Performance review
  • Bundle size optimization

Categories by Priority

Critical Priority

Waterfall Elimination

- Avoid sequential data fetching
- Use parallel data fetching
- Implement proper loading states
- Prefetch critical data

Bundle Optimization

- Minimize client-side JavaScript
- Use dynamic imports
- Tree-shake unused code
- Analyze bundle with tools

High Priority

Server-Side Performance

- Use Server Components by default
- Minimize 'use client' directives
- Implement streaming where possible
- Cache server responses

Medium-High Priority

Client-Side Fetching

- Use SWR or React Query
- Implement optimistic updates
- Handle loading/error states
- Cache API responses

Medium Priority

Rendering

- Avoid unnecessary re-renders
- Use React.memo strategically
- Implement useMemo/useCallback properly
- Virtualize long lists

Caching

- Implement proper cache headers
- Use ISR for dynamic content
- Cache database queries
- CDN caching strategies

Code Splitting

- Split by route
- Lazy load below-fold content
- Dynamic import heavy libraries
- Preload critical chunks

Low-Medium Priority

Image Optimization

- Use next/image
- Implement proper sizing
- Use modern formats (WebP, AVIF)
- Lazy load off-screen images

Execution Flow

1. Identify optimization area
2. Check relevant category rules
3. Apply recommendations
4. Verify improvements

Scripts

See scripts/ directory for automation helpers.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Apache Airflow best practices for DAG authoring, testing, and production deployment

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

See all skills by baekenough

Report a problem with this skill