with-svelte
Installation
SKILL.md
with-svelte
Unified Svelte 5 + SvelteKit skill. This body is a router: apply the always-on core below, then READ the one reference file that matches the task before writing code. Load only the file(s) you need — not all of them.
Always-on core (every Svelte task)
Write runes-mode Svelte 5. Never reach for a legacy feature that has a modern replacement:
$stateinstead of implicitlet count = 0; count += 1$derived/$effectinstead of$:— and prefer$derivedover$effect(effects are an escape hatch; never set state inside one)$propsinstead ofexport let,$$props,$$restPropsonclick={...}instead ofon:click={...}{#snippet}/{@render}instead of<slot>,$$slots,<svelte:fragment>{@attach ...}instead ofuse:action<DynamicComponent>instead of<svelte:component this={...}>;import Selfinstead of<svelte:self>- classes with
$statefields instead of stores;createContextinstead ofsetContext/getContext - clsx-style class arrays/objects instead of the
class:directive - keyed
{#each}— never use the index as the key