Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Svelte Pro

ASecurity

Idiomatic Svelte: runes reactivity, component design, SvelteKit routing/data loading, and performance. Use when writing, reviewing, or structuring Svelte apps.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentstypescriptgoreacttestingdebuggingapidatabaseperformance

Works with

cliapi

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill svelte-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Svelte Pro?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Svelte Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-svelte-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-svelte-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: svelte-pro
description: Idiomatic Svelte: runes reactivity, component design, SvelteKit routing/data loading, and performance. Use when writing, reviewing, or structuring Svelte apps.
category: development
---

# Svelte Pro

## Overview

Svelte's bet — **a compiler instead of a runtime** — means idiomatic Svelte looks deceptively
simple: `$state`, `$derived`, `$effect` (runes) declare reactivity, and the compiler generates the
surgical DOM updates. Professional Svelte means thinking in runes correctly (universal reactivity),
structuring SvelteKit apps around its data-loading model, and keeping components small and honest.

The through-line: write straightforward code; let the compiler do the clever work.

## When to use

- Writing or reviewing Svelte 5 (runes mode) code.
- Structuring SvelteKit applications (routing, load functions, forms).
- Designing component APIs (props, snippets, events).
- Debugging reactivity issues in runes mode.
- Optimizing Svelte rendering or bundle size.

## Core concepts

- **Runes: universal reactivity.** `$state` for reactive values (deeply reactive proxies — mutate
  freely), `$derived` for computed values, `$effect` for side effects. Runes work in `.svelte.js`
  modules too — shared reactive state without component boilerplate.
- **Props as runes.** `$props()` destructures component inputs; `$bindable()` marks two-way-bound
  props explicitly. No more `export let` — and prop mutation rules are now explicit instead of
  accidental.
- **Effects are for side effects.** `$effect` syncs with the outside world (DOM measurements,
  subscriptions, persistence) — with cleanup returned. Deriving values in effects instead of
  `$derived` is the classic runes mistake.
- **Snippets over slots.** `{@render children()}` and named snippets replace slots with a more
  composable, typed API. Snippets are just functions returning markup — pass them as props for
  powerful composition patterns.
- **SvelteKit's data model.** `load` functions (server-first, progressively enhanced), form actions
  (no-JS-baseline forms that enhance), and the `data` prop flow. Design around server load +
  actions before reaching for client-side fetching.
- **Stores, evolved.** The classic store contract (`subscribe`) still works and interoperates;
  runes in modules cover most new shared-state needs. Don't mix paradigms confusingly — pick per
  boundary.

## Practical workflow

1. **Scaffold with SvelteKit.** `npm create svelte@latest`; TypeScript; ESLint + Prettier;
   routes mirror the URL structure (`src/routes/...`).
2. **Design data flow per route.** `+page.server.ts` `load` for data (validated, typed);
   `+page.svelte` renders from `data`; form `actions` for mutations with `use:enhance` for
   progressive enhancement. Client fetches only for truly client-side concerns.
3. **Write components small.** Props in via `$props()`, events via callbacks (props), content via
   snippets. Keep components focused; extract runes-based logic into `.svelte.js` modules when
   shared.
4. **Handle async states.** Await blocks (`{#await}`) or runes-based loading state in load
   functions; error boundaries via `+error.svelte`; loading UI via `+page.svelte` skeletons.
5. **Test behavior.** Vitest for logic and runes modules; `@testing-library/svelte` for component
   behavior; Playwright for critical journeys (SvelteKit's first-class testing story).
6. **Keep bundles lean.** The compiler already minimizes runtime — your job is route-level code
   splitting (automatic), avoiding heavy deps in shared chunks, and measuring with the bundle
   analyzer before optimizing.

Idiomatic snippets:

```svelte
<script>
  let { userId } = $props();
  let filter = $state('');
  // $derived, not $effect, for computed values
  let visible = $derived(orders.filter(o => o.id.includes(filter)));
  let total = $derived(visible.reduce((s, o) => s + o.total, 0));

  // $effect only for side effects, with cleanup
  $effect(() => {
    document.title = `Orders (${visible.length})`;
    const t = setInterval(refresh, 30_000);
    return () => clearInterval(t);
  });
</script>
```

## Common pitfalls

- **`$effect` for derived state.** Computing values inside effects instead of `$derived` —
  causes unnecessary runs, ordering bugs, and confusion. Derived = `$derived`, always.
- **Deep mutation surprises.** `$state` proxies are deeply reactive — convenient, but mutating
  nested objects triggers fine-grained updates you might not expect. For large replace-whole
  objects, that's fine; for huge collections with frequent tiny updates, consider structure.
- **Forgetting runes mode boundaries.** Legacy-mode (`export let`) and runes-mode idioms mixed
  in one codebase. Migrate deliberately; don't straddle.
- **Client-fetching what load() should do.** `onMount(fetch(...))` for initial page data —
  loses SSR, SEO, and SvelteKit's loading/error semantics. Server `load` first.
- **Props drilling through 5 layers.** Either the state belongs in a shared runes module, or
  the component tree needs restructuring (composition with snippets).
- **No cleanup in effects.** Subscriptions, intervals, and observers without returned cleanup —
  leaks that accumulate in SPAs. Every `$effect` with setup returns teardown.
- **Over-fetching in load.** Returning the whole database from `load` "for flexibility."
  Load what the page needs; use streaming promises for deferred secondary data.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →