Install
openclaw skills install svelteAvoid common Svelte mistakes — reactivity triggers, store subscriptions, and SvelteKit SSR gotchas.
openclaw skills install sveltearr = arr after push, or use arr = [...arr, item]arr.push() needs reassignment: arr = arrobj.key = val; obj = obj or spread: obj = {...obj, key: val}$: reactive statements run on dependency change — but only top-level assignments tracked$: runs when dependencies change — list all dependencies used$: { } block for multiple statements — all run together$: order matters — later statements can depend on earlier$: — prefer derived values, use onMount for effects$store auto-subscribes in component — automatic unsubscribe on destroyconst unsub = store.subscribe(v => ...); onDestroy(unsub)writable for read/write — readable for external data sourcesderived for computed values — derived(store, $s => $s * 2)onMount runs after first render — return cleanup functiononMount — document etc. not available in SSRbeforeUpdate / afterUpdate for DOM sync — rarely neededtick() to wait for DOM update — await tick() after state changeexport let propName to declare — required by defaultexport let propName = default for optional — default value if not passed$$props and $$restProps for pass-through — but explicit props preferredcreateEventDispatcher for custom events — dispatch('eventName', data)on:eventName to listen — on:click, on:customEventon:click|preventDefault modifiers — |stopPropagation, |onceon:click without handler — forwards to parent+page.svelte for pages — +page.server.ts for server-only loadload function for data fetching — runs on server and client navigation$app/stores for page, navigating, etc. — $page.params, $page.urlform actions for mutations — progressive enhancement, works without JSbrowser from $app/environment — check before using window/documentonMount only runs client-side — safe for browser APIsfetch in load is special — relative URLs work, credentials handled$state() replaces let for reactivity — let count = $state(0)$derived replaces $: for computed — let doubled = $derived(count * 2)$effect for side effects — replaces $: with side effectslet { prop } = $props() in Svelte 5, or don't destructure in 4$store for value, store for subscribe/set{#if show}<div transition:fade> not on wrapper{#key value}...{/key} destroys and recreates