मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)48k · #4224

composition-patterns

यह क्या करती है

यह टूल software components को ज़्यादा efficient और समझने में आसान तरीके से व्यवस्थित और बनाने में मदद करता है। यह ऐसे तरीके सुझाता है जिससे code सरल रहे और प्रोजेक्ट बढ़ने पर उसे संभालना आसान हो।

कब इस्तेमाल करें

  • ✓जब आपके component में उसका व्यवहार बदलने के लिए बहुत सारे 'हां/ना' विकल्प हों।
  • ✓जब आप ऐसे components का set बना रहे हों जो कई जगह इस्तेमाल होंगे।
  • ✓जब आप सोच रहे हों कि आपके software के अलग-अलग हिस्से आपस में कैसे बात करेंगे।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/composition-patterns/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/composition-patterns/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं अपने interface components को कैसे बेहतर व्यवस्थित करूं ताकि उन्हें दोबारा इस्तेमाल करना और समझना आसान हो?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह टूल देखता है कि आप अपने components कैसे बना रहे हैं, और patterns सुझाता है, जैसे संबंधित components को समूह में रखना या ज़रूरी जानकारी को एक केंद्रीय जगह पर ले जाना। इससे हर component के लिए अलग-अलग settings की ज़रूरत नहीं पड़ती।

तकनीकी सामग्री (मूल 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.

When to Use

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 composition
  • architecture-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 managed
  • state-context-interface - Define generic interface with state, actions, meta for dependency injection
  • state-lift-state - Move state into provider components for sibling access

3. Implementation Patterns (MEDIUM)

  • patterns-explicit-variants - Create explicit variant components instead of boolean modes
  • patterns-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 use forwardRef; use use() instead of useContext()

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

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
अक्सर पूछे जाने वाले सवाल

'boolean prop proliferation' क्या है?

जब किसी component में उसका काम बदलने के लिए बहुत सारे 'हां' या 'ना' वाले विकल्प (boolean props) हो जाते हैं, तो उसे इस्तेमाल करना जटिल हो जाता है।

'compound components' क्या हैं?

ये ऐसे components हैं जो टीम की तरह मिलकर काम करते हैं, जानकारी और context साझा करते हैं। जैसे एक form जिसके कई fields आपस में बात करते हैं।

components को व्यवस्थित करना क्यों ज़रूरी है?

अच्छी तरह व्यवस्थित components को समझना, इस्तेमाल करना और बदलना आसान होता है, जिससे बड़े प्रोजेक्ट्स में समय बचता है और गलतियां कम होती हैं।

जानकारी

लेखक का मूल विवरण

Use when working with composition-patterns tasks or workflows

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#4224
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills