creating-components — React component creation creating-components, nuclear-xrd, community, React component creation, ide skills, creating-components install, UI component development, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Frontend Agents needing structured React component creation with class-variance-authority. Creating-components is a skill that allows developers to create and manage UI components using a standardized structure and implementation pattern.

Features

Generates component structure with MyComponent.tsx, MyComponent.test.tsx, and index.ts files
Supports testing with Vitest snapshots
Utilizes class-variance-authority for styling and layout management
Compatible with React and ComponentProps
Exports components from packages/ui/src/components/index.ts
Follows a standardized implementation pattern with tsx files

# Core Topics

NuclearPlayer NuclearPlayer
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The creating-components skill by NuclearPlayer is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for React component creation, creating-components install, UI component development.

Ideal Agent Persona

Perfect for Frontend Agents needing structured React component creation with class-variance-authority.

Core Value

Empowers agents to build and export reusable UI components using React and class-variance-authority, providing a standardized approach to component development with Vitest snapshots and TypeScript.

Capabilities Granted for creating-components

Building reusable UI components
Exporting components for cross-project usage
Implementing consistent component testing with Vitest

! Prerequisites & Limits

  • Requires React and class-variance-authority setup
  • TypeScript configuration necessary
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

creating-components

Install creating-components, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Creating UI Components

Component Structure

packages/ui/src/components/MyComponent/
├── MyComponent.tsx      # Implementation
├── MyComponent.test.tsx # Tests
├── index.ts             # Re-exports
└── __snapshots__/       # Vitest snapshots (auto-generated)

After creating, export from packages/ui/src/components/index.ts.

Implementation Pattern

tsx
1import { cva, VariantProps } from 'class-variance-authority'; 2import { ComponentProps, FC } from 'react'; 3import { cn } from '../../utils'; 4 5const variants = cva('base-classes', { 6 variants: { /* ... */ }, 7 defaultVariants: { /* ... */ }, 8}); 9 10type MyComponentProps = ComponentProps<'div'> & VariantProps<typeof variants>; 11 12export const MyComponent: FC<MyComponentProps> = ({ 13 className, 14 variant, 15 ...props 16}) => ( 17 <div className={cn(variants({ variant, className }))} {...props} /> 18);

Tests

What to test:

  • Snapshots (1-2 covering key variants)
  • User interactions
  • Behavior (callbacks called with correct args)

What NOT to test:

  • CSS classes, attributes (use snapshots instead)
  • Internal state
  • Things TypeScript already enforces

Consolidate tests. One test can cover multiple related assertions. An exception to that is snapshot tests - one snapshot per variant/state.

Stories

Create packages/storybook/src/MyComponent.stories.tsx.

One story can show multiple related variants. For example, it's wasteful to create a story for each variant of a button. Put them all together in one place. Don't create separate stories for each variant:

tsx
1import { Meta, StoryObj } from '@storybook/react-vite'; 2import { useState } from 'react'; 3import { MyComponent } from '@nuclearplayer/ui'; 4 5const meta = { 6 title: 'Components/MyComponent', 7 component: MyComponent, 8 tags: ['autodocs'], 9} satisfies Meta<typeof MyComponent>; 10 11export default meta; 12type Story = StoryObj<typeof MyComponent>; 13 14export const AllVariants: Story = { 15 render: () => { 16 const [state, setState] = useState(initialState); 17 return ( 18 <div className="flex flex-col gap-4"> 19 {/* Show all variants, states, interactions */} 20 </div> 21 ); 22 }, 23};

This isn't an iron rule, sometimes it will make more sense to have separate stories.

Don't run storybook build checks.

Avoiding Duplication

Before creating a new component, check if an existing one can be extended.

Pattern: Discriminated unions for mode variants

Example: Instead of creating SingleSelect and MultiSelect components:

tsx
1type Props = 2 | { multiple?: false; selected: string; onChange: (id: string) => void } 3 | { multiple: true; selected: string[]; onChange: (ids: string[]) => void };

TypeScript enforces correct types based on the multiple prop.

Classes for customization

Where it's likely that a component will need custom styling, expose a className prop.

If there are many parts that may need styling, consider exposing a classes prop with specific class names for each part. Define a type for the classes prop. Refer to packages/ui/src/components/TrackTable/types.ts for an example.

Strings

All user-facing strings go through i18n - no hardcoded UI text. If a new component in the ui package needs labels and other kinds of localized text, it should accept a labels prop with the relevant strings. The prop should have its own type defined. Refer to packages/ui/src/components/QueueItem/types.ts for an example.

Accessibility

We don't care about that. If there's an opportunity to handle that easily, do it, but don't go out of your way.

Checklist

  • Component in packages/ui/src/components/MyComponent/
  • Exported from packages/ui/src/components/index.ts
  • Tests cover behavior, not implementation
  • Tests consolidated (not one per variant)
  • One story showing all variants
  • No CSS class assertions in tests
  • No duplicate component when extending existing one works

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is creating-components?

Perfect for Frontend Agents needing structured React component creation with class-variance-authority. Creating-components is a skill that allows developers to create and manage UI components using a standardized structure and implementation pattern.

How do I install creating-components?

Run the command: npx killer-skills add NuclearPlayer/nuclear-xrd. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for creating-components?

Key use cases include: Building reusable UI components, Exporting components for cross-project usage, Implementing consistent component testing with Vitest.

Which IDEs are compatible with creating-components?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for creating-components?

Requires React and class-variance-authority setup. TypeScript configuration necessary.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add NuclearPlayer/nuclear-xrd. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use creating-components immediately in the current project.

Related Skills

Looking for an alternative to creating-components or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI