Communitygithub.com

vercel-labs/vercel-composition-patterns

可擴展的 React 組合模式。適用於重構帶有布林屬性泛濫的元件、建構靈活的元件庫或設計可重複使用的 API。觸發於涉及複合元件、渲染屬性、Context Provider 或元件架構的任務。包含 React 19 API 變更。

vercel-composition-patterns 是什麼?

這個技能專注於 vercel-labs/vercel-composition-patterns,這是一套可擴展的 React 組合模式指南。對於需要重構那些充斥著布林屬性的元件、建構靈活且可維護的元件庫,或是設計可重複使用的元件 API 的開發者來說,這個技能極為有用。它能夠自動觸發於涉及複合元件 (Compound Components)、渲染屬性 (Render Props)、Context Provider 以及更廣泛的元件架構設計等任務。此技能不僅涵蓋經典的組合模式,還特別包含了 React 19 的最新 API 變更,確保開發者能夠在其專案中應用最先進、最標準的實作方法。透過遵循這些模式,開發者可以顯著提升元件的可讀性、擴展性和可重用性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/vercel-composition-patterns

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

vercel-composition-patterns 是做什麼的?

可擴展的 React 組合模式。適用於重構帶有布林屬性泛濫的元件、建構靈活的元件庫或設計可重複使用的 API。觸發於涉及複合元件、渲染屬性、Context Provider 或元件架構的任務。包含 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

相關技能