agentleFS
FranRomFranRom/pupila/.agents/skills/composition-patterns/SKILL.md

vercel-composition-patterns

Skill37 starsChanged 7 months agoMITView on GitHub

Composition patterns. Flexible, maintainable components. Skip boolean prop bloat. Use compound components, lifted state, composed internals. Scales for humans + AI agents. ⚠️ React 19+ only. Skip if React 18 or earlier. Read rule files for explanations + examples: Each rule file has: Full guide, all rules expanded: AGENTS.md

177 other projects use a version of this, 174 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use next-upgrade, vercel-cli-with-tokens and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    next-upgrade

    Upgrade Next.js to the latest version following official migration guides and codemods

    Also in 10 projects that use this

  • VercelSkill

    vercel-cli-with-tokens

    Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

    Also in 14 projects that use this

  • mezotvSkill

    c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript. Use when the user asks about c15t setup, components, hooks, styling, cookie/consent UX, GDPR/CCPA/IAB TCF compliance, script or iframe blocking, GTM/GA4/PostHog/Meta integrations etc, or self-hosting c15t/backend.

    Also in 3 projects that use this

  • midudevSkill

    tailwind-css-patterns

    Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.

    Also in 8 projects that use this

  • DatabricksSkill

    deploy-to-vercel

    Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

    Also in 22 projects that use this

  • VercelSkill

    building-components

    Guide for building modern, accessible, and composable UI components. Use when building new components, implementing accessibility, creating composable APIs, setting up design tokens, publishing to npm/registry, or writing component documentation.

    Also in 6 projects that use this

  • +5 more from vercel-labs

The file

We split this skill into the rules it gives an agent

1 rule. 1 is common, 0 are distinctive, and 0 are very specific to this project.

  • 1

    Common

    Most of the 175 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Read rule files for explanations + examples:

    line 64

“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React Composition Patterns

Composition patterns. Flexible, maintainable components. Skip boolean prop bloat. Use compound components, lifted state, composed internals. Scales for humans + AI agents.

When to Apply

Use when:

  • Refactoring components with many boolean props
  • Building reusable component libraries
  • Designing flexible component APIs
  • Reviewing component architecture
  • Working with compound components or context providers

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Component ArchitectureHIGHarchitecture-
2State ManagementMEDIUMstate-
3Implementation PatternsMEDIUMpatterns-
4React 19 APIsMEDIUMreact19-

Quick Reference

1. Component Architecture (HIGH)

  • architecture-avoid-boolean-props — no boolean props for behavior; compose
  • architecture-compound-components — complex components share context

2. State Management (MEDIUM)

  • state-decouple-implementation — provider owns state mgmt
  • state-context-interface — generic interface: state, actions, meta (DI)
  • state-lift-state — state in provider, siblings access

3. Implementation Patterns (MEDIUM)

  • patterns-explicit-variants — explicit variant components, no boolean modes
  • patterns-children-over-render-props — children, not renderX props

4. React 19 APIs (MEDIUM)

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

  • react19-no-forwardref — no forwardRef; use() replaces useContext()

How to Use

Read rule files for explanations + examples:

rules/architecture-avoid-boolean-props.md
rules/state-context-interface.md

Each rule file has:

  • Why it matters
  • Incorrect example + why
  • Correct example + why
  • Extra context, refs

Full Compiled Document

Full guide, all rules expanded: AGENTS.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.