vercel-composition-patterns

작성자: supabase

확장 가능한 React 컴포지션 패턴입니다. 컴포넌트 리팩토링 시 사용하세요.

npx skills add https://github.com/supabase/supabase --skill vercel-composition-patterns

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

PriorityCategoryImpactPrefix
1Component ArchitectureHIGHarchitecture-
2State ManagementMEDIUMstate-
3Implementation PatternsMEDIUMpatterns-
4React 19 APIsMEDIUMreact19-

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

4. React 19 APIs (MEDIUM)

⚠️ React 19+ only. Skip these patterns if you're on React 18 or earlier.

  • react19-no-forwardref - Don't use forwardRef; use use() instead of useContext()

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

supabase의 다른 스킬

studio-e2e-tests
supabase
Supabase Studio용 Playwright E2E 테스트를 작성하고 실행합니다. 요청 시 사용하세요.
official
vitest
supabase
Vite 기반의 Jest 호환 API를 갖춘 빠른 단위 테스트 프레임워크입니다. 테스트 작성, 모킹, 커버리지 구성 또는 테스트 작업 시 사용하세요.
official
skill-creator
supabase
모듈형 스킬을 생성하기 위한 종합 가이드로, 전문 지식과 워크플로우를 통해 Claude의 기능을 확장합니다. 스킬은 YAML 프론트매터와 마크다운 지침이 포함된 필수 SKILL.md 파일과, 목적별로 구성되고 컨텍스트를 절약하기 위해 점진적으로 로드되는 선택적 번들 리소스(스크립트, 참조 자료, 에셋)로 구성됩니다. 구체적인 사용 예시를 중심으로 스킬을 설계하고, 결정적 작업을 위한 재사용 가능한 스크립트, 도메인 지식을 위한 참조 파일, 에셋을 식별합니다...
official
supabase
supabase
Supabase와 관련된 모든 작업을 수행할 때 사용합니다. 트리거: Supabase 제품(데이터베이스, 인증, 엣지 함수, 실시간, 스토리지, 벡터, 크론, 큐); 클라이언트…
official
supabase-server
supabase
Supabase를 사용한 서버 측 코드 작성 시 — Edge Functions, Hono 앱, 웹훅 핸들러, 또는 Supabase 인증 및 클라이언트 생성이 필요한 모든 백엔드에서 사용합니다.
official
clickhouse-logs-queries
supabase
Write, review, and migrate Supabase logs queries against the ClickHouse-backed `logs` table (the `logs.all.otel` analytics endpoint). Use this whenever a task…
official
dev-toolbar-review
supabase
PR을 검토할 때 사용하세요. packages/dev-tools/, packages/common/posthog-client.ts 파일을 다루는 경우에 해당합니다.
official
e2e-studio-tests
supabase
Studio 앱에서 e2e 테스트를 실행합니다. e2e 테스트 실행, 스튜디오 테스트 실행, Playwright 테스트 실행, 또는 기능 테스트를 요청받았을 때 사용하세요.
official