react-component-design

react-component-design is a skill for Claude Code, Codex from soulcodex/agentic. It costs 56 tokens per session (628 once invoked), scanned A, original, MIT.

A guide for designing React component interfaces, meaning the properties and callbacks that let other code use a component. It covers component responsibilities, controlled and uncontrolled inputs, composition, and keeping the public interface small.

In plain words
What is it for?
Use it when creating, refactoring, or reviewing React 18+ TypeScript components and deciding how their data, events, and state should be exposed.
Why use it?
It helps prevent components with unclear responsibilities, too many props, unnecessary prop passing, or inconsistent state behaviour.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Good fit Use it when creating, refactoring, or reviewing React 18+ TypeScript components and deciding how their data, events, and state should be exposed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/soulcodex/agentic/react-component-design
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 soulcodex/agentic --skill react-component-design
Clone the repo
git clone --depth 1 https://github.com/soulcodex/agentic

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 react-component-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/soulcodex/agentic/react-component-design/github.svg)](https://agentmods.dev/skills/soulcodex/agentic/react-component-design)
Your own site
<a href="https://agentmods.dev/skills/soulcodex/agentic/react-component-design"><img src="https://agentmods.dev/badge/skills/soulcodex/agentic/react-component-design/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 react-component-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/soulcodex/agentic/react-component-design"><img src="https://agentmods.dev/badge/skills/soulcodex/agentic/react-component-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 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.00056 $0.00628
Opus 5.5 $0.00022 $0.00251
Sonnet 5.5 $0.00011 $0.00126
Haiku 4.5 $0.00006 $0.00063

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

Security

Grade A, and why

react-component-design 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.

skills/ui/react-component-design/SKILL.md · 89 lines

How it starts

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

React Component Design Skill

Step 1 — Identify the Component Responsibility

Determine the component type before designing the API:

  • Page component: orchestrates data fetching, permissions, and layout.
  • Feature component: contains feature-specific state and business behavior.
  • UI component: pure presentational; props and callbacks only.

Step 2 — Design the Public API Surface

  • Keep props minimal and strongly typed.
  • Prefer explicit callback names (onSave, onDismiss) over generic handlers.
  • Support controlled and uncontrolled modes only when both are needed.
  • Forward refs only for imperative handles (focus, scroll, open).
interface TextInputProps {
  value?: string
  defaultValue?: string
  onValueChange?: (next: string) => void
}

export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
  ({ value, defaultValue, onValueChange }, ref) => {
    return (
      <input
        ref={ref}
        value={value}
        defaultValue={defaultValue}
        onChange={(e) => onValueChange?.(e.target.value)}
      />
    )
  },
)

Step 3 — Evaluate Prop Drilling Depth

  • 1-2 levels: props are acceptable.
  • 3+ levels through intermediates that do not use data: refactor to context or composition.
  • Global cross-feature state: dedicated store.

Step 4 — Composition and Extensibility

  • Prefer composition over inheritance.
  • Use compound components with context for tightly-related primitives.
  • Use render props or slot-like children patterns when parent-controlled rendering is required.
  • Do not expose internal implementation state through props.

Step 5 — Accessibility and Semantics

  • Base UI components must render semantic HTML first.
  • Ensure keyboard navigation and focus management are first-class API concerns.
  • Tie labels and descriptions to controls via id, aria-*, and role-appropriate markup.

Step 6 — Verify

  • Component responsibility is single-purpose
  • Public props are minimal and typed
  • No prop drilling through more than two uninterested layers
  • forwardRef is only used for imperative handles
  • Interactive components meet semantic and keyboard accessibility basics
  • pnpm tsc --noEmit passes with no errors

Read the full file on GitHub · 89 lines

Files

What ships with it

1 file 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.

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 · 89 lines · 56 tokens per session scan A 6a4ecf81a036

Subscribe to this mod's changes

react-component-design is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed 29d ago), licensed MIT. It adds 56 tokens to every session and 628 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-31.

Related

Other skills, from other repositories

create-custom-widget

Build a Mendix pluggable widget from scratch with React and TypeScript and package it as an .mpk. Use when no marketplace or built-in widget covers what is needed and a custom React component has to be written.

mendixlabs/mxcli · 50 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens

trpc-router

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

trpc/trpc · 59 tokens

pinme-email

Use this skill when a PinMe project (Worker TypeScript) needs to integrate email sending (sendemail). Guides AI to generate correct Worker TS code.

glitternetwork/pinme · 35 tokens

node-modern

Use this skill when writing, reviewing, or refactoring Node.js code — modules, async flow, cancellation, file and process I/O, HTTP — on a current Node.js release. Triggers: user mentions "Node", "Node.js", "ESM", "CommonJS", "require", "import", "fetch", "AbortSignal", "AbortController", "stream", "childprocess"…

WrongStack/WrongStack · 93 tokens