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-developertools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.