
Svelte Runes
If you're working with Svelte 5's new reactivity system, this skill gives you quick reference for all the runes: $state, $derived, $effect, $props, and $bindable. It includes a compact decision tree for choosing the right one, covers the top-level-only constraint, and points you to references on migration gotchas from Svelte 4. The real value is in preventing common mistakes like mixing old and new syntax or misunderstanding that $derived can be reassigned unless you use const. It also reminds you about the new onclick syntax and snippet-based layouts, which trip up a lot of people during migration.
- skills.sh installs
- 1.1K
- GitHub stars
- 95
- last updated
- Aug 21, 2026
Install
$ npx -y skills add spences10/svelte-skills-kit --skill svelte-runes --agent claude-codeInstalls into .claude/skills of the current project.
Files
Svelte Runes
Quick Start
Which rune? Props: $props() | Bindable: $bindable() |
Computed: $derived() | Side effect: $effect() | State: $state()
Key rules: Runes are top-level only. $derived can be overridden
(use const for read-only). Don't mix Svelte 4/5 syntax.
Objects/arrays are deeply reactive by default.
Example
<script>
let count = $state(0); // Mutable state
const doubled = $derived(count * 2); // Computed (const = read-only)
$effect(() => {
console.log(`Count is ${count}`); // Side effect
});
</script>
<button onclick={() => count++}>
{count} (doubled: {doubled})
</button>
Reference Files
- reactivity-patterns.md - When to use each rune
- migration-gotchas.md - Svelte 4→5 translation
- component-api.md - $props, $bindable patterns
- snippets-vs-slots.md - New snippet syntax
- common-mistakes.md - Anti-patterns with fixes
For
@attachand other template directives, see the svelte-template-directives skill.
Notes
Sponsors
Details
- Repository
- github.com/spences10/svelte-skills-kit
- Category
- Frontend Development
- First seen
- Jun 3, 2026