diegosouzapw/awesome-omni-skill/sveltekit-latest
Claude Code and agent skill by diegosouzapw/awesome-omni-skill
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Quick-reference for SvelteKit + Svelte 5 development (Feb 2026)
Install
npx vskill@latest install diegosouzapw/awesome-omni-skill/sveltekit-latestSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as diegosouzapw/awesome-omni-skill/sveltekit-latest.
SvelteKit + Svelte 5 Quick Reference (February 2026)
Current Versions
| Package | Version | Notes | |
|---|---|---|---|
| Svelte | ~5.50.x | Svelte 5 is the current stable. Svelte 4 is legacy. | |
| SvelteKit | ~2.50.x | SvelteKit 2 is current stable. SvelteKit 1 is legacy. | |
| sv (CLI) | latest | Replaces create-svelte. Use npx sv for all scaffolding. |
Scaffolding a New Project
sv create options
| Flag | Purpose | |||||
|---|---|---|---|---|---|---|
| `--template minimal\ | demo\ | library` | Project template | |||
| `--types ts\ | jsdoc\ | --no-types` | TypeScript config | |||
--add [add-ons...] | Install add-ons (see below) | |||||
--no-add-ons | Skip interactive add-on prompt | |||||
| `--install npm\ | pnpm\ | yarn\ | bun\ | deno` | Package manager |
Available add-ons
drizzle, eslint, better-auth, tailwindcss, prettier, vitest, playwright, storybook, mdsvex, paraglide, sveltekit-adapter, mcp, devtools-json
TypeScript Setup
TypeScript is built-in. Select "ts" when prompted by npx sv create, or pass --types ts. No extra configuration needed.
- Use
<script lang="ts">in.sveltefiles - Types are auto-generated on
npm run devornpx svelte-kit sync - Required tsconfig options (set automatically):
verbatimModuleSyntax: true,isolatedModules: true,noEmit: true .svelte.tsfiles for reactive modules (replaces.tswhen you need runes)
Svelte 5 Runes (Core Reactivity)
Runes replace Svelte 4's implicit reactivity (let, $:) with explicit, portable primitives.
$state -- Reactive State
- Deeply reactive: mutations to nested objects/arrays are tracked automatically
- Class fields:
done = $state(false);inside class bodies
$state.raw -- Non-reactive (reassign-only)
Use for large collections you never mutate in place. Better performance.
$state.snapshot -- Static copy
Use when passing state to external libraries or structuredClone.
$derived -- Computed Values
$derived.by -- Complex derivations
$derived(expr) is equivalent to $derived.by(() => expr).
$effect -- Side Effects
$effect.pre -- Before DOM update
Rule of thumb: $derived for values, $effect for actions/side effects.
$props -- Component Props
- Destructure with defaults, renaming, and rest props
- Props are NOT bindable by default (see $bindable)
$bindable -- Two-way Binding
Parent can then use bind:value={something}.
$inspect -- Debug
Snippets (Replace Slots)
Slots are deprecated. Use snippets and {@render} instead.
Default content (children)
Named snippets
Snippets with parameters
Event Handling Changes
DOM events: remove the colon
Component events: callback props replace createEventDispatcher
Event modifiers are gone
Replace on:click|preventDefault with explicit calls:
Component Mounting (Programmatic)
Cross-Module Reactive State (.svelte.ts files)
SSR caveat: Module-scoped$stateis a singleton shared across SSR requests. Always reset at render start. See "SSR Behavior for Module-Scoped State" below.
SSR Behavior for Module-Scoped State
What runs during SSR vs CSR
| Context | SSR | CSR | |
|---|---|---|---|
Top-level <script> code | YES | YES | |
$state initialization | YES | YES | |
$derived / $derived.by | Compiled as IIFE (computed once at module init) | Reactive (recomputes on dependency change) | |
$effect / $effect.pre | NO | YES | |
onMount | NO | YES | |
| Template expressions | YES | YES |
The $derived SSR trap
$derived.by(() => ...) compiles to const x = (() => ...)() during SSR -- an immediately-invoked function that runs once at module initialization, not reactively. If module-scoped $state is set after the derived is initialized, the derived will NOT reflect the updated values.
Broken pattern:
Working pattern:
During CSR, reading $state variables inside a getter called from a template still triggers Svelte 5's fine-grained reactivity tracking.
SSR baseline pattern for layouts/pages
To populate state during SSR, call setters at the top level of <script> blocks (not in $effect or onMount). Use $effect for client-side reactive updates:
Avoiding state_referenced_locally warnings
When you need $derived values for SSR baseline code, DON'T read the $derived at top level. Instead, compute the value directly from the source:
Module-scoped $state and SSR safety
Module-scoped $state is shared across all SSR requests (it's a singleton). SvelteKit SSR is synchronous per-request, so call reset() at the top of the root layout to prevent cross-request pollution:
SvelteKit 2 Key Differences from SvelteKit 1
error()andredirect()no longer need to be thrown -- just call themcookies.set/delete/serializerequire explicitpathparameter- Import
vitePreprocessfrom@sveltejs/vite-plugin-svelte(not from SvelteKit) resolvePathreplaced byresolveRoutefrom$app/paths- Paths are consistently relative or absolute based on
paths.relativeconfig - Requires Node 18.13+
Migration Commands
Project Structure (SvelteKit)
Common Patterns
Form Actions (server-side form handling)
Load Functions
Sources
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 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 repositoryCheckingskills/development/sveltekit-latest/SKILL.md
Popularity
- Repository stars
- 45
- Repository forks
- 14
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
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/diegosouzapw/awesome-omni-skill/sveltekit-latest)