What problem does it solve?
This Skill provides expert guidance on Svelte 5's new runes system, helping you correctly implement reactive state, props, and effects, and smoothly migrate from Svelte 4 while avoiding common reactivity mistakes and syntax conflicts.
Core Features & Use Cases
- Reactive State Management: Master
$state() for mutable state, $derived() for computed values, and $effect() for side effects with automatic cleanup.
- Component API Patterns: Learn
$props() for prop declarations and $bindable() for seamless two-way data binding.
- Svelte 4 to 5 Migration: Comprehensive translation guide for reactive statements, event handlers, and slot-to-snippet conversions.
- Common Mistakes & Fixes: Identifies and provides solutions for anti-patterns like mixing Svelte 4/5 syntax, infinite loops, and incorrect rune usage.
- Use Case: Migrate an existing Svelte 4 component to Svelte 5, converting
export let to $props(), reactive statements to $derived() or $effect(), and on:click to onclick.
Quick Start
Use the svelte5-runes skill to explain the difference between $derived() and $effect() with clear code examples.