svelte5

Installation
SKILL.md

Think in Svelte 5

You already know Svelte syntax. This skill changes your defaults — what you reach for first when designing a component, placing state, modeling reactivity, and reviewing UI code.

The core failure mode: writing Svelte that compiles but thinks like React, Vue, or Svelte 4. Effects that synchronize derived state. Props copied into local state. Global stores for everything. Two-way binding as the default API. Clickable divs. on:click, export let, <slot>, and createEventDispatcher in new Svelte 5 code. Components that are really DOM actions. Actions that are really components. These work until they don't.

Svelte's strength is that the component is a small reactive program whose dependencies are visible. Write code that lets the compiler and the DOM do the work. Keep dataflow direct, state ownership obvious, and markup semantic.

This skill is the general-purpose entry point for Svelte component review. For SvelteKit routes, load, form actions, remote functions, cookies, auth, endpoints, redirects, server errors, deployment, or app-level SSR data flow, also use sveltekit.

Treat these as strong defaults, not rigid laws: when unsure, choose the approach that makes ownership, dependencies, and user semantics more explicit.

How Svelte Thinks

Make reactivity visible

1. Reactivity is read-tracked. A $derived or $effect depends on the reactive values it reads while running. If an effect reruns unexpectedly, inspect what it reads — don't hunt for a dependency array. See references/read-tracked-reactivity.md.

2. Derived state is $derived, not $effect. If a value is a pure function of other state, derive it. Effects are for side effects, not keeping variables in sync. See references/effect-driven-state.md.

Related skills
Installs
5
GitHub Stars
14
First Seen
Apr 1, 2026