svelte-5

Convert Svelte 4 stores to Svelte 5 runes with SSR guidance.

1|2|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/kynetic-ai/kynetic-spec --skill svelte-5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: svelte-5
Source: https://github.com/kynetic-ai/kynetic-spec/tree/main/.claude/skills/svelte-5
Command: npx skills add https://github.com/kynetic-ai/kynetic-spec --skill svelte-5

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Svelte 5 introduces runes for reactivity, but developers face a learning curve, migration challenges, and hydration pitfalls across SSR and client contexts.

Core Features & Use Cases

  • Rune-based reactivity patterns: use $state, $derived, and $effect for concise, predictable state management.
  • SSR and hydration guidance: decide when to disable SSR and how to hydrate across adapters.
  • Migration best practices: convert Svelte 4 stores to Svelte 5 runes and modularize shared state in .svelte.ts.
  • Practical patterns for components and tooling: update snippets and templates to avoid invalid snippet errors.

Quick Start

Explain how to convert a simple counter component from Svelte 4 stores to Svelte 5 runes and apply an appropriate SSR strategy.

Frequently Asked Questions about svelte-5

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

FAQPage Schema
How do I migrate Svelte 4 stores to Svelte 5 runes?

Svelte 5 runes replace stores using `$state` for reactive variables, `$derived` for computed values, and `$effect` for side effects. This migration modularizes shared state logic into `.svelte.ts` files for predictable reactivity.

What is the difference between $state, $derived, and $effect in Svelte 5?

In Svelte 5 reactivity, `$state` declares reactive variables, `$derived` calculates computed values from that state, and `$effect` synchronizes side effects. These runes provide concise, predictable state management without explicit store subscriptions.

How do I handle SSR and hydration issues in SvelteKit with Svelte 5?

Handle SSR and hydration issues in SvelteKit by deciding when to disable SSR for client-only components. Apply appropriate hydration strategies across adapters to avoid runtime errors during server-side rendering with Svelte 5 runes.

When should I disable SSR for Svelte 5 reactive components?

Disable SSR for Svelte 5 components when handling client-only rendering scenarios that cause hydration mismatches or unsafe constructs. This prevents runtime errors by ensuring reactive state initializes exclusively in the browser environment.

Why am I getting invalid snippet errors after updating to Svelte 5?

Invalid snippet errors in Svelte 5 occur when component templates use outdated syntax. Update snippets and templates to match Svelte 5 patterns, replacing legacy store syntax with rune-based reactivity to resolve these tooling errors.