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

vercel-composition-patterns

Skill36 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

61 other projects use a version of this, 60 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use next-cache-components, vercel-react-native-skills and 8 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-cache-components

    Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

    Also in 5 projects that use this

  • VercelSkill

    vercel-react-native-skills

    Also in 13 projects that use this

  • JetBrainsSkill

    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 7 projects that use this

  • +7 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 60 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 60 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.