new-component

new-component is a skill for Claude Code, Codex from gaia-react/gaia. It costs 80 tokens per session (573 once invoked), scanned A, original, MIT.

A guided file generator for new React user-interface components. It can create the component, an optional Storybook example, and Vitest tests, including an accessibility check.

In plain words
What is it for?
Use it to scaffold buttons, cards, forms, or other components under the project's components directory, with typed properties and optional stories or tests.
Why use it?
It removes repetitive setup and helps new components follow the project's folder, typing, story, and testing conventions.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/gaia-react/gaia/new-component
Any agent
npx skills add gaia-react/gaia --skill new-component
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia

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 new-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaia-react/gaia/new-component.svg)](https://agentmods.dev/skills/gaia-react/gaia/new-component)
Your own site
<a href="https://agentmods.dev/skills/gaia-react/gaia/new-component"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/new-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00080 $0.00573
Opus 5 $0.00040 $0.00287
Sonnet 5 $0.00016 $0.00115
Haiku 4.5 $0.00008 $0.00057

Measured 4d ago against content hash 3954f0933df3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

new-component 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 4d 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.

.claude/skills/new-component/SKILL.md · 29 lines

How it starts

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

new-component

Trigger: user asks to create a component, scaffold a card, etc.

Workflow

  1. Confirm with user via AskUserQuestion: name (PascalCase), parent dir (default app/components), props (or "none"), story (default yes).
  2. Run: .gaia/cli/gaia scaffold component <Name> [flags]
  3. Verify: pnpm typecheck clean. Open the new files, sanity-check the props.
  4. If user wants more (variants, conditional rendering, complex children): edit the generated files. The skill does not regenerate.

Flags

  • --no-story, skip Storybook story
  • --parent <dir>, non-default parent dir (e.g. app/components/Form)
  • --props "a:string,b:number", typed props rendered as a Props alias and destructured in the signature. Only top-level commas separate props, so comma-bearing types (Record<K, V>, (a, b) => void, tuples) are supported within a single entry.

Accessibility assertion

Scaffolded test files include a test('a11y') block that calls expectNoA11yViolations from test/a11y.ts (axe-core, full default ruleset, no tag filter). Because axe-core is incompatible with the project's default happy-dom test environment (Node.prototype.isConnected is getter-only, capricorn86/happy-dom#978), the scaffolder writes // @vitest-environment jsdom as the first line of the test file. The directive is required: expectNoA11yViolations throws an actionable error if it detects a non-jsdom runtime. Don't strip the directive when editing the file.

The a11y block renders a non-degenerate instance so it can fail against a real violation rather than passing vacuously against an empty DOM. With --props, the scaffolder fills representative values (title="title", count={0}, …) at the render site (in the story Default when a story exists, otherwise inline in the test). Replace the placeholder values with realistic ones. The render-only axe pass is a starting point, not complete a11y evidence: add interaction-state and prop-variant assertions as the component grows.

Read the full file on GitHub · 29 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. 4d ago First seen · 29 lines · 80 tokens per session scan A 3954f0933df3

Subscribe to this mod's changes

new-component is a skill published in the GitHub repository gaia-react/gaia (23 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 573 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

livecodes/framework-wrappers

Use SDK with React, Vue, Svelte, Solid, Preact, and Web Components. sdkReady callback pattern, reactive props, and framework-specific setup. Load this skill when embedding LiveCodes in a framework application.

live-codes/livecodes · 51 tokens

writing-react-native-storybook-stories

Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters, or working with portable stories for…

storybookjs/react-native · 83 tokens

setup-react-native-storybook

Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project, configuring metro.config.js with withStorybook, creating .rnstorybook configuration files, setting up Storybook routes in Expo Router, configuring getStorybookUI, or adding the StorybookPlugin to a…

storybookjs/react-native · 102 tokens

upgrading-react-native-storybook

Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading @storybook/react-native projects from 5.3.x to 6.5.x, 6.5.x to 7.6.x, 7.6.x to 8.3.x, 8.x to 9.x, or 9.x to 10.x. Detect the currently installed Storybook version, choose only the next migration step, update…

storybookjs/react-native · 151 tokens

webflow-to-react

Converts a Webflow HTML export into a maintainable React app with TanStack Start (SSR, TanStack Router conventions) using an idiomatic React-first approach. Sets up Storybook early, builds UI primitive + page-section SOT components with variant stories before composing routes. Use when the user has a Webflow export…

dmenchaca/webflow-to-react · 258 tokens

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance…

bartstc/vite-ts-react-template · 67 tokens