From hostack
When writing or editing Svelte 5 components — .svelte, .svelte.ts, .svelte.js files, or anything involving runes ($state, $derived, $effect, $props, $bindable). Triggers on Svelte component questions, migrating from Svelte 4, or debugging reactivity. Use sveltekit skill for routing/load/actions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hostack:svelteThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Project targets **Svelte 5 with runes**. Never write Svelte 4 patterns: no `export let`, no `$:`, no `<slot>`, no `on:click`, no `createEventDispatcher`, no `<svelte:component>`, no `beforeUpdate`/`afterUpdate`.
Project targets Svelte 5 with runes. Never write Svelte 4 patterns: no export let, no $:, no <slot>, no on:click, no createEventDispatcher, no <svelte:component>, no beforeUpdate/afterUpdate.
If you see these in existing code → it's legacy and should be migrated. Read references/migration.md.
| If you need to … | Read |
|---|---|
| Use any rune ($state, $derived, $effect, $props, $bindable, $inspect, $host) | references/runes.md |
| Convert Svelte 4 code or recognize legacy patterns | references/migration.md |
| Share state across files, type props/snippets, write a generic component, use reactive Map/Set | references/patterns.md |
| Check whether a Svelte 4 API still exists | references/deprecated.md |
<script lang="ts">
type Props = { title: string; items?: string[] };
let { title, items = [] }: Props = $props();
let count = $state(0);
let doubled = $derived(count * 2);
</script>
<h1>{title}</h1>
<button onclick={() => count++}>{doubled}</button>
{#each items as item}<li>{item}</li>{/each}
$state proxy field breaks reactivity. Pass the parent ref to functions, not the destructured value.$effect writing a value it reads = infinite loop. Use $derived for derivations; $effect is side-effects only.Map/Set/Date/URL are NOT reactive. Import SvelteMap, SvelteSet, SvelteDate, SvelteURL from svelte/reactivity.dispatch(). <Child onsave={handler} />, not <Child on:save={handler} />.<slot> is gone. Use let { children } = $props() + {@render children()}. Named slots → snippet props.on:click|preventDefault → handle inside the callback.export let a $state from a module. Use a container object, getter function, or class — see references/patterns.md.$state on individual fields.lang="ts" and type $props() inline.npx claudepluginhub id-ego/hostack --plugin hostackProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.