Communitygithub.com

PhuongDeveloper/landingpage

확장 가능한 React 컴포지션 패턴. 부울 프롭이 남발된 컴포넌트를 리팩터링하거나, 유연한 컴포넌트 라이브러리를 구축하거나, 재사용 가능한 API를 설계할 때 사용합니다. 복합 컴포넌트, 렌더 프롭, 컨텍스트 프로바이더 또는 컴포넌트 아키텍처와 관련된 작업에서 트리거됩니다. React 19 API 변경 사항을 포함합니다.

landingpage란 무엇인가요?

이 스킬은 유연하고 유지보수 가능한 React 컴포넌트를 구축하기 위한 컴포지션 패턴을 제공합니다. 부울 프롭의 무분별한 사용을 방지하고 복합 컴포넌트(compound components), 상태 끌어올리기(state lifting), 내부 컴포넌트 조합(composing internals) 등의 기법을 통해 코드베이스가 확장됨에 따라 인간 개발자와 AI 에이전트 모두가 쉽게 작업할 수 있도록 합니다. 이 스킬은 컴포넌트 아키텍처, 상태 관리, 구현 패턴, React 19 API의 네 가지 우선순위 범주로 나뉘어 있으며, 각 범주는 구체적인 규칙 파일로 제공됩니다. Claude Code, Cursor, Codex 등 다양한 AI 에이전트 플랫폼에서 사용할 수 있으며, 사용자는 특정 작업(예: 부울 프롭 리팩터링, 컴포넌트 라이브러리 설계)에 따라 관련 규칙을 참조하여 올바른 구현 예제와 설명을 확인할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/PhuongDeveloper/landingpage/tree/HEAD/.agents/skills/vercel-composition-patterns

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

React 컴포지션 패턴

유연하고 유지보수 가능한 React 컴포넌트를 구축하기 위한 컴포지션 패턴입니다. 복합 컴포넌트(compound components), 상태 끌어올리기(state lifting), 내부 컴포넌트 조합(composing internals)을 사용하여 부울 프롭(boolean prop)의 무분별한 사용을 피하십시오. 이 패턴들은 코드베이스가 커짐에 따라 인간 개발자와 AI 에이전트 모두가 더 쉽게 작업할 수 있도록 합니다.

적용 시기

다음 상황에서 이 지침을 참조하십시오:

  • 많은 부울 프롭을 가진 컴포넌트 리팩터링
  • 재사용 가능한 컴포넌트 라이브러리 구축
  • 유연한 컴포넌트 API 설계
  • 컴포넌트 아키텍처 검토
  • 복합 컴포넌트 또는 컨텍스트 프로바이더 작업

우선순위별 규칙 범주

우선순위범주영향접두사
1컴포넌트 아키텍처높음architecture-
2상태 관리중간state-
3구현 패턴중간patterns-
4React 19 API중간react19-

빠른 참조

1. 컴포넌트 아키텍처 (높음)

  • architecture-avoid-boolean-props - 동작을 사용자 정의하기 위해 부울 프롭을 추가하지 마십시오. 컴포지션을 사용하십시오.
  • architecture-compound-components - 공유 컨텍스트를 사용하여 복잡한 컴포넌트를 구조화하십시오.

2. 상태 관리 (중간)

  • state-decouple-implementation - 프로바이더(Provider)만이 상태가 어떻게 관리되는지 알고 있습니다.
  • state-context-interface - 의존성 주입을 위해 상태, 액션, 메타(meta)를 포함하는 일반 인터페이스를 정의하십시오.
  • state-lift-state - 형제 컴포넌트 간 접근을 위해 상태를 프로바이더 컴포넌트로 이동하십시오.

3. 구현 패턴 (중간)

  • patterns-explicit-variants - 부울 모드 대신 명시적인 변형(variant) 컴포넌트를 만드십시오.
  • patterns-children-over-render-props - 컴포지션을 위해 renderX 프롭 대신 children을 사용하십시오.

4. React 19 API (중간)

⚠️ React 19+ 전용입니다. React 18 또는 이전 버전을 사용하는 경우 이 섹션을 건너뛰십시오.

  • react19-no-forwardref - forwardRef를 사용하지 마십시오. useContext() 대신 use()를 사용하십시오.

사용 방법

자세한 설명과 코드 예제는 개별 규칙 파일을 읽으십시오:

rules/architecture-avoid-boolean-props.md
rules/state-context-interface.md

각 규칙 파일에는 다음이 포함되어 있습니다:

  • 중요한 이유에 대한 간략한 설명
  • 잘못된 코드 예제 및 설명
  • 올바른 코드 예제 및 설명
  • 추가 컨텍스트 및 참고 자료

전체 컴파일 문서

모든 규칙이 확장된 전체 가이드는 AGENTS.md를 참조하십시오.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

PhuongDeveloper/landingpage

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

PhuongDeveloper/landingpage

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

PhuongDeveloper/landingpage

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); debugging and troubleshooting errors or unexpected behavior on Supabase projects (HTTP errors, Postgres errors, RLS surprises, permission denied, schema cache issues, timeouts, Edge Function crashes, Realtime drops, Storage failures) and reading or querying logs (Logs Explorer, ClickHouse).

PhuongDeveloper/landingpage

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

관련 스킬