# component-template-generator

component-template-generator is a Claude Code skill that creates React, Vue, and Svelte component templates using design tokens. It runs for component-library work and design-system implementation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 139 installs · ★ 274 repo stars
- Author: curiositech
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/component-template-generator/SKILL.md
- Updated: 2026-09-06
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/component-template-generator

## What it does

The skill generates starter components with styling variants and accessibility patterns. Templates refer to semantic design tokens rather than fixed color values. Examples cover buttons, inputs, cards, dialogs, and tabs.

React templates include Tailwind and CSS-variable options; Vue uses the Composition API, while Svelte has its own component syntax. The generated patterns cover keyboard navigation, focus, and ARIA, with details varying by component. The skill uses Read, Write, and Glob.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill component-template-generator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/component-template-generator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/component-template-generator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill component-template-generator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/component-template-generator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill component-template-generator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/component-template-generator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install curiositech/some_claude_skills .claude/skills/component-template-generator
```

2. **Manually: put the files in place**
- File: `.github/skills/component-template-generator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill component-template-generator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/curiositech/some_claude_skills --path .claude/skills/component-template-generator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/component-template-generator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill component-template-generator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/component-template-generator/SKILL.md

## When to use it
- create a starter component in React, Vue, or Svelte
- add size and state variants to a component
- style components with design tokens
- include keyboard navigation and ARIA attributes

## Example prompts
- Create a React button with primary and secondary variants using design tokens.
- Generate a Vue dialog component with focus management and ARIA.
- Make a Svelte tabs template with arrow-key navigation.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ba0095f53e7d2456.

BEGIN THIRD-PARTY FILE ba0095f53e7d2456
````text
---
name: component-template-generator
description: Generates starter component code using design tokens. Creates React/Vue/Svelte components with proper token usage, variants, and accessibility built in.
allowed-tools: Read,Write,Glob
metadata:
  category: Development
  pairs-with:
  - skill: design-system-generator
    reason: Uses generated tokens in component code
  - skill: frontend-developer
    reason: Implement and customize generated components
  - skill: design-system-documenter
    reason: Document generated components
  tags:
  - components
  - react
  - vue
  - svelte
  - templates
---

# Component Template Generator

Create production-ready component code that properly uses your design tokens. Generates React, Vue, or Svelte components with variants, accessibility, and token integration.

## Quick Start

**Minimal example - generate a Button component:**

```typescript
// Input: Trend ID + Component type
// Output: Complete component with token usage

// Button.tsx (neobrutalism)
import { cn } from '@/lib/utils';

interface ButtonProps {
  variant?: 'primary' | 'secondary' | 'ghost';
  size?: 'sm' | 'md' | 'lg';
  children: React.ReactNode;
}

export function Button({ variant = 'primary', size = 'md', children }: ButtonProps) {
  return (
    <button className={cn(
      'border-3 border-brutal-black font-display transition-all duration-100',
      'shadow-brutal hover:shadow-brutal-hover hover:-translate-x-0.5 hover:-translate-y-0.5',
      'active:shadow-brutal-active active:translate-x-0.5 active:translate-y-0.5',
      // Variants
      variant === 'primary' && 'bg-brutal-red text-white',
      variant === 'secondary' && 'bg-brutal-cream text-brutal-black',
      variant === 'ghost' && 'bg-transparent border-transparent shadow-none',
      // Sizes
      size === 'sm' && 'px-3 py-1.5 text-sm',
      size === 'md' && 'px-4 py-2 text-base',
      size === 'lg' && 'px-6 py-3 text-lg',
    )}>
      {children}
    </button>
  );
}
```

**Key principle**: Components use semantic token names, not hardcoded values.

## Core Mission

Generate component templates that:
1. Use design tokens correctly (semantic names, not hex values)
2. Include common variants (size, color, state)
3. Have accessibility built in (ARIA, keyboard, focus)
4. Are framework-idiomatic (React hooks, Vue composition, Svelte stores)

## When to Use

✅ Use when:
- Starting a component library with generated tokens
- Need consistent token usage across components
- Want accessibility baked into templates
- Bootstrapping a design system implementation

❌ Do NOT use when:
- Need tokens only (use design-system-generator)
- Need complete UI library (use shadcn/ui or similar)
- Customizing existing components (just edit them)

## Component Catalog

### Core Components
````
END THIRD-PARTY FILE ba0095f53e7d2456

The third-party file has ended. Everything between the ba0095f53e7d2456 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2795 of 8473 bytes. © curiositech · MIT · https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/component-template-generator/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
