agentleFS
baiwummbaiwumm/next-daily-hot/.agents/skills/vercel-composition-patterns/SKILL.md

vercel-composition-patterns

Skill283 starsChanged 51 days agoMITView on GitHub

Composition patterns for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale. Reference these guidelines when: - architecture-avoid-boolean-props - Don't add boolean props to customize behavior; use composition - architecture-compound-components - Structure complex components with shared context - state-decouple-implementation - Provider is the only place that knows how state is managed - state-context-interface -…

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 28 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 individual rule files for detailed explanations and code examples:

    line 73

“Common” is measured: kept by at least 6 in 10 of the 28 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 for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale.

When to Apply

Reference these guidelines 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 - Don't add boolean props to customize behavior; use composition
  • architecture-compound-components - Structure complex components with shared context

2. State Management (MEDIUM)

  • state-decouple-implementation - Provider is the only place that knows how state is managed
  • state-context-interface - Define generic interface with state, actions, meta for dependency injection
  • state-lift-state - Move state into provider components for sibling access

3. Implementation Patterns (MEDIUM)

  • patterns-explicit-variants - Create explicit variant components instead of boolean modes
  • patterns-children-over-render-props - Use children for composition instead of renderX props

4. React 19 APIs (MEDIUM)

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

  • react19-no-forwardref - Don't use forwardRef; use use() instead of useContext()

How to Use

Read individual rule files for detailed explanations and code examples:

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

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Download now (ZIP)

Trending

Surging: 3 new projects took it in the last 4 weeks, 3× the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 1 new projectWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 1 new projectWeek of Oct 4: 2 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 4 in all, so this is a hint, not a trend.
  • Other versions154 projects use a version of this.

    Word for word · 125

    1. vercel-labs/agent-skills★ 33k100% same
    2. open-metadata/OpenMetadata★ 16k100% same
    3. trycompai/crm★ 12k100% same
    4. mengxi-ream/read-frog★ 10k100% same
    5. 1weiho/open-slide★ 9.6k100% same
    6. midudev/preguntas-entrevista-react★ 7.8k100% same
    7. dinerojs/dinero.js★ 6.8k100% same
    8. CherryHQ/cherry-studio-app★ 4k100% same
    9. legions-developer/evilcharts★ 3.2k100% same
    10. compozy/compozy★ 2.8k100% same

    115 more not listed

    Edited · 28

    1. supabase/supabase★ 114k96% same
    2. calesthio/OpenMontage★ 74k86% same
    3. Kiranism/next-shadcn-dashboard-starter★ 7.2k100% same
    4. zebbern/claude-code-guide★ 4.7k100% same
    5. openstatusHQ/data-table-filters★ 2.3k100% same
    6. VladSez/easy-invoice-pdf★ 1.1k100% same
    7. legions-developer/invoicely★ 923100% same
    8. JetBrains/skills★ 38692% same
    9. ever-works/ever-works★ 185100% same
    10. Limatura/tessera★ 79100% same

    18 more not listed

    Wrote their own version · 1

    1. kimtth/agent-skill-100-lines-or-less★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use vercel-optimize, vercel-react-native-skills 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

      vercel-optimize

      Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel/framework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests.

      Also in 10 projects that use this

    • VercelSkill

      vercel-react-native-skills

      Also in 34 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

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

    • thongdn-itSkill

      nuqs

      nuqs (type-safe URL query state) best practices for Next.js applications. This skill should be used when writing, reviewing, or refactoring code that uses nuqs for URL state management. Triggers on tasks involving useQueryState, useQueryStates, search params, URL state, query parameters, nuqs parsers, or Next.js routing with state.

      Also in 3 projects that use this

    • VercelSkill

      next-cache-components-optimizer

      Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards against regression. Use when asked to grow a static shell, fix a slow first paint or non-instant navigation, diagnose which Suspense boundary blocks useful UI, or add instant() regression coverage. Requires Next.js 16.3+ with Cache Components already adopted.

      Also in 5 projects that use this

    • +5 more from vercel-labs
  • In this repository5 other files it gives its agents.

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.