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.
npx agentmods add skills/jgamaraalv/ts-dev-kit/composition-patternsnpx skills add jgamaraalv/ts-dev-kit --skill composition-patternsgit clone --depth 1 https://github.com/jgamaraalv/ts-dev-kitWhat 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 | $0.00055 | $0.00717 |
| Opus 5 | $0.00028 | $0.00358 |
| Sonnet 5 | $0.00011 | $0.00143 |
| Haiku 4.5 | $0.00006 | $0.00072 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 71 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 NOT to Use
Skip these patterns when: fewer than 3 props, simple variants, or single-use components.
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)
- Avoid boolean props — Don't add boolean props like
isThread,isEditing,isDMThreadto customize behavior. Each boolean doubles possible states. Use composition instead — see references/architecture-avoid-boolean-props.md - Compound components — Structure complex components with shared context so each subcomponent accesses state via context, not props — see references/architecture-compound-components.md
2. State Management (MEDIUM)
- Decouple implementation — Provider is the only place that knows how state is managed — see references/state-decouple-implementation.md
- Context interface — Define generic interface with
state,actions,metafor dependency injection — see references/state-context-interface.md - Lift state — Move state into provider components for sibling access — see references/state-lift-state.md
What ships with it
8 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.
- references/architecture-avoid-boolean-props.md 2.0 KB
- references/architecture-compound-components.md 2.6 KB
- references/patterns-children-over-render-props.md 1.7 KB
- references/patterns-explicit-variants.md 2.2 KB
- references/react19-no-forwardref.md 839 B
- references/state-context-interface.md 5.2 KB
- references/state-decouple-implementation.md 2.4 KB
- references/state-lift-state.md 3.4 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.
- 2d ago First seen · 71 lines · 55 tokens per session scan A 404aef48d771
composition-patterns is a skill published in the GitHub repository jgamaraalv/ts-dev-kit (15 stars, last pushed 6mo ago), licensed MIT. It adds 55 tokens to every session and 717 once invoked, about $0.0003 per session on Opus 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…