vercel-composition-patterns
यह क्या करती है
यह स्किल React कंपोनेंट डिज़ाइन के पैटर्न साझा करती है, जो बढ़ते कोड को आसानी से बदलने लायक रखते हैं। यह उन डेवलपर के लिए है जो चाहते हैं कि इंटरफ़ेस के हिस्से दोबारा इस्तेमाल हो सकें और साफ़ रहें।
कब इस्तेमाल करें
- ✓जब किसी React कंपोनेंट में बहुत सारी चालू-बंद सेटिंग्स हों और उसे पढ़ना मुश्किल हो।
- ✓जब आप कई पेजों के लिए साझा कंपोनेंट लाइब्रेरी बना रहे हों।
- ✓जब आप किसी ऐप में कंपोनेंट स्टेट और context कैसे व्यवस्थित है, यह जाँच रहे हों।
Skill का लिंक
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/vercel-composition-patterns/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस React बटन को रीफ़ैक्टर करें, ताकि यह सही या गलत वाली लंबी सेटिंग्स की सूची इस्तेमाल करना बंद कर दे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह किसी कंपोनेंट को एक-दूसरे के साथ काम करने वाले हिस्सों में बाँटने, साझा स्टेट को ऊपर ले जाने और जहाँ उपयुक्त हो React 19 की सुविधाएँ इस्तेमाल करने के नियम देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
React Composition Patterns
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.
Extended reference:
AGENTS.mdin this directory is the long-form upstream guide (vendored from Vercel). It is supplementary reference material scoped to this skill only —SKILL.mdis the loadable entry point and the authority. It does not override or extend the repository-rootAGENTS.md/AGENT_GUIDE.md.
When to Apply
Reference these guidelines when:
- Refactoring components with many boolean props
- Building reusable component libraries
- Designing flexible component APIs
- Reviewing component architecture
- Working with compound components or context providers
Rule Categories by Priority
| 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- |
Quick Reference
1. Component Architecture (HIGH)
architecture-avoid-boolean-props- Don't add boolean props to customize behavior; use compositionarchitecture-compound-components- Structure complex components with shared context
2. State Management (MEDIUM)
state-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 access
3. Implementation Patterns (MEDIUM)
patterns-explicit-variants- Create explicit variant components instead of boolean modespatterns-children-over-render-props- Use children for composition instead of renderX props
4. React 19 APIs (MEDIUM)
⚠️ React 19+ only. Skip this section if using React 18 or earlier.
react19-no-forwardref- Don't useforwardRef; useuse()instead ofuseContext()
How to Use
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:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
अक्सर पूछे जाने वाले सवाल
क्या यह सिर्फ़ React के लिए है?
हाँ। ये पैटर्न React कंपोनेंट के लिए हैं, जिसमें स्किल में बताए गए React 19 API बदलाव भी शामिल हैं।
कंपाउंड कंपोनेंट क्या है?
यह एक-दूसरे के साथ काम करने वाले हिस्सों का सेट है, जैसे अपने आइटम और ट्रिगर वाला मेन्यू, न कि कई सेटिंग्स वाला एक ही कंपोनेंट।
पूरी गाइड कहाँ है?
स्किल ज़्यादा जानकारी के लिए उसी फ़ोल्डर की एक विस्तृत संदर्भ फ़ाइल की ओर इशारा करती है।
जानकारी
लेखक का मूल विवरण
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.
repo: calesthio/OpenMontage
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2695
- लाइसेंस
- AGPL-3.0
- अपडेट की गई
- 28/10/2026
कमेंट
- …
इस repository की और skills
3d-asset-generation
75kकैटलॉग, टेक्स्ट या इमेज से 3D टूल और अंतिम जोड़ के लिए Blender का उपयोग करके दृश्य के लिए 3D वस्तुएँ बनाने का तरीका चुनने में मदद करती है।
acestep
75kखुले ACE-Step संगीत जनरेटर से वीडियो के लिए बैकग्राउंड संगीत, गाने, जिंगल और stems बनाने में मदद करती है।
agents
75kElevenLabs से वॉइस AI सहायक बनाने में मदद करती है, जैसे ग्राहक सेवा बॉट और इंटरएक्टिव आवाज़ वाले पात्र।
ai-video-gen
75kटेक्स्ट विवरण या संदर्भ इमेज से AI वीडियो क्लिप बनाने में मदद करती है, कई वीडियो जनरेशन सेवाओं में से चुनकर।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।