vercel-composition-patterns

द्वारा sentry

React संरचना पैटर्न जो स्केल करते हैं। घटकों को रीफैक्टर करते समय उपयोग करें

npx skills add https://github.com/getsentry/webvitals.com --skill vercel-composition-patterns

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 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

PriorityCategoryImpactPrefix
1Component ArchitectureHIGHarchitecture-
2State ManagementMEDIUMstate-
3Implementation PatternsMEDIUMpatterns-
4React 19 APIsMEDIUMreact19-

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

sentry की और Skills

add-ai-integration
sentry
Sentry JavaScript SDK में एक नया AI प्रदाता एकीकरण जोड़ें। नए AI इंस्ट्रुमेंटेशन (OpenAI, Anthropic, Vercel AI, LangChain, आदि) का योगदान करते समय उपयोग करें…
add-cdn-bundle
sentry
निर्दिष्ट सुविधाओं के साथ ब्राउज़र पैकेज के लिए एक नया CDN बंडल बनाएं
agent-prompt
sentry
प्रभावी एजेंट प्रॉम्प्ट और कौशल लिखने के लिए संदर्भ मार्गदर्शिका। नए कौशल बनाते समय, प्रॉम्प्ट गुणवत्ता की समीक्षा करते समय, या वार्डन के प्रॉम्प्ट को समझते समय उपयोग करें।
agents-md
sentry
यह कौशल तब उपयोग किया जाना चाहिए जब उपयोगकर्ता "AGENTS.md बनाएं", "AGENTS.md अपडेट करें", "एजेंट दस्तावेज़ बनाए रखें", "CLAUDE.md सेट अप करें" के लिए कहे, या एजेंट को अद्यतित रखने की आवश्यकता हो...
agents-md
sentry
एजेंट दस्तावेज़ीकरण को 60 पंक्तियों से कम में न्यूनतम और उच्च-सिग्नल बनाएं और बनाए रखें। एजेंट-उन्मुख दस्तावेज़ों के लिए शोध-समर्थित सर्वोत्तम प्रथाओं को लागू करता है; लंबाई बढ़ने पर निर्देश की गुणवत्ता घटती है। तीन मुख्य अनुभागों की आवश्यकता है: पैकेज मैनेजर, फ़ाइल-स्कोप्ड कमांड (प्रति फ़ाइल परीक्षण/लिंट/टाइपचेक), और एजेंट पहचान के साथ कमिट एट्रिब्यूशन। यह न
agents-md
sentry
यह कौशल तब उपयोग किया जाना चाहिए जब उपयोगकर्ता "AGENTS.md बनाएं", "AGENTS.md अपडेट करें", "एजेंट दस्तावेज़ बनाए रखें", "CLAUDE.md सेट अप करें" या एजेंट को बनाए रखने की आवश्यकता हो...
ai-sdk
sentry
ai-sdk — AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल, getsentry/webvitals.com द्वारा प्रकाशित।
analytics
sentry
Sentry के फ्रंटएंड UI में analytics इवेंट्स को इंस्ट्रूमेंट और डिस्कवर करें। बटन, पेज, मोडल या कस्टम इंटरैक्शन में ट्रैकिंग जोड़ते समय, नए… परिभाषित करते समय उपयोग करें।