composition-patterns

composition-patterns is a skill for Claude Code, Codex from yuanqiyibiansheng/DeepSeek-Harness-GUI. It costs 40 tokens per session (602 once invoked), scanned A, a copy of vercel-composition-patterns, MIT.

A guide to React composition patterns, which are ways to build flexible components by combining smaller parts. It covers compound components, render props, context, reusable APIs, and React 19 changes.

In plain words
What is it for?
Designing or reviewing reusable React components, refactoring components with many boolean props, and choosing patterns for state and component architecture.
Why use it?
It helps avoid components becoming difficult to maintain because they rely on too many true-or-false options for customization.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Designing or reviewing reusable React components, refactoring components with many boolean props, and choosing patterns for state and component architecture.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yuanqiyibiansheng/deepseek-harness-gui/composition-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yuanqiyibiansheng/DeepSeek-Harness-GUI --skill composition-patterns
Clone the repo
git clone --depth 1 https://github.com/yuanqiyibiansheng/DeepSeek-Harness-GUI

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for composition-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/yuanqiyibiansheng/deepseek-harness-gui/composition-patterns/github.svg)](https://agentmods.dev/skills/yuanqiyibiansheng/deepseek-harness-gui/composition-patterns)
Your own site
<a href="https://agentmods.dev/skills/yuanqiyibiansheng/deepseek-harness-gui/composition-patterns"><img src="https://agentmods.dev/badge/skills/yuanqiyibiansheng/deepseek-harness-gui/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.

agentmods 80×15 button for composition-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/yuanqiyibiansheng/deepseek-harness-gui/composition-patterns"><img src="https://agentmods.dev/badge/skills/yuanqiyibiansheng/deepseek-harness-gui/composition-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 83% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00602
Opus 5 $0.00020 $0.00301
Sonnet 5 $0.00008 $0.00120
Haiku 4.5 $0.00004 $0.00060

Measured 11d ago against content hash 3c19f319810f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

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 11d 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.

Origin

This is a copy

83% identical to vercel-composition-patterns — 13 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

apps/desktop-installer/skills-seed/composition-patterns/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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 - 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()

Read the full file on GitHub · 86 lines

Changes

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.

  1. 11d ago First seen · 86 lines · 40 tokens per session scan A 3c19f319810f

Subscribe to this mod's changes

composition-patterns is a skill published in the GitHub repository yuanqiyibiansheng/DeepSeek-Harness-GUI (19 stars, last pushed 8d ago), licensed MIT. It adds 40 tokens to every session and 602 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 83% identical to vercel-composition-patterns, differing in 13 lines, and is treated as a copy.

Related

Other skills, from other repositories

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

fuzzy-ranking

Rank fuzzy matches with rankItem, filter with RankingInfo.passed, compare saved ranking metadata with compareItems, and configure rankings, thresholds, accessors, min/max bounds, or diacritics. Load for @tanstack/match-sorter-utils itself or fuzzy Table filterMeta wiring.

TanStack/table · 62 tokens

api-not-found

Diagnose missing TanStack Table v9 exports, options, state slices, and instance methods. Load before inventing an API when code sees a type error, undefined feature method, absent object key, adapter mismatch, or v8-shaped example.

TanStack/table · 53 tokens

r3f-best-practices

React Three Fiber (R3F) and Poimandres ecosystem best practices. Use when writing, reviewing, or optimizing R3F code. Triggers on tasks involving @react-three/fiber, @react-three/drei, zustand, @react-three/postprocessing, @react-three/rapier, or leva.

zebbern/claude-code-guide · 74 tokens

dashboard-widgets

Author a dashboard widget — a small React component backed by named LangWatchQL queries — from a plain question. Discovers the analytics schema, writes the queries, writes the widget file, saves it, then proves it renders. Use when asked to build, prototype, or iterate on a custom chart widget, or to add a widget…

langwatch/langwatch · 79 tokens