Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Svelte

  • 66 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

svelte is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • svelte
  • AI & Agent Building
  • AI-coding skill

Svelte by the numbers

  • 66 all-time installs (skills.sh)
  • +1 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #6,006 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill svelte

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs66
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Svelte

Overview

Svelte is a compiler-based UI framework that shifts work from runtime to build time, producing minimal JavaScript with no virtual DOM. Svelte 5 introduces runes for explicit, fine-grained reactivity. SvelteKit is the full-stack framework built on Svelte, providing file-based routing, server-side rendering, and deployment adapters.

When to use: Full-stack web apps, static sites, progressive enhancement, SSR/SSG, projects needing small bundle sizes, migration from Svelte 4 to 5.

When NOT to use: React/Vue ecosystem lock-in, projects requiring extensive third-party component libraries only available for other frameworks, teams with no Svelte experience on tight deadlines.

Quick Reference

PatternAPI / SyntaxKey Points
Reactive statelet count = $state(0)Replaces let reactivity from Svelte 4
Derived stateconst double = $derived(count * 2)Replaces $: reactive declarations
Complex derivationconst value = $derived.by(() => { ... })Multi-statement derived computations
Side effects$effect(() => { ... })Runs after DOM update, auto-tracks dependencies
Component propslet { name, age = 25 } = $props()Replaces export let, supports defaults
Bindable propslet { value = $bindable() } = $props()Two-way binding with bind:value
Debug inspection$inspect(value)Dev-only logging, stripped in production
Snippets{#snippet name(params)}...{/snippet}Replaces slots, reusable template blocks
Render snippet{@render name(args)}Invoke a snippet with arguments
Event handling<button onclick={handler}>Properties replace on:click directive
Each blocks{#each items as item (item.id)}...{/each}Keyed iteration for efficient updates
Await blocks{#await promise}...{:then}...{:catch}...Inline async rendering
Server loadexport function load({ params }) in +page.server.tsRuns server-side only, accesses DB/secrets
Universal loadexport function load({ fetch }) in +page.tsRuns on server and client
Form actionsexport const actions in +page.server.tsProgressive enhancement with use:enhance
Layout+layout.svelte / +layout.server.tsShared UI and data across child routes
Server hookshandle() in src/hooks.server.tsRequest middleware, auth, redirects
Error page+error.sveltePer-route error boundaries
Adaptersadapter-auto, adapter-node, adapter-staticDeploy to Vercel, Node, static hosting
API routes+server.ts with GET, POST, etc.Standalone endpoints, not tied to pages
Page optionsexport const prerender = truePer-route SSR, CSR, prerender control
Shared state$state() in .svelte.ts modulesReplaces writable stores for cross-component state
Raw state$state.raw(data)Opts out of deep proxying for large datasets

Svelte 4 to 5 Migration

Svelte 4 (Legacy)Svelte 5 (Current)
let count = 0 (reactive)let count = $state(0)
$: double = count * 2const double = $derived(count * 2)
$: { sideEffect() }$effect(() => { sideEffect() })
export let namelet { name } = $props()
<slot />{#snippet children()}{/snippet} + {@render}
on:click={handler}onclick={handler}
createEventDispatcher()Callback props: let { onclick } = $props()
import { writable } from 'svelte/store'$state() in .svelte.ts modules
$store auto-subscriptionDirect value access from rune-based state

Common Mistakes

MistakeCorrect Pattern
Using $state on non-primitives without care$state deeply proxies objects; use $state.raw() for large read-only data
Destructuring $props() loses reactivityDestructure at declaration only: let { x } = $props()
Reading $effect dependencies conditionallyEnsure all tracked reads happen unconditionally
Returning cleanup from $effect incorrectlyReturn a function: $effect(() => { return () => cleanup() })
Mixing on:click and onclick in Svelte 5Use onclick exclusively in Svelte 5 components
Using stores in new Svelte 5 codeUse $state() in .svelte.ts modules for shared state
Forgetting (key) in {#each} blocksAlways key: {#each items as item (item.id)}
Exporting load from .svelte filesLoad functions belong in +page.ts or +page.server.ts
Not awaiting parent load in layoutsUse await parent() when child load depends on layout
Using goto() in server load functionsUse redirect(303, '/path') from @sveltejs/kit

Delegation

  • Pattern discovery: Use Explore agent
  • Code review: Delegate to code-reviewer agent
  • Build configuration: Delegate to Task agent
If the tailwind skill is available, delegate Tailwind CSS utility class patterns and configuration to it.
If the vitest-testing skill is available, delegate Svelte component unit testing patterns to it.
If the playwright skill is available, delegate end-to-end testing of SvelteKit routes and form actions to it.
If the drizzle-orm skill is available, delegate database schema and query patterns used in SvelteKit server load functions to it.
If the vite skill is available, delegate Vite build configuration and plugin setup to it.

References

  • Runes and reactivity patterns ($state, $derived, $effect, $props)
  • Snippets, rendering, and component composition
  • SvelteKit routing, load functions, and layouts
  • Form actions, progressive enhancement, and validation
  • Hooks, middleware, and error handling
  • Svelte 4 to 5 migration patterns
  • SvelteKit adapters and deployment

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.