In short.
React Composition Patterns is a refactoring skill for React developers and coding assistants, but its illustrative snippets contain integration gaps and its React 19 migration advice needs verification. Eight rules explain how to replace competing boolean modes with explicit variants, compose reusable component parts and separate state management from presentation. The strongest examples show controls and previews sharing state through a provider even when they sit outside the main component frame. Nothing was executed; compilation, assistant loading, runtime behavior and claimed maintainability benefits are unassessed.
Researched and written by an AI model and checked by a second AI model. How it works
The source scope includes all 14 supplied files in skills/composition-patterns at commit c8f12ba31081ce52578dea413c74789ab5437829, plus the parent repository's MIT LICENSE. Other skills, the parent guide's remaining content and linked React documentation are outside the supplied evidence. The downloadable compiled document contains the expanded rules; complete skill use also requires its entry point and supporting folder files. Nothing was executed. Assistant loading, compilation, platform compatibility, accessibility, performance and application behavior remain unassessed.
The overview
Identity
The resource is the skills/composition-patterns folder in zebbern/claude-code-guide, with the skill identifier vercel-composition-patterns. Its source location is [https://github.com/zebbern/claude-code-guide/tree/main/skills/composition-patterns]. It contains assistant-oriented instructions and React code examples.
SKILL.md identifies the author as vercel, metadata.json names the organization Engineering, and the repository license names zebbern. These declarations do not establish official Vercel ownership, endorsement or upstream provenance.
Assessment
The clearest fit is a component that has accumulated several competing modes, such as a message composer supporting channel, thread, edit and forward layouts. The guide gives concrete ways to make those layouts explicit while keeping input controls and state interfaces reusable.
Its value is the specificity of the examples and architectural boundaries. Improvements in maintenance effort, defect rates or performance are not measured in the supplied material, and the examples need implementation work before adoption.
Users
The instructions target coding assistants maintaining, generating or refactoring React applications. Human readers who build component libraries, review component APIs or maintain complex forms can also use them as an architecture reference.
Beginners get paired examples showing the problem and the proposed replacement, but the material assumes familiarity with React props, children, hooks and context. Experienced developers get a concrete state/actions/meta contract and examples of interchangeable providers. A runnable beginner project is not supplied.
Capabilities
The eight rules cover avoiding boolean mode proliferation, building compound components, separating state implementation from UI, defining context contracts, lifting state into providers, creating explicit variants, choosing children versus render props, and using selected React 19 APIs.
The folder provides individual rule documents and an expanded AGENTS.md reference. README.md explains how to add rules using the supplied template, while _sections.md defines their grouping and order. The supplied files do not provide an automated refactoring engine or a command for generating the compiled document.
Using it
Requirements
Applying the examples requires a React application and enough JSX or TSX knowledge to supply component definitions, imports, application hooks and state types. Zustand and server synchronization are mentioned as possible state implementations; neither is specified as a required dependency.
The React API rule explicitly targets React 19 and later. Several general composition examples also use use(ComposerContext) and direct context-provider syntax, so compatibility needs attention throughout the examples. Supported assistant hosts, model requirements, Node versions and dependency versions are not specified.
Mechanism
Compound components split a larger interface into parts such as Composer.Frame, Composer.Input and Composer.Submit. Consumers assemble the required parts as children. Shared context lets those parts access common data without passing it through every intermediate component.
A provider supplies three groups: state holds current values, actions exposes operations such as update and submit, and meta carries supporting references such as inputRef. Different providers can implement this contract using local or synchronized state. Controls and previews share access by sitting beneath the same provider, even when they are outside Composer.Frame.
Setup
SKILL.md provides the entry point and points to individual files under rules/. AGENTS.md provides the expanded reading option. A local copy intended for skill use should retain the complete folder and applicable license notice so that relative rule references remain available.
No assistant-specific installation command, activation procedure or supported discovery path is documented. The resource can be read directly, but automatic loading by a particular assistant is unknown.
Example
The message-forwarding example places ForwardMessageComposer, MessagePreview and dialog actions beneath ForwardMessageProvider. The preview reads the input and attachments from context, while a ForwardButton outside the composer frame calls the shared submit action.
The same approach gives ThreadComposer its extra channel field and EditMessageComposer its cancel and save controls through explicit layouts. These examples still require application-defined controls, hooks, state initialization and submission behavior. They have not been run.
Assessment & evidence
Limitations
The snippets have integration gaps. Context consumers assume a provider although the context default is null. The lifted-state example calls use(Composer.Context), while the shown Composer export does not expose Context. Some provider examples omit meta although input examples access meta.inputRef. These differences require reconciliation.
Examples combine HTML form and footer elements with TextInput, onChangeText and onPress interfaces. They need platform-specific controls and event handling before they can form a complete application.
The React 19 rule labels useContext() and forwardRef usage as incorrect. The supplied evidence does not independently establish that these APIs are invalid or removed. Priority labels also differ between README.md, section metadata and individual rules; their impact ratings are qualitative.
Reasoning
Independent boolean mode switches allow many combinations, including combinations an application may not intend to support. Explicit variant components make supported layouts visible. The practical target is competing component modes: the guide itself still uses an isSubmitting boolean in its state interface.
A shared provider gives sibling controls a common state boundary and avoids copying state upward through synchronization effects. A likely tradeoff is additional provider and variant code, plus the need to maintain a consistent context contract. The examples do not establish fewer renders or faster execution.
Alternatives
The guide retains render props as an option when a parent supplies data to a child, illustrated by a list passing item and index to renderItem. Its preference for children applies to composing static structure.
For background reading, the resource references React's context tutorial [https://react.dev/learn/passing-data-deeply-with-context] and use API reference [https://react.dev/reference/react/use]. Those pages' contents were not supplied, so their current guidance is unassessed. No competing skill package or component library is compared.
Evidence
The supplied source consists of 14 files within the skill folder: SKILL.md, AGENTS.md, README.md, metadata.json, eight rule documents and two rule-support files. The parent repository's LICENSE is also supplied. AGENTS.md repeats the expanded rules and does not provide independent validation.
The expanded document is available at [https://raw.githubusercontent.com/zebbern/claude-code-guide/c8f12ba31081ce52578dea413c74789ab5437829/skills/composition-patterns/AGENTS.md]. No package manifest, executable test suite, benchmark results or runtime logs occur in the captured scope. Their presence elsewhere in the repository is unknown.
Access & freshness
Costs
No price, assistant subscription requirement, token budget or estimate of implementation effort is supplied. Total use cost is unknown. Any assistant fees and engineering effort depend on the chosen environment and the extent of the refactor; the MIT license does not establish a zero total cost.
Rights
SKILL.md declares MIT licensing. The repository-level MIT notice permits use, copying, modification, publication, distribution, sublicensing and sale of the software and associated documentation, provided its copyright and permission notice accompanies copies or substantial portions.
The notice names Copyright (c) 2025 zebbern and provides the material without warranties. The captured notice is available at [https://raw.githubusercontent.com/zebbern/claude-code-guide/c8f12ba31081ce52578dea413c74789ab5437829/LICENSE].
Freshness
SKILL.md and metadata.json declare version 1.0.0; metadata.json and AGENTS.md date the material January 2026. The supplied snapshot was captured on 2026-11-16 at 12:26:27.082 UTC from commit c8f12ba31081ce52578dea413c74789ab5437829.
The capture date establishes the snapshot's acquisition time, not its last maintenance date. Later changes, current release status and compatibility with subsequent React releases are unknown.
Actions
Start with one component whose competing modes or sibling controls create a clear state-sharing problem. Define the supported variants and shared context contract before moving state into a provider. Retain the full skill folder and license notice if using its relative rule references.
Before adopting the examples, check the project's React version against the cited official documentation, reconcile the Context export and meta fields, handle missing providers, and use controls appropriate to the application platform. Compilation and behavior checks should cover submission, shared previews and input references. These checks have not been performed.
