new-component

Scaffolds a new React design system component with files, registration, and documentation steps.

1|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/robritacca-dotcom/design-system --skill new-component-robritacca-dotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-component
Source: https://github.com/robritacca-dotcom/design-system/tree/main/.claude/skills/new-component
Command: npx skills add https://github.com/robritacca-dotcom/design-system --skill new-component-robritacca-dotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a component to this design system requires many coordinated steps — writing the typed React file, the token-only CSS, the Storybook stories, registering it in the build-enforced registry, and documenting it — and missing any one fails the build. This Skill walks through the entire flow so nothing is skipped. ## Core Features & Use Cases - Three-file scaffolding: Creates the typed React component (forwardRef, own-props split, BEM ds- classes), a semantic-token-only CSS file, and a Storybook stories file following the repo's enforced API contract. - Build-enforced registration: Adds the component to src/components/registry.json, regenerates derived surfaces (barrels, README counts, prop API, site corpus), and documents it in design.md. - Quality gates: Runs the design-qa skill before registration and hands off the website showcase page via the component-doc-page skill. - Use Case: Ask to "add a Tooltip component" and get a fully registered, documented, build-passing component with stories, tokens-compliant CSS, and a registry entry. ## Quick Start Ask the assistant to add a new component by name, for example: create a Tooltip component for the design system.

Frequently Asked Questions about new-component

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new component to this design system?

Invoke the skill with a phrase like "add a Tooltip component". It creates the three component files, runs design QA, registers the component in src/components/registry.json, documents it in design.md, and hands off the website showcase page.

What files does a new design system component need?

Three files: ComponentName.tsx (typed React with forwardRef and BEM classes), ComponentName.css (semantic tokens only, no raw hex or pixel values), and ComponentName.stories.tsx (Storybook stories using satisfies Meta and autodocs).

Why does the build fail after creating a new component folder?

The validate-component-registry script fails on any unregistered folder. You must add an entry to src/components/registry.json and commit the regenerated derived files, or CI's drift guard will also fail.

Can a new component use hardcoded colors or pixel values in CSS?

No. CSS must use semantic tokens exclusively. A genuinely unavoidable value needs a ds-allow comment directive at the site plus a note in the component's design.md spec, enforced by validate-css-directives.

Does every component prop need a JSDoc description?

Yes, it is build-enforced by validate-prop-docs. The JSDoc feeds Storybook's props table, the published .d.ts, and the machine-readable prop API served to agents, so missing descriptions fail the build.