svelte-migrate
Skill by temporalio
Migrates a single Svelte 4 component file to Svelte 5 runes syntax. It is for developers who want to convert or upgrade a .svelte file from Svelte 4 to Svelte 5.
Install svelte-migrate
Built from the published package, never by AI.
git clone --depth 1 https://github.com/temporalio/ui /tmp/ui && mkdir -p ~/.claude/skills && cp -r /tmp/ui/.claude/skills/svelte-migrate ~/.claude/skills/svelte-migrateRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/temporalio/ui /tmp/ui && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ui/.claude/skills/svelte-migrate ~/.gemini/antigravity-cli/skills/svelte-migrateAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill converts an individual Svelte file from Svelte 4 to Svelte 5 runes syntax. When the user provides a file path, the assistant reads the file, finds the Svelte 4 patterns, and rewrites them. The skill gives before and after patterns for props, state, derived values, side effects, event handlers, component events, slots, bindable props, lifecycle functions, dynamic components and app state imports.
The workflow asks the assistant to read the file first, apply the transformations in a set order, update imports and TypeScript types, and then run pnpm check to confirm there are no type errors. The skill says to keep onMount and onDestroy, since they remain valid in Svelte 5. It is aimed at developers maintaining Svelte projects who need to move existing components to the newer syntax.
Written from the project's SKILL.md and checked against it.
What it can do
- Props migrationConverts export let declarations to the $props() rune with typed Props interfaces.
- State and derived valuesTurns reactive let variables into $state() and $: assignments into $derived() or $derived.by().
- Side effectsRewrites $: statements as $effect() blocks.
- Event handlersChanges on:event directives to onevent attributes and notes that modifiers must be handled manually.
- Component eventsReplaces createEventDispatcher with callback props and updates parent usage.
- Slots to snippetsConverts default, named and prop-carrying slots to snippets and {@render} tags.
- Bindable propsMoves bind-able props to $bindable() within $props().
- Lifecycle updatesMaps beforeUpdate and afterUpdate to $effect.pre and $effect, and keeps onMount and onDestroy.
- Dynamic componentsReplaces svelte:component with direct component usage.
- App state importsChanges $app/stores page imports to $app/state.
What you need
- pnpm, for the pnpm check verification step
Try asking
- Migrate src/lib/Counter.svelte from Svelte 4 to Svelte 5 runes.
- Convert the slots in Card.svelte to snippets and {@render} tags.
- Upgrade Form.svelte to Svelte 5 and replace createEventDispatcher with callback props.
Good to know
- Migrates one file at a time when the user provides a file path.
- Event modifiers such as |preventDefault must be handled manually in the handler.
- The class: directive section in the source has no examples, so its guidance is not shown.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/svelte-migrate/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to svelte-migrate
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
svelte-migrate: common questions
Does this skill convert onMount to $effect?
No. The source says onMount and onDestroy remain valid and should be preserved. It only suggests $effect for reactive side effects that need to re-run when dependencies change.
How does it handle slots?
It converts default slots, named slots and slots with let: props into Svelte 5 snippets, using {@render} tags and {#snippet} blocks.
Does it check the result for type errors?
The workflow tells the assistant to run pnpm check after the transformations to verify there are no type errors.
How do I install svelte-migrate?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is svelte-migrate free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is svelte-migrate safe to use?
It scores 78 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to svelte-migrate?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
