svelte/migration/writable-stores

Convert Svelte writable stores and $state runes into Redux slices with actions and reducers.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill svelte-migration-writable-stores-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: svelte/migration/writable-stores
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/themis/svelte/migration/writable-stores
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill svelte-migration-writable-stores-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating Svelte 4 writable/readable stores or Svelte 5 $state runes into a Redux architecture requires rewriting every set/update call as dispatched actions and reducers, and doing it wrong introduces non-serializable state, mutations, or side effects that break persistence and selector memoization. ## Core Features & Use Cases - Store-to-Slice Conversion: Transforms writable() stores and $state runes into an initialState + createAction + createReducer trio using the Themis store utilities. - Update Call Migration: Rewrites store.set() and store.update() calls as dispatch(action()) invocations in components. - Pitfall Guardrails: Documents serializability rules (Date to timestamp, Map to Record), immutability requirements, and the rule that reducers must stay pure with effects moved to sagas. - Use Case: When porting a Svelte component that holds preferences in a $state object, produce a preferences slice with setTheme and setSidebarOpen actions and a typed reducer. ## Quick Start Ask the AI to convert a Svelte writable store or $state rune, including its set and update calls, into a Themis Redux slice with actions and a reducer.

Frequently Asked Questions about svelte/migration/writable-stores

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

FAQPage Schema
How do I migrate a Svelte writable store to Redux?▼

Define a typed state interface and initialState matching the store's value, create setter actions with createAction, and handle them in a createReducer chain. Replace store.set and store.update calls with dispatch(action()) in components.

How to convert Svelte 5 $state runes to Redux slices?▼

Treat the $state initial value as the slice's initialState, create one action per mutation pattern, and replace direct rune assignments with dispatched actions. Object-shaped runes become serializable slice state with one action per field.

Can Redux state contain Date or Map objects?▼

No, Redux state must be JSON-serializable. Store Date values as timestamps or ISO strings, Map as Record<string, V>, Set as arrays or Record<string, true>, and move Promises into sagas.

Why should reducers return the same state reference for no-op updates?▼

Returning a fresh object for an unchanged value invalidates selector memoization and triggers unnecessary re-renders. Check whether the incoming value equals current state and return the original state reference when nothing changed.

Where do side effects go when migrating Svelte stores to Redux?▼

Reducers must be pure functions with no fetch, localStorage, or Date.now calls. Move persistence and other effects into redux-saga sagas that react to the dispatched actions.