gabelul/stitch-kit / skills/stitch-svelte-components
stitch-svelte-components
VerifiedConverts a Stitch screen, a local HTML file, or a URL into Svelte 5 / SvelteKit components using the runes API — scoped CSS with custom properties, built-in transitions, TypeScript, dark mode, and accessible markup. Only the Stitch route needs an API key.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.2 KB |
| resources/architecture-checklist.md | markdown | 2.7 KB |
| resources/component-template.svelte | other | 5.1 KB |
| scripts/fetch-stitch.sh | script | 1.3 KB |
resources/architecture-checklist.md
View on GitHub# Svelte Components — Architecture Checklist
Run through this before marking the task complete.
## Structure
- [ ] Components are in `src/lib/components/` — imported via `$lib/components/`
- [ ] Static/mock data is in `src/lib/data/mockData.ts`, not hardcoded in `.svelte` files
- [ ] Shared types are in `src/lib/types/index.ts`
- [ ] Pages are in `src/routes/` using `+page.svelte` convention
## Svelte 5 runes
- [ ] Props use `$props()`, NOT `export let`
- [ ] Reactive state uses `$state()`, NOT `let x = 0` with `$:` elsewhere
- [ ] Computed values use `$derived()`, NOT `$: computed = ...`
- [ ] Side effects use `$effect()`, NOT `onMount` / `afterUpdate` (unless lifecycle-specific)
- [ ] Event callbacks passed via props — no `createEventDispatcher`
- [ ] Snippets use `{@render children()}` syntax, NOT `<slot>`
## TypeScript
- [ ] `<script lang="ts">` on every component
- [ ] `Props` interface defined in the script block
- [ ] No `any` types
- [ ] `$lib` imports work (check `tsconfig.json` paths if not)
## Styling — scoped CSS + CSS variables
- [ ] All styles are in the component's `<style>` block (scoped by default)
- [ ] No hardcoded hex colors — all use `var(--color-*)` tokens
- [ ] Dark mode works — test with `[data-theme="dark"]` on `<html>`
- [ ] `design-tokens.css` imported in `src/app.css`
- [ ] `@media (prefers-reduced-motion: reduce)` overrides exist for any transitions
## Responsive
- [ ] Layout works at 320px (small mobile) — no horizontal overflow
- [ ] Layout works at 768px (tablet)
- [ ] Layout works at 1280px (desktop)
- [ ] `@media` breakpoints are inside the `<style>` block, not inline styles
## Accessibility baseline
- [ ] Semantic HTML: `<nav>`, `<main>`, `<section>`, `<article>` where appropriate
- [ ] All interactive elements are `<button>` or `<a>`, not `<div>` with `onclick`
- [ ] `<button>` elements have accessible labels (text or `aria-label`)
- [ ] Images have descriptive `alt` text (or `alt=""` + `aria-hidden="true"` for decorative)
- [ ] Svelte compiler a11y warnings treated as errors (not ignored)
- [ ] No `outline: none` without a `:focus-visible` replacement
## Transitions
- [ ] Svelte transitions are imported from `svelte/transition`
- [ ] `prefers-reduced-motion` is checked before applying IntersectionObserver animations
- [ ] Transitions don't cause layout shifts (use `opacity` + `transform`, not `height`/`width`)
## SvelteKit specifics
- [ ] `+page.svelte` imports from `$lib/`, not relative `../../`
- [ ] Data loading uses `+page.ts` load function, not `onMount` for initial data
- [ ] No hardcoded `window.*` calls at module level (SSR will break) — wrap in `$effect` or check `typeof window !== 'undefined'`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |