svelte-runes

Document Svelte runes like $state, $derived, and $effect for reactivity.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/sandalsoft/agent-skills --skill svelte-runes-sandalsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: svelte-runes
Source: https://github.com/sandalsoft/agent-skills/tree/main/svelte-runes
Command: npx skills add https://github.com/sandalsoft/agent-skills --skill svelte-runes-sandalsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Svelte runes guidance helps developers avoid common reactivity mistakes when using top-level runes like $state, $derived, $effect, $props, and $bindable, providing a clear mental model and patterns.

Core Features & Use Cases

  • Guidance on using runes for reactive state, derived values, side effects, props, and bindable props.
  • Migration tips between Svelte 4 and 5, with practical examples and anti-patterns.
  • Reference patterns, best practices, and a library of examples and references to accelerate adoption.

Quick Start

Create a small Svelte component that defines a reactive state with $state, a derived value with $derived, and a simple side effect with $effect to verify reactivity behavior.

Frequently Asked Questions about svelte-runes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Svelte runes for reactive state and side effects?

To use Svelte runes for reactive state and side effects, define $state for reactive variables, $derived for computed values, and $effect to trigger side effects, establishing a clear mental model that prevents common reactivity mistakes.

What is the best way to migrate reactivity from Svelte 4 to 5?

The best way to migrate from Svelte 4 to 5 is replacing reactive declarations with top-level runes like $state and $derived, utilizing provided migration tips and anti-pattern examples to ensure correct reactivity behavior.

How does $derived work compared to reactive declarations in Svelte?

$derived works by explicitly computing values from other reactive $state variables, replacing Svelte 4 reactive declarations. This explicit rune usage prevents reactivity mistakes and creates reusable patterns across components.

When do I need $props and $bindable in Svelte component design?

You need $props and $bindable in Svelte component design when passing data into components and creating two-way binding. These runes provide explicit, structured guidance for component inputs and prevent reactivity anti-patterns.

Why does my Svelte 5 component have reactivity mistakes with top-level runes?

Reactivity mistakes in Svelte 5 components often happen when top-level runes like $state, $derived, or $effect are applied incorrectly. Following documented best practices and anti-pattern references helps correct this reactive state behavior.