react-component-scaffold

react-component-scaffold is a skill for Claude Code from luqiang-code/claude-code-skills. It costs 41 tokens per session (660 once invoked), scanned A, original, MIT.

A generator for new React components, with related tests, Storybook stories, styles, and an export file when the project uses them. React is a JavaScript library for building user interfaces, and Storybook is a tool for developing UI components separately.

In plain words
What is it for?
Use it when starting a React component from scratch. It can create typed props, accessibility attributes, loading or error states, tests, stories, CSS Modules, or styled-components based on the project.
Why use it?
Creating the same supporting files by hand is repetitive and can lead to inconsistent project structure. This skill creates the component files together according to the project's setup.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when starting a React component from scratch. It can create typed props, accessibility attributes, loading or error states, tests, stories, CSS Modules, or styled-components based on the project.

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

Made for: Claude Code.

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-scaffold

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/luqiang-code/claude-code-skills/react-component-scaffold"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/react-component-scaffold.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 660 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 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.00041 $0.00660
Opus 5.5 $0.00016 $0.00264
Sonnet 5.5 $0.00008 $0.00132
Haiku 4.5 $0.00004 $0.00066

Measured 1mo ago against content hash e48f20aaa22f, 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-scaffold 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.

community-skills/react-component-scaffold/SKILL.md · 103 lines

How it starts

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

React Component Scaffold

Scaffold React components with tests, stories, and styles in one shot.

When to Use

  • Creating a new React component from scratch
  • User says "create a component", "scaffold a component"
  • Need consistent component file structure across a project

When NOT to Use

  • Modifying existing components
  • Non-React component files
  • The project has a code generator already (e.g., Plop, Hygen)

Workflow

  1. Ask user: component name, props (if known), and which optional files to generate
  2. Detect or ask: JavaScript or TypeScript, CSS Modules or styled-components
  3. Generate files:
ComponentName/
├── ComponentName.tsx          # Component with typed props
├── ComponentName.test.tsx     # Basic render + interaction tests
├── ComponentName.stories.tsx  # Storybook story (if project uses Storybook)
├── ComponentName.module.css   # CSS Module (if using CSS Modules)
└── index.ts                   # Barrel export
  1. Write the component with:
    • Typed props interface
    • Default exports
    • Accessibility attributes (aria-label, role)
    • Loading/empty/error states if data-dependent

Component Template

import { type FC } from 'react';
import styles from './Button.module.css';

interface ButtonProps {
  /** Button label text */
  children: string;
  /** Visual variant */
  variant?: 'primary' | 'secondary' | 'danger';
  /** Disabled state */
  disabled?: boolean;
  /** Click handler */
  onClick?: () => void;
}

export const Button: FC<ButtonProps> = ({
  children,
  variant = 'primary',
  disabled = false,
  onClick,
}) => {
  return (
    <button
      className={`${styles.button} ${styles[variant]}`}
      disabled={disabled}
      onClick={onClick}
      type="button"
    >
      {children}
    </button>
  );
};

Key Principles

  • One component per folder — co-locate all related files
  • Always include a barrel export (index.ts)
  • Props interface should be exported (for consumers)
  • Add JSDoc comments for each prop
  • Use type="button" on buttons to prevent form submission

Read the full file on GitHub · 103 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 · 103 lines · 41 tokens per session scan A e48f20aaa22f

Subscribe to this mod's changes

react-component-scaffold is a skill published in the GitHub repository luqiang-code/claude-code-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 660 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

generic-react-ux-designer

Professional UI/UX design expertise for React applications. Covers design thinking, user psychology (Hick's/Fitts's/Jakob's Law), visual hierarchy, interaction patterns, accessibility, performance-driven design, and design critique. Use when designing features, improving UX, solving user problems, or conducting design…

travisjneuman/.claude · 69 tokens

generic-react-feature-developer

Guide feature development for React applications with architecture focus. Covers Zustand/Redux patterns, IndexedDB usage, component systems, lazy loading strategies, and seamless integration. Use when adding new features, refactoring existing code, or planning major changes.

travisjneuman/.claude · 53 tokens

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

generic-react-code-reviewer

Review React/TypeScript code for bugs, security vulnerabilities, performance issues, accessibility gaps, and CLAUDE.md workflow compliance. Enforces TypeScript strict mode, GPU-accelerated animations, WCAG AA accessibility, bundle size limits, and surgical simplicity. Use when completing features, before commits, or…

travisjneuman/.claude · 71 tokens

dev-nextjs

Next.js development (App Router, Server Components, caching, streaming). Trigger when the user works with Next.js, modifies app/, pages/, next.config, or talks about RSC, Server Actions, Route Handlers, middleware.

christopherlouet/claude-base · 50 tokens

dev-react-perf

React/Next.js performance optimization. Points to Vercel's react-best-practices (70 rules by impact - waterfalls, bundle, re-renders) and adds what it leaves out - list virtualization, state colocation, profiling tools, Core Web Vitals targets. Trigger when the user wants to optimize rendering, reduce re-renders, or…

christopherlouet/claude-base · 81 tokens