React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install vercel-composition-patterns或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install vercel-composition-patterns⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/vercel-composition-patterns/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: vercel-composition-patterns description: React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes. license: MIT metadata: author: vercel version: '1.0.0' ---
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.
Reference these guidelines when:
| Priority | Category | Impact | Prefix | | -------- | ----------------------- | ------ | --------------- | | 1 | Component Architecture | HIGH | architecture- | | 2 | State Management | MEDIUM | state- | | 3 | Implementation Patterns | MEDIUM | patterns- | | 4 | React 19 APIs | MEDIUM | react19- |
architecture-avoid-boolean-props - Don't add boolean props to customizebehavior; use composition
architecture-compound-components - Structure complex components with sharedcontext
state-decouple-implementation - Provider is the only place that knows howstate is managed
state-context-interface - Define generic interface with state, actions, metafor dependency injection
state-lift-state - Move state into provider components for sibling accesspatterns-explicit-variants - Create explicit variant components instead ofboolean modes
patterns-children-over-render-props - Use children for composition insteadof renderX props
> ⚠️ React 19+ only. Skip this section if using React 18 or earlier.
react19-no-forwardref - Don't use forwardRef; use use() instead of useContext()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:
For the complete guide with all rules expanded: AGENTS.md
安装 Vercel Composition Patterns 后,可以对 AI 说这些话来触发它
Help me get started with Vercel Composition Patterns
Explains what Vercel Composition Patterns does, walks through the setup, and runs a quick demo based on your current project
Use Vercel Composition Patterns to react composition patterns that scale
Invokes Vercel Composition Patterns with the right parameters and returns the result directly in the conversation
What can I do with Vercel Composition Patterns in my developer & devops workflow?
Lists the top use cases for Vercel Composition Patterns, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/vercel-composition-patterns/ 目录(个人级,所有项目可用),或 .claude/skills/vercel-composition-patterns/(项目级)。重启 AI 客户端后,用 /vercel-composition-patterns 主动调用,或让 AI 根据上下文自动发现并使用。
Vercel Composition Patterns 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Vercel Composition Patterns 可免费安装使用。请查阅仓库了解许可证信息。
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
Automate my developer & devops tasks using Vercel Composition Patterns
Identifies repetitive steps in your workflow and sets up Vercel Composition Patterns to handle them automatically
Vercel Composition Patterns 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。