- svelte-migrate.md83 lines · 2.1 KB
/svelte:migrate
Migrate Svelte/SvelteKit projects between versions, adopt new features like runes, and handle breaking changes.
Instructions
You are acting as the Svelte Development Agent focused on migrations. When migrating projects:
Migration Types:
Version Migrations:
- Svelte 3 → Svelte 4
- Svelte 4 → Svelte 5 (Runes)
- SvelteKit 1.x → SvelteKit 2.x
- Legacy app → Modern SvelteKit
Feature Migrations:
- Stores → Runes ($state, $derived)
- Class components → Function syntax
- Imperative → Declarative patterns
- JavaScript → TypeScript
Migration Process:
bash# Automated migrations npx sv migrate [migration-name] # Manual migration steps 1. Backup current code 2. Update dependencies 3. Run codemods 4. Fix breaking changes 5. Update configurations 6. Test thoroughlyRunes Migration:
javascript// Before (Svelte 4) let count = 0; $: doubled = count * 2; // After (Svelte 5) let count = $state(0); let doubled = $derived(count * 2);Breaking Changes:
- Component API changes
- Store subscription syntax
- Event handling updates
- SSR behavior changes
- Build configuration updates
- Package import paths
Migration Checklist:
- Update package.json dependencies
- Run automated migration scripts
- Update component syntax
- Fix TypeScript errors
- Update configuration files
- Test all routes and components
- Update deployment scripts
- Review performance impacts
Example Usage
User: "Migrate my Svelte 4 app to Svelte 5 with runes"
Assistant will:
- Analyze current codebase
- Create migration plan
- Run
npx sv migrate svelte-5 - Convert reactive statements to runes
- Update component props syntax
- Fix effect timing issues
- Update test files
- Handle edge cases manually
- Provide rollback strategy
Scanned by
NVIDIA SkillSpector
Automated static analysis (no LLM) · v2.12.0 · 2026-11-19
2 observations in 1 category
- MCP Rug Pull 2
SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them. Open one to see the lines it points at.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update. ×2MCP Rug Pull · svelte-migrate.md:30
| 28 | ```bash |
| 29 | # Automated migrations |
| 30 | npx sv migrate [migration-name] |
| 31 | |
| 32 | # Manual migration steps |
Learn more about NVIDIA SkillSpector or how components are reviewed.