midudev/autoskills/svelte5-best-practices
Claude Code and agent skill by midudev/autoskills
- community
Checking that the SKILL.md file is still in the repository.
Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development. Use when writing, reviewing, or refactoring Svelte 5 components and SvelteKit applications. Triggers on: Svelte components, runes ($state, $derived, $effect, $props, $bindable, $inspect), snippets ({#snippet}, {@render}), event handling, SvelteKit data loading, form actions, Svelte 4 to Svelte 5 migration, store to rune migration, slots to snippets migration, TypeScript props typing, generic components, SSR state isolation, performance optimization, or component testing.
Install
npx vskill@latest install midudev/autoskills/svelte5-best-practicesSKILL.md
Svelte 5 Best Practices
Quick Reference
| Topic | When to Use | Reference | |
|---|---|---|---|
| Runes | $state, $derived, $effect, $props, $bindable, $inspect | runes.md | |
| Snippets | Replacing slots, {#snippet}, {@render} | snippets.md | |
| Events | onclick handlers, callback props, context API | events.md | |
| TypeScript | Props typing, generic components | typescript.md | |
| Migration | Svelte 4 to 5, stores to runes | migration.md | |
| SvelteKit | Load functions, form actions, SSR, page typing | sveltekit.md | |
| Performance | Universal reactivity, avoiding over-reactivity, streaming | performance.md |
Essential Patterns
Reactive State
Component Props
Snippets (replacing slots)
Event Handlers
Callback Props (replacing createEventDispatcher)
Common Mistakes
- Using `let` without `$state` - Variables are not reactive without
$state() - Using `$effect` for derived values - Use
$derivedinstead - Using `on:click` syntax - Use
onclickin Svelte 5 - Using `createEventDispatcher` - Use callback props instead
- Using `<slot>` - Use snippets with
{@render} - Forgetting `$bindable()` - Required for
bind:to work - Setting module-level state in SSR - Causes cross-request leaks
- Sequential awaits in load functions - Use
Promise.allfor parallel requests
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/autoskills/skills-registry/svelte5-best-practices/SKILL.md
Popularity
- Repository stars
- 6,099
- Repository forks
- 561
- 7-day trend score
- 44
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/midudev/autoskills/svelte5-best-practices)