shipit-ai:ui-component

Generate React UI components with Storybook stories and unit tests.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/jrmatherly/shipit --skill shipit-ai-ui-component
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shipit-ai:ui-component
Source: https://github.com/jrmatherly/shipit/tree/main/.claude/skills/shipit-ui-component
Command: npx skills add https://github.com/jrmatherly/shipit --skill shipit-ai-ui-component

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Front-end teams often produce inconsistent, untested, and undocumented UI components that cause regressions, slow reviews, and brittle integrations. This Skill codifies component structure, testing, and Storybook requirements so every component is discoverable, testable, and consistent across the codebase.

Core Features & Use Cases

  • Tiered architecture enforcement: Enforces the four-tier import rules (ui, common, layouts, features) and correct file placement to prevent circular or inappropriate dependencies.
  • Component conventions & templates: Requires named exports, exported props interfaces, className merging via cn(), and a root data-testid for reliable testing.
  • Mandatory Storybook and tests: Mandates colocated stories with args for Controls, variant and edge-case stories, barrel exports, and unit tests under tests/unit/presentation/web.
  • Use Case: Add a new FeatureListItem component in components/common with a Storybook Default and variant stories, a root data-testid, an index barrel export, and a matching unit test.

Quick Start

Create a new Tier 1 React component named FeatureListItem in components/common with a colocated Storybook story that includes a Default story with args and variants, add a root data-testid, export the props interface and named export, update the common barrel export, and add a unit test under tests/unit/presentation/web/common.

Frequently Asked Questions about shipit-ai:ui-component

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

FAQPage Schema
How do I generate React components with Storybook stories and unit tests?

You generate React components with Storybook stories and unit tests by enforcing named exports, colocated stories with args for Controls, and unit tests under tests/unit/presentation/web. This ensures every UI component is discoverable and consistently structured.

What is the best way to enforce a tiered architecture for React UI components?

Enforcing a tiered architecture for React UI components requires applying four-tier import rules (ui, common, layouts, features) and correct file placement in src/presentation/web/components. This prevents circular or inappropriate dependencies across your presentation layer.

How do I add a data-testid to a React component for reliable testing?

You add a data-testid to a React component by mandating a root data-testid attribute during component generation. This standardizes testing selectors across your codebase, ensuring reliable unit tests and preventing brittle DOM queries.

Does this React component generator support barrel exports and className merging?

Yes, this React component generator supports barrel exports and className merging. It enforces index barrel exports for all components and mandates className merging via the cn() utility to handle conditional class names consistently.

What are the limitations of auto-generating React components with colocated Storybook stories?

The limitations of auto-generating React components with colocated Storybook stories include strict placement constraints in src/presentation/web/components and mandatory compliance with specific tier import rules. Components outside these tiers or without unit tests under tests/unit/presentation/web are not supported.