🎯

vercel-composition-patterns

🎯Skill

from thongdn-it/react-agent-skills

VibeIndex|
What it does

Provides React composition patterns to refactor components, build flexible libraries, and improve component architecture through advanced design techniques.

πŸ“¦

Part of

thongdn-it/react-agent-skills(18 items)

vercel-composition-patterns

Installation

Quick InstallInstall with npx
npx skills add https://github.com/thongdn-it/react-agent-skills --all
Quick InstallInstall with npx
npx skills add https://github.com/thongdn-it/react-agent-skills
Quick InstallInstall with npx
npx skills add https://github.com/thongdn-it/react-agent-skills --skill react nextjs tailwind
πŸ“– Extracted from docs: thongdn-it/react-agent-skills
5Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Overview

# React Composition Patterns

Composition patterns for building flexible, maintainable React components. Avoid

boolean prop proliferation by using compound components, lifting state, and

composing internals. These patterns make codebases easier for both humans and AI

agents to work with as they scale.

When to Apply

Reference these guidelines when:

  • Refactoring components with many boolean props
  • Building reusable component libraries
  • Designing flexible component APIs
  • Reviewing component architecture
  • Working with compound components or context providers

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

| -------- | ----------------------- | ------ | --------------- |

| 1 | Component Architecture | HIGH | architecture- |

| 2 | State Management | MEDIUM | state- |

| 3 | Implementation Patterns | MEDIUM | patterns- |

Quick Reference

1. Component Architecture (HIGH)

  • architecture-avoid-boolean-props - Don't add boolean props to customize

behavior; use composition

  • architecture-compound-components - Structure complex components with shared

context

2. State Management (MEDIUM)

  • state-decouple-implementation - Provider is the only place that knows how

state is managed

  • state-context-interface - Define generic interface with state, actions, meta

for dependency injection

  • state-lift-state - Move state into provider components for sibling access

3. Implementation Patterns (MEDIUM)

  • patterns-explicit-variants - Create explicit variant components instead of

boolean modes

  • patterns-children-over-render-props - Use children for composition instead

of renderX props

How to Use

Read individual rule files for detailed explanations and code examples:

```

rules/architecture-avoid-boolean-props.md

rules/state-context-interface.md

```

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

More from this repository10

🎯
web-design-guidelines🎯Skill

Provides comprehensive web design guidelines and best practices for creating user-friendly and visually appealing web interfaces.

🎯
vercel-react-best-practices🎯Skill

Provides performance optimization guidelines for React and Next.js, offering 57 rules across 8 categories to improve application speed and efficiency.

🎯
typescript🎯Skill

Optimizes TypeScript performance by providing targeted rules for type system, compiler configuration, async patterns, and module organization across 42 best practices.

🎯
nuqs🎯Skill

Manages type-safe URL query state in Next.js, providing best practices and guidelines for implementing, configuring, and optimizing nuqs-based routing and state management.

🎯
vitest🎯Skill

Runs Vitest unit tests for React components and provides testing utilities within the React Agent framework.

🎯
tanstack-query🎯Skill

Simplifies data fetching, caching, and state management in React applications using TanStack Query library.

🎯
tailwind🎯Skill

Optimizes Tailwind CSS v4 performance by providing best practices for configuration, utility classes, responsive design, and CSS generation.

🎯
nextjs🎯Skill

Enables Next.js server-side rendering and routing capabilities within a React Agent workflow, simplifying web application development.

🎯
shadcn🎯Skill

Generates shadcn/ui React components with customizable configurations for rapid UI development in React applications.

🎯
zod🎯Skill

Validates and parses data schemas using Zod, ensuring type safety and runtime data validation in React Agent applications.