ring:applying-composition-patterns

ring:applying-composition-patterns is a skill for Claude Code, Cursor from LerianStudio/ring. It costs 68 tokens per session (5,393 once invoked), scanned A, original, Apache-2.0.

A set of React component design patterns for replacing many behavior-controlling boolean props with composition and shared state. React is a JavaScript library for building user interfaces.

In plain words
What is it for?
Refactoring complex React components, designing reusable component libraries, using compound components, and separating state management from presentation.
Why use it?
It makes flexible components easier to maintain when conditional branches, render props, or boolean options begin multiplying.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: paths in frontmatter, but also shipped in a Cursor plugin.

Part of the ring-dev-team plugin — 35 skills, 24 agents shipped together

Good fit Refactoring complex React components, designing reusable component libraries, using compound components, and separating state management from presentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lerianstudio/ring/applying-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 LerianStudio/ring --skill applying-composition-patterns
Clone the repo
git clone --depth 1 https://github.com/LerianStudio/ring

Made for: Claude Code, Cursor.

Or install ring-dev-team, the plugin that ships this one along with the rest of its 35 skills, 24 agents.

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 ring:applying-composition-patterns

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/lerianstudio/ring/applying-composition-patterns"><img src="https://agentmods.dev/badge/skills/lerianstudio/ring/applying-composition-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,393 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00068 $0.05393
Opus 5.5 $0.00027 $0.02157
Sonnet 5.5 $0.00014 $0.01079
Haiku 4.5 $0.00007 $0.00539

Measured 1mo ago against content hash 65b9dbc40214, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ring:applying-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.

dev-team/skills/applying-composition-patterns/SKILL.md · 946 lines

How it starts

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

Applying Composition Patterns

When to use

  • Refactoring components with boolean prop proliferation
  • Building flexible, reusable component libraries
  • Architecture review of React component hierarchies
  • Component has grown to 3+ boolean props controlling behavior
  • Multiple render props or conditional rendering branches

Skip when

  • Simple components with 1-2 props and no conditional rendering
  • Non-React code
  • Prototype or throwaway code where flexibility doesn't matter
  • Component is leaf-level with no composition concerns

Complementary: ring:checking-frontend-quality — validate component quality after refactoring


Abstract

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.


Table of Contents

  1. Component Architecture — HIGH
  2. State Management — MEDIUM
  3. Implementation Patterns — MEDIUM
  4. React 19 APIs — MEDIUM

1. Component Architecture

Impact: HIGH

Fundamental patterns for structuring components to avoid prop proliferation and enable flexible composition.

Read the full file on GitHub · 946 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. 1mo ago First seen · 946 lines · 68 tokens per session scan A 65b9dbc40214

Subscribe to this mod's changes

ring:applying-composition-patterns is a skill published in the GitHub repository LerianStudio/ring (217 stars, last pushed 3d ago), licensed Apache-2.0. It adds 68 tokens to every session and 5,393 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

ss-learn

Capture a human-approved UI design lesson as a privacy-minimized local StyleSeed candidate, review it, and prepare an opt-in share package without transmitting project code, prompts, screenshots, or brand data. Use when a person asks StyleSeed to remember, learn from, generalize, review, or prepare a reusable rule…

bitjaru/styleseed · 73 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

spotpatch

A development workflow for React that connects a selected page element to its JSX or TSX source code and gathers context for review.

huanglvjing/spotpatch · 93 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, and applies user-approved React corrections.

shinpr/codex-workflows · 29 tokens

antidote

Stop AI agents from patching symptoms. Use this skill when coding, reviewing, refactoring, auditing, committing fixes, or adding guards, validation, workarounds, or 20+ lines without deleting code.

Avtr99/antidote · 47 tokens

review

Structured code review with parallel audit agents, confidence-scored triage, and optional auto-fix. Examines uncommitted changes, staged diffs, commit ranges, or specific paths. Produces a tiered report (MUST-FIX / RECOMMENDED / NIT) backed by evidence, then optionally applies fixes with verification.

greglas75/zuvo · 70 tokens