Communitygithub.com

vercel-labs/vercel-composition-patterns

スケールするReactコンポジションパターン。ブール値プロップの乱用をリファクタリングする際、柔軟なコンポーネントライブラリを構築する際、または再利用可能なAPIを設計する際に使用します。コンパウンドコンポーネント、レンダープロップ、コンテキストプロバイダー、コンポーネントアーキテクチャに関するタスクでトリガーされます。React 19のAPI変更を含みます。

vercel-composition-patterns とは?

このスキルは、大規模なReactアプリケーションにおけるコンポーネント設計のベストプラクティスを提供します。特に、ブール値プロップの乱用による複雑化を解消し、コンパウンドコンポーネント、レンダープロップ、コンテキストプロバイダーといった拡張性の高いパターンを活用して、柔軟で再利用可能なコンポーネントAPIを設計するためのガイドラインをまとめています。Claude Code、Coder、CursorなどのAIエージェント向けに設計されており、コンポーネントのリファクタリング、ライブラリ構築、アーキテクチャ設計のタスクにおいて自動的にトリガーされます。さらに、React 19で導入された新しいAPI(use()フック、Server Componentsとの連携強化など)に関する変更点もカバーしており、最新のReact環境に即したコード生成が可能です。これにより、コードの可読性、保守性、パフォーマンスを向上させ、チーム全体で一貫した設計パターンを採用できるようになります。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/vercel-composition-patterns

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

vercel-composition-patterns は何をしますか?

スケールするReactコンポジションパターン。ブール値プロップの乱用をリファクタリングする際、柔軟なコンポーネントライブラリを構築する際、または再利用可能なAPIを設計する際に使用します。コンパウンドコンポーネント、レンダープロップ、コンテキストプロバイダー、コンポーネントアーキテクチャに関するタスクでトリガーされます。React 19のAPI変更を含みます。

Individual skills in this repo

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

deploy-to-vercel

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".

vercel-cli-with-tokens

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.

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with

vercel-labs/vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

vercel-labs/vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

vercel-labs/vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.

vercel-optimize

Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel/framework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests.

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use

web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to

writing-guidelines

Review docs/prose for Writing Guidelines compliance. Use when asked to

関連スキル