Use when a component needs migration to the target architecture or framework version.
67%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./packs/svelte/skills/migration-migrate-component/SKILL.mdMigrate a Svelte component from Svelte 4 patterns to Svelte 5 runes following docs/ARCHITECTURE.md section 5.
Component: $ARGUMENTS
Read docs/ARCHITECTURE.md section 5.
Analyze the component:
Convert to Svelte 5 runes:
export let prop -> let { prop }: Props = $props() with typed interfaceexport let prop = default -> let { prop = default }: Props = $props()$$restProps -> let { ...rest } = $props()let x = 0 (reactive) -> let x = $state(0)$: derived = expr -> let derived = $derived(expr)$: { sideEffect() } -> $effect(() => { sideEffect() })createEventDispatcher() -> callback props (onxxx?: (data) => void)dispatch('event', data) -> onxxx?.(data)<slot> -> {@render children()}<slot name="header"> -> {@render header()}on:click={handler} -> onclick={handler}on:click|preventDefault -> onclick={(e) => { e.preventDefault(); handler(e) }}onMount(() => {...}) -> $effect(() => {...}) with cleanup returnAlso check for SvelteKit 1 patterns:
$app/stores -> $app/statethrow redirect() -> redirect() (no throw)throw error() -> error() (no throw)Apply composition pattern if there is prop drilling.
Decompose if > 200 lines.
Validate:
npx svelte-check --tsconfig ./tsconfig.json
npx vite build
npx vitest run --passWithNoTestsfernandezbaptiste/specialist-agent
cd716d9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.