vercel-composition-patterns by supabase/supabase
npx skills add https://github.com/supabase/supabase --skill vercel-composition-patterns用于构建灵活、可维护的 React 组件的组合模式。通过使用复合组件、状态提升和内部组合来避免布尔属性泛滥。这些模式使得代码库在扩展时,无论是人类开发者还是 AI 代理都能更轻松地协作。
在以下情况下参考这些指南:
| 优先级 | 类别 | 影响 | 前缀 |
|---|---|---|---|
| 1 | 组件架构 | 高 | architecture- |
| 2 | 状态管理 | 中 | state- |
| 3 | 实现模式 | 中 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
patterns-| 4 | React 19 API | 中 | react19- |
architecture-avoid-boolean-props - 不要添加布尔属性来自定义行为;使用组合architecture-compound-components - 使用共享上下文构建复杂组件state-decouple-implementation - 提供者是唯一知道状态如何管理的地方state-context-interface - 定义包含状态、操作、元数据的通用接口以进行依赖注入state-lift-state - 将状态提升到提供者组件中以便兄弟组件访问patterns-explicit-variants - 创建显式的变体组件,而不是布尔模式patterns-children-over-render-props - 使用子组件进行组合,而不是 renderX 属性⚠️ 仅限 React 19+。 如果使用 React 18 或更早版本,请跳过此部分。
react19-no-forwardref - 不要使用 forwardRef;使用 use() 代替 useContext()阅读各个规则文件以获取详细解释和代码示例:
rules/architecture-avoid-boolean-props.md
rules/state-context-interface.md
每个规则文件包含:
获取包含所有扩展规则的完整指南:AGENTS.md
每周安装量
145
代码仓库
GitHub 星标数
99.5K
首次出现
2026年2月21日
安全审计
已安装于
github-copilot142
codex141
gemini-cli141
kimi-cli141
cursor141
opencode141
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 customize behavior; use compositionarchitecture-compound-components - Structure complex components with shared contextstate-decouple-implementation - Provider is the only place that knows how state is managedstate-context-interface - Define generic interface with state, actions, meta for dependency injectionstate-lift-state - Move state into provider components for sibling accesspatterns-explicit-variants - Create explicit variant components instead of boolean modespatterns-children-over-render-props - Use children for composition instead of 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
Weekly Installs
145
Repository
GitHub Stars
99.5K
First Seen
Feb 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot142
codex141
gemini-cli141
kimi-cli141
cursor141
opencode141
TanStack Query v5 完全指南:React 数据管理、乐观更新、离线支持
2,500 周安装
承运商关系管理指南:资深运输经理的RFP、费率协商与绩效记分卡实战技巧
1,000 周安装
Claude API 使用指南:Python/TypeScript SDK 安装、模型选择与工具调用教程
1,000 周安装
Railway 文档助手 - 获取最新 Railway 平台部署、项目、定价等技术文档
1,000 周安装
Railway部署管理指南:列出、查看日志、重新部署与移除部署操作详解
1,000 周安装
UI/UX Pro Max - 智能设计助手:配色、字体、图表与最佳实践数据库
1,100 周安装
艺术家工作区搭建指南 - 快速创建智能体工作环境与目录结构
1,100 周安装