# Svelte 5 Runes and Migration

`svelte/svelte-5-runes` · Skill · v1.0.0

Correct Svelte 5 runes components, shared state modules and mount() code, and Svelte 4 ports that keep bindings, events and timing intact.

Teaches an agent the current Svelte 5 API (checked against svelte 5.57.3) and how to port Svelte 3/4 code without silent behaviour changes. It concentrates on what agents trained on Svelte 4 get wrong: export let and $: versus $props, $derived and $effect (and why syncing state in effects breaks reads outside components), missing $bindable that silently stops bind: from reaching the parent, createEventDispatcher versus callback props, slots versus snippets, runes outside .svelte.ts files, exporting reassigned module state, Map and Set inside $state, proxies that structuredClone and postMessage reject, mount() deferring onMount and bind:this until flushSync, $set replaced by a $state props object, intro transitions on mount, and testing all of it with Vitest and jsdom.

## Verdict

- level: **submitted** — In the catalog, not yet checked for this digest.
- uplift: **untested** — No runs exist for this digest.
- digest: `sha256:e5ce540fb658e723cc46f31be3726471a7170562a214f6eec5173eec641c2d43`

## Uplift runs

None for this digest. Untested is not the same as useless: nobody has measured it yet.

## Security

No checks recorded for this digest.

## Compatibility

| agent | targeted | compiled | evaluated |
| --- | --- | --- | --- |
| Claude Code | yes | no record | no record |
| Codex | yes | no record | no record |
| Cursor | yes | no record | no record |
| GitHub Copilot | yes | no record | no record |
| Gemini CLI | yes | no record | no record |
| OpenCode | yes | no record | no record |

## Permissions

- network: none
- shell: node, npm ls, npm test, npm run check, rg
- filesystem: write
- env: none

## Files

- `SKILL.md` 20783 B sha256:34886411a8c11e435ec524c7f72b307c10c84d2c25c1be5a8be011eff2f385ff
- `references/migration-svelte-4.md` 9807 B sha256:5524a778e3c99a0849b84c074bda29427e32d572cb644c64677946a00d96c827
- `references/shared-state.md` 8550 B sha256:8bc1691453060484bcbb8b2f83a86695426d2e92a67dfffcf1346cec5d7459aa
- `references/sources.md` 2804 B sha256:69c019a690a710a8bd13abfa30c711531b497c849a6d24639af154fb5f8a5a16
- `references/testing.md` 5911 B sha256:54c7df0cd4451edcab58475dea6e7c7001d9b1c0df9694f46b0c070a33f7ec90

## Limitations

- Written and verified against svelte 5.57.3 with @sveltejs/vite-plugin-svelte 7.3.1 and vitest 5.0.5. Later 5.x releases may add runes or promote experimental features; check the changelog when the installed version is newer.
- Covers Svelte itself. SvelteKit routing, load functions, form actions and remote functions are out of scope; SvelteKit 3.0 is mentioned only for its version requirements.
- Async Svelte (await in components, $state.eager, hydratable, fork) is still behind experimental.async in 5.57.3 and is described, not taught or measured.
- The proof suite runs in jsdom, which has no layout and no Element.animate, so transitions, animations and SSR hydration are covered by guidance only.
- Custom elements (customElement, $host) and Svelte Native are not covered.

## Install

```sh
npx sigil add svelte/svelte-5-runes --agent claude-code,codex,cursor
```

Source: https://github.com/dgesteves/sigil/tree/5cb851d5b2f2f14446ddf631ef5e91bf9d3263dd/catalog/skills/svelte/svelte-5-runes