home / skills / ehtbanton / claudeskillsrepo / svelte-component-generator
This skill generates complete Svelte components in TypeScript with scoped CSS, instantly producing Button.svelte or similar files.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill svelte-component-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: svelte-component-generator
description: Generate Svelte components with TypeScript and scoped styles. Triggers on "create svelte component", "generate svelte file", "svelte module", ".svelte component".
---
# Svelte Component Generator
Generate Svelte components with TypeScript and scoped CSS.
## Output Requirements
**File Output:** `*.svelte` component files
**Format:** Valid Svelte 5
**Standards:** Svelte 5 with TypeScript
## When Invoked
Immediately generate a complete Svelte component with props and styles.
## Example Invocations
**Prompt:** "Create Svelte button component"
**Output:** Complete `Button.svelte` with variants.
This skill generates complete Svelte 5 components written in TypeScript with scoped styles. It produces ready-to-drop .svelte files that include typed props, events, and CSS encapsulated to the component. Use it to quickly scaffold production-ready UI elements, controls, and modules.
When triggered by phrases like "create svelte component" or "generate svelte file", the skill parses your prompt to infer component name, props, variants, and behaviors. It emits a single .svelte file using Svelte 5 syntax, TypeScript script blocks, and scoped <style> rules, plus example usage and accessibility considerations when applicable. Outputs follow common patterns (props typing, event forwarding, slots) so the component integrates smoothly into an app.
Which Svelte version and language are used?
Outputs are written for Svelte 5 and use TypeScript in the component script block.
What file does the skill produce?
It produces a single .svelte component file per request with props, events, slots, and scoped CSS.