Help us improve
Share bugs, ideas, or general feedback.
Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development. Use when writing, reviewing, or refactoring Svelte 5 components and SvelteKit applications. Triggers on: Svelte components, runes ($state, $derived, $effect, $props, $bindable, $inspect), snippets ({#snippet}, {@render}), event handling, SvelteKit data loading, form actions, Svelte 4 to Svelte 5 migration, store to rune migration, slots to snippets migration, TypeScript props typing, generic components, SSR state isolation, performance optimization, or component testing.
npx claudepluginhub ejirocodes/agent-skills --plugin svelte5-best-practicesHow this skill is triggered — by the user, by Claude, or both
Slash command
/svelte5-best-practices:svelte5-best-practicesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Topic | When to Use | Reference |
Enforces Svelte 5 best practices in SvelteKit: runes ($state, $derived, $effect), $props(), $bindable(), load functions, form actions, and SSR patterns to fix outdated Svelte 4 code.
Provides Svelte 5.0 knowledge patch on runes ($state, $derived, $effect, $props), snippets replacing slots, callback props for events, mount/hydrate API. Auto-loads for Svelte tasks.
Guides Svelte 5 runes for reactive state ($state), derived values ($derived), effects ($effect), props ($props/$bindable), migration from Svelte 4, and common mistake prevention.
Share bugs, ideas, or general feedback.
| Topic | When to Use | Reference |
|---|---|---|
| Runes | $state, $derived, $effect, $props, $bindable, $inspect | runes.md |
| Snippets | Replacing slots, {#snippet}, {@render} | snippets.md |
| Events | onclick handlers, callback props, context API | events.md |
| TypeScript | Props typing, generic components | typescript.md |
| Migration | Svelte 4 to 5, stores to runes | migration.md |
| SvelteKit | Load functions, form actions, SSR, page typing | sveltekit.md |
| Performance | Universal reactivity, avoiding over-reactivity, streaming | performance.md |
<script>
let count = $state(0); // Reactive state
let doubled = $derived(count * 2); // Computed value
</script>
<script>
let { name, count = 0 } = $props();
let { value = $bindable() } = $props(); // Two-way binding
</script>
<script>
let { children, header } = $props();
</script>
{@render header?.()}
{@render children()}
<!-- Svelte 5: use onclick, not on:click -->
<button onclick={() => count++}>Click</button>
<script>
let { onclick } = $props();
</script>
<button onclick={() => onclick?.({ data })}>Click</button>
let without $state - Variables are not reactive without $state()$effect for derived values - Use $derived insteadon:click syntax - Use onclick in Svelte 5createEventDispatcher - Use callback props instead<slot> - Use snippets with {@render}$bindable() - Required for bind: to workPromise.all for parallel requests