CtrlK
BlogDocsLog inGet started
Tessl Logo

react-composition-patterns

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.

87

1.43x
Quality

81%

Does it follow best practices?

Impact

99%

1.43x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Evaluation results

97%

52%

Refactor: Product Card Component

Avoid boolean props, create explicit variants

Criteria
Without context
With context

No boolean mode props

100%

100%

Explicit variant components

100%

100%

Compound component export

0%

100%

Shared context created

0%

100%

State/actions/meta interface

0%

100%

Provider isolates state

0%

100%

Children not render props

50%

100%

No conditional branching on mode

100%

70%

Sub-components use context

0%

100%

100%

32%

Build a Reusable Accordion Component

Generic context interface, state/actions/meta, decouple state from UI

Criteria
Without context
With context

Context interface has state

40%

100%

Context interface has actions

40%

100%

Context interface has meta

0%

100%

Provider owns state logic

100%

100%

Two distinct providers

100%

100%

Same UI with both providers

100%

100%

Sub-components use context hook

100%

100%

No renderX props on sub-components

100%

100%

Compound object export

0%

100%

100%

5%

Build a Bulk Tag Editor Dialog

Lift state, provider boundary, children over render props

Criteria
Without context
With context

Provider wraps dialog

100%

100%

Action button uses context

100%

100%

No useEffect for state sync

100%

100%

No ref-based state sharing

100%

100%

State isolated in provider

100%

100%

Children for layout

80%

100%

Preview/display uses context

100%

100%

No boolean mode props

100%

100%

Compound sub-components

40%

100%

Repository
secondsky/claude-skills
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.