Agent skill

Svelte5 Best Practices

by SikandarJODD in SikandarJODD/cnblocks

Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.

MITAuto-check passedDevelopment

Install Svelte5 Best Practices

skills CLI
$ npx skills add SikandarJODD/cnblocks --skill svelte5-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SikandarJODD/cnblocks svelte5-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SikandarJODD/cnblocks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/svelte5-best-practices .claude/skills/svelte5-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
svelte5-best-practices
GitHub stars
431
Used in
1 other repo
Token cost
~810 tokens
SKILL.md length
152 words
Files
8 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.

  • Works in 8 steps: Using let without $state - Variables are… → Using $effect for derived values - Use… → Using on:click syntax - Use onclick in… → …
  • Refactoring Svelte 5 components and SvelteKit applications
  • SKILL.md covers Quick Reference, Essential Patterns and Common Mistakes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Svelte5 Best Practices is an agent skill from SikandarJODD/cnblocks. 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…

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/events.md`, `references/migration.md` and `references/performance.md`).

It sits in Development, covering Performance optimization, Refactoring and Design systems. It works with Svelte, SvelteKit, TypeScript and shadcn/ui. The repository describes itself as: 150+ UI & Marketing blocks using Svelte 5, Tailwind CSS v4 and Shadcn Svelte. The licence is MIT.

When your agent uses it

  • Refactoring Svelte 5 components and SvelteKit applications
  • : Svelte components
  • Snippets ({snippet}
  • SvelteKit data loading

Example prompts

  • “/svelte5-best-practices”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Using let without $state - Variables are not reactive without $state()
  2. Using $effect for derived values - Use $derived instead
  3. Using on:click syntax - Use onclick in Svelte 5
  4. Using createEventDispatcher - Use callback props instead
  5. Using - Use snippets with {@render}`
  6. Forgetting $bindable() - Required for bind: to work
  7. Setting module-level state in SSR - Causes cross-request leaks
  8. Sequential awaits in load functions - Use Promise.all for parallel requests

What it can do on your machine

Read from SKILL.md and the folder at commit 81c7209. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are svelte).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Svelte5 Best Practices loads about 810 tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 153 tokens; SKILL.md has 152 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~153
When it runs · the whole SKILL.md, loaded when a task matches
~810
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SikandarJODD/cnblocks at commit 81c7209, republished under its MIT licence (© SikandarJODD). 152 words, ~810 tokens.

Download SKILL.mdSave it as .claude/skills/svelte5-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
svelte5-best-practices
description
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.
license
MIT
metadata.author
ejirocodes
metadata.version
1.0.0

Svelte 5 Best Practices

Quick Reference

TopicWhen to UseReference
Runes$state, $derived, $effect, $props, $bindable, $inspectrunes.md
SnippetsReplacing slots, {#snippet}, {@render}snippets.md
Eventsonclick handlers, callback props, context APIevents.md
TypeScriptProps typing, generic componentstypescript.md
MigrationSvelte 4 to 5, stores to runesmigration.md
SvelteKitLoad functions, form actions, SSR, page typingsveltekit.md
PerformanceUniversal reactivity, avoiding over-reactivity, streamingperformance.md

Essential Patterns

Reactive State
svelte
<script>
  let count = $state(0); // Reactive state
  let doubled = $derived(count * 2); // Computed value
</script>
Component Props
svelte
<script>
  let { name, count = 0 } = $props();
  let { value = $bindable() } = $props(); // Two-way binding
</script>
Snippets (replacing slots)
svelte
<script>
  let { children, header } = $props();
</script>

{@render header?.()}
{@render children()}
Event Handlers
svelte
<!-- Svelte 5: use onclick, not on:click -->
<button onclick={() => count++}>Click</button>
Callback Props (replacing createEventDispatcher)
svelte
<script>
  let { onclick } = $props();
</script>

<button onclick={() => onclick?.({ data })}>Click</button>

Common Mistakes

  1. Using let without $state - Variables are not reactive without $state()
  2. Using $effect for derived values - Use $derived instead
  3. Using on:click syntax - Use onclick in Svelte 5
  4. Using createEventDispatcher - Use callback props instead
  5. Using <slot> - Use snippets with {@render}
  6. Forgetting $bindable() - Required for bind: to work
  7. Setting module-level state in SSR - Causes cross-request leaks
  8. Sequential awaits in load functions - Use Promise.all for parallel requests

© SikandarJODD, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/svelte5-best-practices of SikandarJODD/cnblocks.

  • SKILL.md
  • references/events.md
  • references/migration.md
  • references/performance.md
  • references/runes.md
  • references/snippets.md
  • references/sveltekit.md
  • references/typescript.md

Open the folder on GitHubat commit 81c7209

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in SikandarJODD/cnblocks, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Svelte5 Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Svelte5 Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Svelte5 Best Practices this skillSikandarJODD/cnblocks4311 repos~810Automated safety check: PassMIT
Worklog Designregisx001/Worklog261—~3.3kAutomated safety check: PassMIT
Frontend Guidelightly-ai/lightly-studio896—~2.9kAutomated safety check: PassApache-2.0
Weft FrontendWeaveMindAI/weft2k—~8kAutomated safety check: NotesCustom licence
Code Refactor Reviewkcsujeet/ilamy-calendar3512 repos~1.6kAutomated safety check: PassMIT
Sveltekit Svelte5regisx001/Worklog261—~2.3kAutomated safety check: PassMIT

Similar skills

  • Worklog Design

    regisx001/Worklog

    Design and UI skill for the Worklog desktop project manager.

    261 GitHub stars~3.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Frontend Guide

    lightly-ai/lightly-studio

    Read before writing or reviewing any frontend code in lightlystudioview - Svelte, TypeScript, or SvelteKit files.

    896 GitHub stars~2.9k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Weft Frontend

    WeaveMindAI/weft

    Read when the user wants a page, app or site for the program, and before dispatching the frontend-builder: the verified scaffold commands, the default stack (pnpm, SvelteKit, PostgreSQL, BetterAuth…

    2k GitHub stars~8k tokensUpdated yesterday
    Frontend & DesignAuto-check: notes
  • Code Refactor Review

    kcsujeet/ilamy-calendar

    Reviews code changes for reuse, composition, codebase consistency, and slop.

    351 GitHub starsUsed in 2 repos~1.6k tokens
    DevelopmentAuto-check passed
  • Sveltekit Svelte5

    regisx001/Worklog

    Build, refactor, and debug features in SvelteKit + Svelte 5 runes.

    261 GitHub stars~2.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Scaffold Nextjs

    mblode/agent-skills

    Scaffolds a Next.js turborepo with Blode UI, icons, Ultracite (oxlint/shadcn), workspace hooks, and GitHub/Vercel setup.

    144 GitHub stars~2.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

Categories

Questions about Svelte5 Best Practices

What does Svelte5 Best Practices do?

Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development. Svelte5 Best Practices is an agent skill from SikandarJODD/cnblocks. Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.

When should I use Svelte5 Best Practices?

Svelte5 Best Practices fits situations like: refactoring Svelte 5 components and SvelteKit applications; : Svelte components; snippets ({snippet}; svelteKit data loading.

How do I install Svelte5 Best Practices in Claude Code?

Run `npx skills add SikandarJODD/cnblocks --skill svelte5-best-practices -a claude-code`. Or copy the skill folder (skills/svelte5-best-practices in SikandarJODD/cnblocks) into .claude/skills/svelte5-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Svelte5 Best Practices in Codex?

Run `npx skills add SikandarJODD/cnblocks --skill svelte5-best-practices -a codex`. Or copy the skill folder (skills/svelte5-best-practices in SikandarJODD/cnblocks) into .agents/skills/svelte5-best-practices in your project. Codex loads it when a task matches its description.

Can I use Svelte5 Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SikandarJODD/cnblocks --skill svelte5-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/svelte5-best-practices, .gemini/skills/svelte5-best-practices, .github/skills/svelte5-best-practices and .opencode/skills/svelte5-best-practices in your project.

What does Svelte5 Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: Svelte5 Best Practices is instructions for the agent only.

Does Svelte5 Best Practices access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Svelte5 Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Svelte5 Best Practices use?

Svelte5 Best Practices is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Svelte5 Best Practices use?

About 810 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Svelte5 Best Practices?

Skills that share tags, products or a category with Svelte5 Best Practices: Worklog Design (regisx001/Worklog, 261 stars), Frontend Guide (lightly-ai/lightly-studio, 896 stars), Weft Frontend (WeaveMindAI/weft, 2k stars) and Code Refactor Review (kcsujeet/ilamy-calendar, 351 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Svelte5 Best Practices?

SikandarJODD (a GitHub user) maintains it in SikandarJODD/cnblocks, which has 431 GitHub stars. The repository was last updated on June 22, 2026.

Source: SikandarJODD/cnblocks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.