Skills vercel-composition-patterns
๐Ÿ“ฆ

vercel-composition-patterns

v1.0.0 Content revision r2 Safe ๐ŸŒ Network accessโš™๏ธ External commands

Refactor React Components with Composition

Boolean mode props make React components difficult to extend and understand. Apply composition guidelines to build explicit variants, shared context contracts, and reusable component parts.

Supports: Claude Codex Code(CC)
Maintain this Skill? Claim it ๐Ÿฅˆ 81 Silver

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "vercel-composition-patterns" from https://skillstore.io/skills/vercel-labs-vercel-composition-patterns.md and its manifest at https://skillstore.io/api/skills/vercel-labs-vercel-composition-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Your Agent should still show its plan and request any confirmation required by the security policy.

Test it

Using "vercel-composition-patterns". Review a message composer with thread, editing, and forwarding mode flags.

Expected outcome:

  • Recommendation: introduce explicit ThreadComposer, EditMessageComposer, and ForwardMessageComposer variants.
  • Shared parts: frame, input, footer, formatting controls, and reusable actions.
  • Each variant selects its provider and visible actions without combining independent mode flags.

Using "vercel-composition-patterns". A forwarding dialog has a message input, sibling preview, and separate submit button that need the same state.

Expected outcome:

  • Place one forwarding provider around the input, preview, and dialog actions.
  • Expose the message through state, submission through actions, and the input reference through meta.
  • Keep visual layout independent from state ownership so the preview and submit button can remain outside the composer frame.

Using "vercel-composition-patterns". Should a reusable list replace its data-aware renderItem callback with children?

Expected outcome:

Keep the renderItem callback when the list supplies item data and an index. Prefer children for static layout that requires no callback data.

Security Audit

Safe
v5 โ€ข 11/9/2026 Open versioned report

All 31 static findings are false positives involving React guidance, TypeScript signatures, Markdown formatting, or documentation reference URLs. No evidence found of command execution, system reconnaissance, data exfiltration, or prompt injection in the reviewed source context.

14
Files scanned
2,043
Lines analyzed
0
Review items
0
False positives ignored
No confirmed security findings were detected by the latest completed static and semantic audit. This does not prove the skill has no side effects.
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/vercel-labs-vercel-composition-patterns/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/vercel-labs-vercel-composition-patterns/security.svg)](https://skillstore.io/skills/vercel-labs-vercel-composition-patterns?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/vercel-labs-vercel-composition-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/vercel-labs-vercel-composition-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/vercel-labs-vercel-composition-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

vercel-labs. (2026). vercel-composition-patterns security audit report (audit version 5) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/vercel-labs-vercel-composition-patterns/audits/5

BibTeX citation

@techreport{vercel-labs-vercel-labs-vercel-composition-patterns-2026, author = {vercel-labs}, title = {vercel-composition-patterns security audit report (audit version 5)}, institution = {Skillstore}, year = {2026}, number = {5}, url = {https://skillstore.io/skills/vercel-labs-vercel-composition-patterns/audits/5}, note = {Author version 1.0.0} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "vercel-composition-patterns security audit report (audit version 5)" version: "1.0.0" type: report authors: - name: "vercel-labs" date-released: "2026-11-09" url: "https://skillstore.io/skills/vercel-labs-vercel-composition-patterns/audits/5" identifiers: - type: other value: "skillstore:vercel-labs-vercel-composition-patterns:audit:5" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
100
Maintainability
87
Content
70
Community
91
Spec Compliance

What You Can Build

Simplify Complex Component Modes

Replace branching message composer modes with explicit variants that reuse shared component parts.

Design Flexible Library APIs

Plan compound components and provider contracts so consumers can compose layouts without adding more configuration props.

Review Shared State Boundaries

Assess whether previews, forms, and dialog actions share state through the right provider instead of effects or mutable refs.

Try These Prompts

Understand a Composition Problem
Review [component] and explain which boolean mode props increase complexity. Suggest explicit variants and identify the parts they could share.
Refactor a Component into Parts
Refactor [component] into compound components with children composition. Preserve existing behavior and show how each current variant composes the shared parts.
Share State Across a Dialog
Design a provider for [dialog] with state, actions, and meta. Let its form, sibling preview, and submit action share context without effect synchronization.
Design Interchangeable Providers
Review [component family] and its React version. Design a common context contract for local and synced providers, explicit variants, and a behavior verification plan.

Best Practices

  • Check the project React version before applying React 19 API guidance.
  • Define a stable state, actions, and meta contract before introducing interchangeable providers.
  • Preserve existing behavior and verify each explicit variant after refactoring.

Avoid

  • Adding independent boolean mode props to represent mutually exclusive component variants.
  • Synchronizing duplicate component state through effects instead of sharing a provider.
  • Using render callbacks for static layout that children can express directly.

Frequently Asked Questions

What does this skill provide?
It provides React composition guidelines with incorrect and correct examples for component structure, context contracts, state ownership, and explicit variants.
Does it include an executable refactoring tool?
No. It provides guidance for an AI assistant to apply within your project, not a standalone transformer or validation tool.
Can I use it with React 18?
The composition and provider principles apply, but skip the React 19 API guidance and retain APIs compatible with your project.
Are render props always discouraged?
No. Keep render props when a parent supplies data or state to the callback. Prefer children for static composition.
Must shared controls sit inside the component frame?
No. Controls can remain outside the visual frame when they share the provider that exposes the required state and actions.
Does the guidance require a particular state library?
No. It separates the context interface from provider implementation so the same UI can consume local or globally managed state.

Developer Details

License

MIT

Author version

v1.0.0

Skillstore revision

r2

Version notice

The installable content changed, but the author did not update the declared version.

Ref

1f79e59ae427a74eab604c013e03b61f04634721

Maintenance freshness

11/10/2026

Usage

32 downloads ยท 207 views

More from vercel-labs

View all
View all