review-react-component-design

Reviews React component designs for boundaries, APIs, opt-outs, and bundle cost.

931|91|Updated Aug 13, 2025
One-click install
npx skills add https://github.com/videojs/v10 --skill review-react-component-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-react-component-design
Source: https://github.com/videojs/v10/tree/main/.agents/skills/review-react-component-design
Command: npx skills add https://github.com/videojs/v10 --skill review-react-component-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React component proposals often ship with weak primitive boundaries, bloated APIs, missing opt-outs, or hidden bundle costs. This Skill provides a structured design review that catches these issues before implementation, using evidence from the actual codebase.

Core Features & Use Cases

  • Boundary and Ownership Analysis: Traces data flow across core logic, DOM behavior, and React layers, checking effects, cleanup, and whether a proposal is a reusable primitive or app-level composition.
  • API and Opt-Out Review: Evaluates compound anatomy, React and CSS APIs, omission/render/styling/behavior opt-outs, tree-shakeable ESM exports, SSR constraints, and accessibility.
  • Use Case: Before merging a new chapter-menu component, run this review to get prioritized findings on whether descendant selectors signal a weak primitive boundary, whether each API addition has a consumer, and whether the bundle cost is justified.

Quick Start

Review this React component design proposal for boundary, API, opt-out, accessibility, and bundle issues.

Frequently Asked Questions about review-react-component-design

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

FAQPage Schema
How do I review a React component design before implementation?

Review a React component design by tracing ownership and data flow across core, DOM behavior, and React layers, then checking compound anatomy, API surface, and opt-outs. Verify each API addition has a consumer and weigh complexity against bundle cost.

What makes a good React primitive component boundary?

A good primitive boundary separates reusable primitives from app or skin composition and leaves visual structure to CSS. Descendant selectors, :has(), and complex selectors introduced by composition usually signal a weak boundary or missing data-* and CSS custom-property hooks.

How should compound React components be exported for tree shaking?

Compound component APIs should use tree-shakeable ESM namespace re-exports rather than runtime namespace objects. This lets bundlers like webpack eliminate unused parts, keeping bundle cost proportional to actual usage.

What opt-outs should a React component API support?

A React component API should support omission, render replacement, styling, behavior, and import opt-outs. Exercising each opt-out path during design review confirms the component stays composable without forcing consumers into unwanted defaults.

When should a React component be split into separate components or hooks?

Split a component when its API surface spans independent features that different consumers would use separately. Moving those features into another component or hook keeps each primitive focused and reduces unnecessary API complexity.