Skip to content
onewave-ai avatar

React Component Generator

Generates TypeScript React components with typed props, accessibility attributes, and Client or Server component variants.

CCM score
47 of 100
skills.sh installs
350
GitHub stars
451
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the workflow of choosing a Client or Server component, defining a typed props interface, and implementing the component
  • Includes templates for a styled Button with variants and loading state, a Server UserList, and a LoginForm built on React Hook Form and Zod
  • Enforces accessibility through aria-busy, aria-invalid, aria-describedby, semantic HTML, and role attributes, backed by a checklist
  • Designed for developers creating new UI elements or refactoring existing React components in Next.js-style projects

Install

$ npx -y skills add onewave-ai/claude-skills --skill react-component-generator -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

React Component Generator

Instructions

When creating React components:

  1. Determine component type: Client or Server component
  2. Define props interface with TypeScript
  3. Implement with best practices
  4. Add accessibility attributes

Templates

Client Component

'use client';

import { useState, useCallback } from 'react';
import { cn } from '@/lib/utils';

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  variant?: 'primary' | 'secondary' | 'ghost';
  size?: 'sm' | 'md' | 'lg';
  isLoading?: boolean;
  children: React.ReactNode;
}

export function Button({
  variant = 'primary',
  size = 'md',
  isLoading = false,
  children,
  className,
  disabled,
  ...props
}: ButtonProps) {
  const baseStyles = 'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2';

  const variants = {
    primary: 'bg-blue-600 text-white hover:bg-blue-700',
    secondary: 'bg-gray-200 text-gray-900 hover:bg-gray-300',
    ghost: 'hover:bg-gray-100',
  };

  const sizes = {
    sm: 'h-8 px-3 text-sm',
    md: 'h-10 px-4',
    lg: 'h-12 px-6 text-lg',
  };

Details

Repository
github.com/onewave-ai/claude-skills
Category
Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the react-component-generator skill do?

react-component-generator generates React components with TypeScript, typed props, hooks, and accessibility attributes. It covers client components, server components, and form components built with React Hook Form and Zod validation.

How do I install the react-component-generator skill?

Run npx -y skills add onewave-ai/claude-skills --skill react-component-generator -y in your project. After that, react-component-generator lets the agent create new React components and refactor existing ones.

Which skills lead the Frontend and UI Code category with react-component-generator?

react-component-generator sits in the Frontend and UI Code category alongside vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns, and lark-apps. Its focus is generating new components from templates with accessibility checks built in.

Does react-component-generator require any tools or accounts?

react-component-generator assumes a React project with TypeScript and uses cn from a lib/utils file, plus react-hook-form, zod, and @hookform/resolvers for the form template. The server component template also expects a db client at lib/db.

More from onewave-ai/claude-skills

All 104

Similar to React Component Generator

More Frontend & UI Code