ck:react-best-practices

Audit React and Next.js pages for waterfalls and bundle bloat.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/quanganh208/cookmate --skill ck-react-best-practices-quanganh208
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:react-best-practices
Source: https://github.com/quanganh208/cookmate/tree/main/.opencode/skills/react-best-practices
Command: npx skills add https://github.com/quanganh208/cookmate --skill ck-react-best-practices-quanganh208

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps eliminate common React and Next.js performance regressions by providing concrete patterns to remove waterfalls, reduce bundle size, and optimize server and client data fetching so applications load and run faster.

Core Features & Use Cases

  • Comprehensive rules: 40+ prioritized rules covering waterfalls, bundle optimization, server-side parallelism, client deduplication, rendering and JavaScript micro-optimizations.
  • Practical examples: For each rule the repository provides wrong vs. correct code samples, impact descriptions, and references to real-world techniques (Promise.all, better-all, React.cache, dynamic imports, SWR).
  • Agent-ready: Authored for automated agents and LLMs to apply when writing, reviewing, or refactoring React/Next.js code in both client and server contexts.

Quick Start

Audit the target React/Next.js page for waterfall fetches and bundle bloat, then output prioritized, code-level refactors to parallelize requests and reduce initial bundle size.

Frequently Asked Questions about ck:react-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I eliminate data fetching waterfalls in React and Next.js?

To eliminate data fetching waterfalls in React and Next.js, enforce parallel fetching patterns using Promise.all and React.cache. This removes sequential request chains and improves Time to Interactive by loading data concurrently across server and client components.

What is the best way to reduce bundle size in a Next.js application?

The best way to reduce Next.js bundle size is to apply conditional and dynamic imports. This optimization strategy delays loading non-critical JavaScript, directly improving Largest Contentful Paint and initial page load performance.

How do I optimize React Server Components to prevent serialization bottlenecks?

Optimize React Server Components by enforcing minimal RSC serialization. Ensure safe caching and parallel server-side fetching to prevent passing large data payloads across the server-client boundary, which reduces rendering overhead.

Can I use this to review existing React code for performance regressions?

Yes, you can use this to review existing React code for performance regressions. It applies 40+ prioritized rules to refactor components and pages, identifying sequential fetches and bundle bloat using wrong versus correct code samples.

Does Next.js automatic caching handle client-side data deduplication?

Next.js automatic caching does not fully replace explicit client deduplication. You must apply techniques like SWR alongside safe caching rules to prevent duplicate requests and optimize client-side data fetching effectively.