Composition patterns

From FrancoStino/opencode-skills-collection · View interactive version

Composition patterns is an AI agent skill from the GitHub repository FrancoStino/opencode-skills-collection. Use when working with composition-patterns tasks or workflows

How to use this skill

Skill file

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:

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)

behavior; use composition

context

2. State Management (MEDIUM)

state is managed

for dependency injection

3. Implementation Patterns (MEDIUM)

boolean modes

of renderX props

4. React 19 APIs (MEDIUM)

⚠️ React 19+ only. Skip this section if using React 18 or earlier.

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:

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.