In short.
React Composition Patterns is a documentation-only agent skill from Vercel. It is for developers, and the AI coding agents they use, who want React components built by composition instead of piles of boolean props. The main catch is that the files document no compilation of the examples, no runtime testing and no measurement of how well the guidance works, and whether any evaluation happened elsewhere is unknown. The examples also assume React 19 APIs and mostly chat-composer scenarios. The captured package is 14 files (about 50 KB): Markdown plus one JSON file, version 1.0.0, dated January 2026. It teaches eight rules in four groups: avoid boolean prop proliferation, use compound components, lift state into providers with a state/actions/meta context contract, decouple the state implementation from the UI, prefer explicit variants, prefer children over render props, and use the React 19 ref-as-prop and use() APIs. Nothing was executed, so how much it changes the quality of agent-written code is unknown.
Researched and written by an AI model and checked by a second AI model. How it works
This report covers the complete selected scope: the skills/composition-patterns folder of vercel-labs/agent-skills at commit 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62, original source [https://github.com/vercel-labs/agent-skills/tree/main/skills/composition-patterns]. That is 14 files: SKILL.md, AGENTS.md, README.md, metadata.json, rules/_sections.md, rules/_template.md and eight rule files. The only licence information in that scope is the MIT declaration in the SKILL.md front matter. No separate licence file or copyright notice was among the files, so the exact licence terms and required notices are unknown. Linked pages (such as the react.dev documentation), other skills in the repository and any upstream history are excluded. Nothing was installed, compiled or executed, so the skill's behaviour inside any agent, and whether its code examples compile, is untested.
The overview
What this resource is
The resource is the folder skills/composition-patterns in the vercel-labs/agent-skills repository, at [https://github.com/vercel-labs/agent-skills/tree/main/skills/composition-patterns]. It was captured at commit 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62. The SKILL.md front matter names it vercel-composition-patterns and titles it React Composition Patterns. It lists the author as vercel, the version as 1.0.0 and the licence as MIT. The metadata file gives the organisation as Engineering and the date as January 2026.
The package holds 14 files: SKILL.md (2,886 bytes), AGENTS.md (22,627 bytes, described as the compiled output), README.md, metadata.json, a rules/ folder with eight rule files, and two helper files (rules/_sections.md and rules/_template.md). All are Markdown except metadata.json. There are no scripts or binaries, and code appears only as examples inside the Markdown. The skill is text that an agent reads.
Overall assessment
On the evidence, this is a focused and readable guidance pack. SKILL.md, the compiled AGENTS.md and the individual rule files state the same core ideas: replace boolean-flag components with explicit variants built from shared parts, keep state in a provider, and let subcomponents read shared state from context. Every rule shows a bad version and a good version in code, so a person or an agent reading it can see exactly what change is intended.
The evidence cannot show whether the skill actually improves agent output. The captured files contain no test results, benchmarks, example agent transcripts or user reports, and nothing was run for this report. There are also small inconsistencies, covered under limitations, that you should know about before relying on it.
Who it is for
SKILL.md says to apply it when refactoring components with many boolean props, building reusable component libraries, designing flexible component APIs, reviewing component architecture, or working with compound components or context providers. That points to React developers, authors of libraries and design systems, and teams that let AI coding agents write or refactor React code. AGENTS.md says the document is mainly for agents and LLMs, though humans may also find it useful.
It is not a React tutorial. It assumes you already know components, props, hooks and context, and it does not explain the TypeScript examples line by line. Projects on React 18 or earlier need care even with the first three groups of rules. Those examples use use(), which the document ties to React 19, and they also render the context object directly as a provider (see limitations). The guidance is specific to React. Its documented use cases are components with many boolean props, reusable component APIs and libraries, and state shared through context. How useful it is for simpler components has not been evaluated.
What it covers
The guidance is organised into four groups with stated priorities. Component Architecture (high) has two rules: avoid boolean prop proliferation, which its rule file marks as critical, and use compound components with a shared context. State Management (medium in the section list) has three rules. The first decouples state management from the UI, so only the provider knows whether state comes from useState, Zustand or a server sync. The second defines a generic context interface with three parts called state, actions and meta. The third lifts state into provider components so that siblings outside the main UI can read and change it. Implementation Patterns (medium) has two rules: create explicit component variants such as ThreadComposer and EditMessageComposer, and prefer children over renderX props. That second rule notes that render props are fine when the parent must pass data back, as in a list's renderItem. React 19 APIs (medium) has one rule: treat ref as a regular prop instead of using forwardRef, and use use() instead of useContext().
The stated core principle is: lift state, compose internals, make state dependency-injectable. The guidance also names three anti-patterns for sharing state: state trapped inside a component, a useEffect that syncs state upward, and reading state from a ref on submit.
Using it
What you need
The files declare no dependencies, API keys, network access or external tools. To use the guidance you need either an agent host that can read a SKILL.md-style skill or some other way to give the text to your agent or read it yourself. The evidence does not say which hosts are supported.
On the code side you need a React project. The examples are TypeScript/JSX. The React 19 rule is explicitly for React 19 and later only, and the document tells React 18 users to skip that section. The files do not say which exact React, TypeScript or React Native versions the examples were checked against.
How it works
The skill is passive text, not a program. The SKILL.md front matter has a description that tells an agent when the skill is relevant: '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'. The body of SKILL.md is a short index: a priority table, a one-line summary of each rule, and a 'How to Use' note. That note points the agent to the individual files under rules/ and to AGENTS.md, which holds the full compiled guide. This layout lets an agent load the short file first and the longer detail only when needed. The evidence does not describe how any particular host loads the files.
The rules teach a context contract. A provider supplies a value with three parts: state (for example input text, attachments and a submitting flag), actions (update and submit functions) and meta (for example an input ref). Subcomponents such as Composer.Input and Composer.Submit read that value through context, so the same UI can run on different providers: one using local useState, another using a global synced store. The guidance stresses that the provider boundary decides who can read state, not visual nesting. A button or preview outside the composer frame but inside the provider can still submit or display the state.
The README describes how the pack is maintained. Rule files live under rules/, alongside a template and a sections file, and AGENTS.md is the generated, compiled output. The generation tooling is not among the captured files.
Setup
The captured files contain no installation command or host-specific setup steps. The folder is named composition-patterns, while the front-matter name is vercel-composition-patterns. Whether a host requires these to match is unknown. Because the content is plain Markdown, the simplest way to use it is to read AGENTS.md yourself or give it to your agent as project guidance. How any particular agent product discovers and activates a skill folder is outside this evidence and was not checked.
Worked example from the guidance
The main example is a message composer, as in a chat app. The 'incorrect' version is one Composer component that takes props such as isThread, isDMThread, isEditing, isForwarding, channelId and dmId, and uses nested ternaries to choose which field and which action buttons to render. The 'correct' version drops those flags. A ChannelComposer, a ThreadComposer and an EditComposer each assemble what they need from shared parts: Composer.Frame, Composer.Header, Composer.Input, Composer.Footer, Composer.Formatting, Composer.Emojis and Composer.Submit. The thread variant adds an AlsoSendToChannelField, and the edit variant swaps in CancelEdit and SaveEdit.
State then comes from a provider. A ForwardMessageProvider keeps state in useState and passes it, along with a submit action and an input ref, to the shared context. A ForwardButton rendered outside Composer.Frame reads the submit action with use(ComposerContext). Swapping in a ChannelProvider that uses a global store changes where state lives without changing the composer UI. This example was read from the documents only. It was not compiled or run.
Assessment & evidence
Limitations and things to watch
No documented testing or measurement. The captured files document no compilation of the code examples, no runtime testing, and no measurement of how well agents follow these rules or whether the resulting code is better. They say nothing about how the skill behaves across hosts or models. Whether any such evaluation was done elsewhere is unknown.
React 19 dependence is not isolated. The final section says it applies to React 19 and later only and can be skipped on React 18. But the examples in earlier sections already call use(ComposerContext) and render <ComposerContext value={...}> as a provider, and the document itself says use() replaces useContext() in React 19. A React 18 project therefore cannot simply skip one section and follow the rest literally.
The examples are illustrative, not drop-in code. They mix DOM elements (form, and footer with className) with React Native-style names (TextInput, onChangeText, onPress). The context is created with a null default, but the examples destructure the result of use(ComposerContext) without a null check, which a strict TypeScript setup would flag. The lift-state example reads use(Composer.Context), but the Composer object defined in the compound-components rule has no Context member. One 'incorrect' example refers to a variable named sync that is never defined. Most examples concern chat composers, including a forwarding dialog (ForwardMessageDialog), and the render-props rule adds a generic List with renderItem. Unrelated domains such as tables are not demonstrated.
Priority labels are inconsistent. SKILL.md labels State Management as medium, while README labels it high. README labels Component Architecture critical, while SKILL.md and AGENTS.md label that section high (the avoid-boolean-props rule itself is critical). README's rule list also leaves out the React 19 rule that SKILL.md and AGENTS.md include.
The guidance is one-sided on trade-offs. It argues for composition and context but does not discuss their costs, such as extra components and files, how context affects rendering, or cases where a boolean prop is perfectly fine. Only render props get an explicit 'when appropriate' note. The claim that each boolean 'doubles possible states' is stated as a rule of thumb, not shown with evidence.
Reasoning behind the assessment
The assessment rests on reading all 14 files. The core rules agree across the short index (SKILL.md), the rule files and the compiled AGENTS.md, and they are illustrated with concrete before-and-after examples. How effective this format is compared with other forms of guidance is unknown. No standalone executable is supplied; the consequences of applying this guidance have not been evaluated. Because its value is unproven, this report treats it as a promising set of conventions rather than a verified improvement. The inconsistencies listed above look like editorial drift in a version 1.0.0 document rather than signs of a broken resource, but they were not checked against any upstream change history.
Alternatives
The evidence names no competing skills, and none were compared. The guidance lists the official React documentation as its references, including [https://react.dev/learn/passing-data-deeply-with-context] and [https://react.dev/reference/react/use]. Reading those pages is the closest primary source. Other options, not assessed here, include writing your own short component conventions for your agent, relying on code review and linting, or adopting the documented patterns of an existing component library. Choose this skill when your problem is specifically boolean-prop sprawl and shared state through context. Look elsewhere for advice on performance tuning, testing, styling or data fetching, none of which it covers.
Evidence base
The rule text and metadata come from the 14 captured files. SKILL.md supplied the name, description, licence declaration, version, priority table and usage notes. AGENTS.md supplied the full text of all rules, the impact labels and the React 19 caveat. The eight rule files match AGENTS.md in substance and supplied the per-rule examples. README.md supplied the folder structure, the list of principles and the rule-authoring process. metadata.json supplied the version, organisation, date, abstract and reference links. _sections.md and _template.md supplied the section definitions and the rule template.
The file sizes, the commit 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62 and the capture date of 2026-11-12 come from the capture manifest for this folder, not from the files' own text. The recommendations, the overall assessment and the observations about the code examples (such as the missing null checks, the missing Context member and the undefined sync variable) are analysis from reading the text, not results of execution.
No external sources, run logs, tests, benchmarks, issue threads or user reviews were available. Nothing was executed, and nothing here claims that the skill or its code was run or verified.
Access & freshness
Costs
No captured file mentions a price, subscription, usage fee or paid dependency, and the front matter declares an MIT licence. The cost of using it inside an AI agent (model tokens and context window use) depends on the host and model and is unknown. The only size information is that SKILL.md is 2,886 bytes, the compiled AGENTS.md is 22,627 bytes and the whole package is about 50 KB. Token counts were not measured. The evidence also gives no estimate of the effort needed to refactor an existing codebase toward compound components.
Rights and licence
The SKILL.md front matter states license: MIT and metadata author: vercel. The captured folder has no separate LICENSE file, copyright line or full licence text. The exact licence terms, the copyright holder and any notices that must accompany copies are therefore unknown from this evidence. If you plan to reuse, bundle or redistribute these files, look for the complete licence and notices at the original source, [https://github.com/vercel-labs/agent-skills/tree/main/skills/composition-patterns], and in its repository, [https://github.com/vercel-labs/agent-skills]. The code snippets in the guidance are illustrative examples.
Freshness
metadata.json and AGENTS.md both give version 1.0.0 and the date January 2026, and SKILL.md also gives version 1.0.0. The files were captured on 2026-11-12 at commit 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62. Whether the upstream folder has changed since then is unknown. The React 19 rule describes React behaviour as of the time it was written, and the evidence does not say whether later React releases change the advice.
Suggested next steps
Read AGENTS.md first (about 22 KB). It contains the complete expanded rule guide and is the quickest way to judge fit. Check your React version before adopting the rules. Treat the use() examples as React 19 only, as the document's own React 19 rule states, and check that the context-as-provider form works on your version. Before bundling or redistributing the files, confirm the full licence text and required notices at the original source. If you use the skill with an agent, start with one small refactor of a component that has several boolean props and review the diff yourself. Treat the guidance as a default, not an absolute rule. If you adopt it, fix the example problems noted above in your own copy: the types, the missing Context member, and the mix of DOM and React Native element names.
