skills/component-template-generator/SKILL.md
Generates starter component code using design tokens. Creates React/Vue/Svelte components with proper token usage, variants, and accessibility built in.
npx skillsauth add curiositech/windags-skills component-template-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create production-ready component code that properly uses your design tokens. Generates React, Vue, or Svelte components with variants, accessibility, and token integration.
Component request → Framework choice:
├── React requested or TypeScript heavy → React + TypeScript
│ ├── Has Tailwind tokens → React + Tailwind template
│ └── Has CSS variables → React + CSS Modules template
├── Vue requested or composition API mentioned → Vue 3 + Composition API
│ ├── Has Tailwind tokens → Vue + Tailwind template
│ └── Has CSS variables → Vue + CSS Variables template
├── Svelte requested or lightweight mentioned → Svelte template
└── No framework specified → Default to React + TypeScript
Component type → Template complexity:
├── Simple (Button, Badge, Input) → Single file template
│ ├── <5 props → Basic variant system
│ └── 5+ props → Props interface + defaults
├── Composite (Card, Dialog, Accordion) → Multi-part template
│ ├── Has children slots → Compound component pattern
│ └── State management needed → Hook/composable pattern
├── Interactive (Dropdown, Tabs, Toggle) → Full template + logic
│ └── Always include → Keyboard handlers + ARIA
└── Layout (Container, Grid, Stack) → Responsive template
└── Always include → Breakpoint variants
Number of variants → Implementation:
├── 2-3 variants → Simple string union + className mapping
├── 4-8 variants → Object-based variant system
├── 8+ variants → Compound variants (size × color × state)
└── Complex states → Separate state management hook
#FF0000, rgb(255,0,0), or red-500 instead of brutal-redbg-brand-primary, text-error-500aria-label, dialog missing aria-modal, or form input without aria-describedbyrole, aria-label, aria-expanded, aria-describedbyvariant="primary" ghost={true} or size conflicts create broken layoutsvariant: 'primary' | 'ghost' | 'primary-ghost'variant, size, appearance, plus spread native element propsInput: Generate neobrutalism Button for React + Tailwind with primary/secondary variants
Decision Process:
Generated Output:
import { forwardRef } from 'react';
import { cn } from '@/lib/utils';
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'primary' | 'secondary';
size?: 'sm' | 'md' | 'lg';
}
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ variant = 'primary', size = 'md', className, children, ...props }, ref) => {
return (
<button
ref={ref}
className={cn(
// Base neobrutalism styles
'border-3 border-brutal-black font-display font-bold uppercase',
'shadow-brutal transition-all duration-100',
'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',
// Focus accessibility
'focus:outline-none focus-visible:ring-2 focus-visible:ring-brutal-blue',
// Variants using tokens
variant === 'primary' && 'bg-brutal-red text-white',
variant === 'secondary' && 'bg-brutal-yellow text-brutal-black',
// 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',
className
)}
{...props}
>
{children}
</button>
);
}
);
Button.displayName = 'Button';
Expert Catches vs Novice Misses:
forwardRef for DOM ref forwarding...propsbrutal-red)bg-red-500)Do NOT use this skill for:
design-system-generator skill insteaddesign-system-documenter skill for Storybook/docsDelegate to other skills:
design-system-generatordesign-system-documenterfrontend-developertest-driven-developerdata-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.