Borrowing it
Nothing to install: this file belongs to FranRom/pupila. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/FranRom/pupila/main/.agents/skills/composition-patterns/SKILL.mdgit clone --depth 1 https://github.com/FranRom/pupilaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/franrom/pupila/composition-patterns)<a href="https://agentmods.dev/skills/franrom/pupila/composition-patterns"><img src="https://agentmods.dev/badge/skills/franrom/pupila/composition-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/franrom/pupila/composition-patterns"><img src="https://agentmods.dev/badge/skills/franrom/pupila/composition-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00058 | $0.00560 |
| Opus 5.5 | $0.00023 | $0.00224 |
| Sonnet 5.5 | $0.00012 | $0.00112 |
| Haiku 4.5 | $0.00006 | $0.00056 |
Grade A, and why
vercel-composition-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Component Architecture | HIGH | architecture- |
| 2 | State Management | MEDIUM | state- |
| 3 | Implementation Patterns | MEDIUM | patterns- |
| 4 | React 19 APIs | MEDIUM | react19- |
Quick Reference
1. Component Architecture (HIGH)
architecture-avoid-boolean-props— no boolean props for behavior; composearchitecture-compound-components— complex components share context
2. State Management (MEDIUM)
state-decouple-implementation— provider owns state mgmtstate-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 modespatterns-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— noforwardRef;use()replacesuseContext()
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
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- AGENTS.md 20 KB
- metadata.json 530 B
- README.md 1.8 KB
- rules/_sections.md 700 B
- rules/_template.md 301 B
- rules/architecture-avoid-boolean-props.md 2.1 KB
- rules/architecture-compound-components.md 2.4 KB
- rules/patterns-children-over-render-props.md 1.7 KB
- rules/patterns-explicit-variants.md 2.2 KB
- rules/react19-no-forwardref.md 907 B
- rules/state-context-interface.md 4.5 KB
- rules/state-decouple-implementation.md 2.5 KB
- rules/state-lift-state.md 3.0 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 81 lines · 58 tokens per session scan A 0459e0482e35
vercel-composition-patterns is a skill published in the GitHub repository FranRom/pupila (36 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 560 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
react-frontend
React, TypeScript, and Next.js patterns for frontend development. Use when building React components, managing state, fetching data, optimizing performance, or working with Next.js App Router. Covers React 18-19, hooks, Server Components, and type-safe patterns.
react-application-structure
Establishes or reviews the directory layout, feature boundaries, state design, routing approach, and data-fetching conventions for a React 18+ TypeScript application. Invoked when the user asks to structure a React app, set up a scalable architecture, or review React project organization.
next-application-structure
Establishes or reviews directory layout, server/client boundaries, routing, data-fetching strategy, and testing structure for Next.js 14+ App Router TypeScript applications. Invoked when the user asks to structure a Next app, set App Router conventions, or review architecture for React parity.
react-component-design
Designs or reviews React component APIs. Handles prop drilling decisions, composition patterns, controlled/uncontrolled contracts, and minimal public API surfaces for React 18+ TypeScript components. Invoked when creating new components, refactoring existing ones, or reviewing component contracts.
react-conventions
React + TypeScript frontend conventions — centralized API client, API services, state management, components, and file organization. Apply whenever writing or editing frontend .ts/.tsx code.
react-hook
Creates a custom React hook with TypeScript types, tests, and usage example.