Skip to content
Back to skills

Svelte Runes Components

ASecurity

Builds Svelte 5 components with runes and snippets, and replaces stores and legacy reactive statements. Use it when writing or upgrading Svelte code.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 15, 2026
ai-agentsreactapi

Works with

  • api

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill svelte-runes-components --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Svelte Runes Components?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Svelte Runes Components
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-svelte-runes-components/badge)](https://www.skillsdirectory.com/skills/workspace-templates-svelte-runes-components)

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

Download with Pro
SKILL.md
---
name: svelte-runes-components
description: Builds Svelte 5 components with runes and snippets, and replaces stores and legacy reactive statements. Use it when writing or upgrading Svelte code.
---

# Svelte runes components

Write Svelte 5. If the file uses `export let`, `$:` or `<slot>`, convert it unless the user said to leave it.

## Rules

1. Props: `let { title, items = [], onselect }: Props = $props();` with an `interface Props` above it. Callback props replace `createEventDispatcher`.
2. Local state is `$state`. When two components need the same state, export it from a `.svelte.ts` module as an object, never as a bare reassigned primitive.
3. Anything computed from state is `$derived` (use `$derived.by` for multi-line logic). Never assign to another `$state` inside an effect to mirror a value.
4. `$effect` is the last resort: DOM measurement, third-party widgets, syncing to storage. Return a cleanup function for every listener or timer. Reading a signal after an `await` inside an effect does not track it.
5. Replace `<slot>` with `{#snippet}` and `{@render children?.()}`. Typed snippet props use `Snippet<[Item]>`.
6. Bindable props need `$bindable()` and a reason: prefer a callback.
7. Deeply mutated arrays and objects are fine in `$state` (they are proxied); use `$state.raw` for large read-only data from an API.

## Verify

Run `npx svelte-check` and fix every warning that mentions state or reactivity. Open the dev server only if the user asked.

## Report

List each legacy construct you replaced and any `$effect` you kept, with the reason it could not be `$derived`.

Attribution

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

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.