Create New Component

Generate React components with TypeScript definitions and Storybook stories.

24|10|Updated Jan 8, 2025
One-click install
npx skills add https://github.com/ethpandaops/lab --skill create-new-component-ethpandaops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Create New Component
Source: https://github.com/ethpandaops/lab/tree/main/.claude/skills/create-new-component
Command: npx skills add https://github.com/ethpandaops/lab --skill create-new-component-ethpandaops

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the creation of new React components by enforcing established architecture patterns, ensuring consistency and maintainability across the codebase.

Core Features & Use Cases

  • Guided Component Creation: Follows a structured process for generating new React components.
  • Architecture Enforcement: Ensures adherence to patterns for core vs. page-scoped components, TypeScript typing, and Storybook integration.
  • Use Case: A developer needs to create a new reusable button component for the application's UI. This Skill will guide them through creating the Button component in the correct directory (src/components/Elements/Button), defining its props, variants, and generating Storybook stories.

Quick Start

Use the create new component skill to build a reusable 'UserProfileCard' component for the 'common' category.

Frequently Asked Questions about Create New Component

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

FAQPage Schema
How do I generate a new React component with TypeScript and Storybook automatically?

To generate a new React component with TypeScript and Storybook, this Skill automates the creation of TypeScript definitions, semantic Tailwind CSS tokens, and Storybook stories while enforcing architectural patterns for reusable UI elements.

What is the best way to structure reusable React components versus page-scoped components?

The best way to structure reusable versus page-scoped React components is to enforce specific architectural directories, which this Skill automates by placing core UI elements and page-level elements in their designated paths.

How do I create a React component that uses semantic Tailwind CSS tokens?

You create a React component using semantic Tailwind CSS tokens by utilizing a guided generation process that enforces adherence to established Tailwind architecture, ensuring maintainability and design system consistency across the codebase.

Does this component generation process support both core UI elements and page-specific layouts?

Yes, the component generation process supports both core UI elements and page-specific layouts by enforcing distinct architectural patterns that separate reusable core components from page-scoped components during creation.

Can I automatically generate Storybook stories when creating a new React UI component?

Yes, you can automatically generate Storybook stories when creating a new React UI component, as the Skill includes Storybook integration specifically for core reusable components to document their props and variants.

Why should I use a guided generator for frontend component creation instead of manual scaffolding?

You should use a guided generator for frontend component creation instead of manual scaffolding because it enforces established architecture patterns, ensuring TypeScript typing, correct directory placement, and Storybook integration are consistently configured across the codebase.