Index of every page on this site: llms.txt
All skills
openmontageinc avatar

/vercel-composition-patterns

@2e003e6
by openmontageincopenmontageinc/openmontage82k stars
11,135
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/openmontageinc/openmontage/vercel-composition-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈535 tokens on demand. Your agent reads this file only when SKILL.md points to it.

React Composition Patterns

A structured repository for React composition patterns that scale. These patterns help avoid boolean prop proliferation by using compound components, lifting state, and composing internals.

Structure

  • rules/ - Individual rule files (one per rule)
    • _sections.md - Section metadata (titles, impacts, descriptions)
    • _template.md - Template for creating new rules
    • area-description.md - Individual rule files
  • metadata.json - Document metadata (version, organization, abstract)
  • AGENTS.md - Compiled output (generated)

Rules

Component Architecture (CRITICAL)

  • architecture-avoid-boolean-props.md - Don't add boolean props to customize behavior
  • architecture-compound-components.md - Structure as compound components with shared context

State Management (HIGH)

  • state-lift-state.md - Lift state into provider components
  • state-context-interface.md - Define clear context interfaces (state/actions/meta)
  • state-decouple-implementation.md - Decouple state management from UI

Implementation Patterns (MEDIUM)

  • patterns-children-over-render-props.md - Prefer children over renderX props
  • patterns-explicit-variants.md - Create explicit component variants

Core Principles

  1. Composition over configuration — Instead of adding props, let consumers compose
  2. Lift your state — State in providers, not trapped in components
  3. Compose your internals — Subcomponents access context, not props
  4. Explicit variants — Create ThreadComposer, EditComposer, not Composer with isThread

Creating a New Rule

  1. Copy rules/_template.md to rules/area-description.md
  2. Choose the appropriate area prefix:
    • architecture- for Component Architecture
    • state- for State Management
    • patterns- for Implementation Patterns
  3. Fill in the frontmatter and content
  4. Ensure you have clear examples with explanations

Impact Levels

  • CRITICAL - Foundational patterns, prevents unmaintainable code
  • HIGH - Significant maintainability improvements
  • MEDIUM - Good practices for cleaner code

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts12d3 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    This skill is a collection of React composition patterns and technical documentation. It contains no executable code, external dependencies, or malicious patterns.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

Signed by skilld at 2e003e6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 5 months ago
metadata
{
  "author": "vercel",
  "version": "1.0.0"
}

README badge

README badge for openmontageinc/openmontage/vercel-composition-patterns