svelte

svelte is a skill for Claude Code from dylantarre/design-system-skills. It costs 46 tokens per session (4,716 once invoked), scanned A, original, MIT.

A guide for building reusable Svelte 5 interface components with TypeScript and Svelte’s runes, its system for managing state and component inputs.

In plain words
What is it for?
Creating component libraries, design-system components, and SvelteKit interfaces with reusable state logic and design tokens.
Why use it?
It helps keep Svelte components consistent and makes their state and shared styling easier to organize.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the design-system-skills plugin — 29 skills shipped together

Good fit Creating component libraries, design-system components, and SvelteKit interfaces with reusable state logic and design tokens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dylantarre/design-system-skills/svelte
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dylantarre/design-system-skills --skill svelte
Clone the repo
git clone --depth 1 https://github.com/dylantarre/design-system-skills

Made for: Claude Code.

Or install design-system-skills, the plugin that ships this one along with the rest of its 29 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for svelte

README.md
[![agentmods](https://agentmods.dev/badge/skills/dylantarre/design-system-skills/svelte/github.svg)](https://agentmods.dev/skills/dylantarre/design-system-skills/svelte)
Your own site
<a href="https://agentmods.dev/skills/dylantarre/design-system-skills/svelte"><img src="https://agentmods.dev/badge/skills/dylantarre/design-system-skills/svelte/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for svelte

Your own site · 80×15
<a href="https://agentmods.dev/skills/dylantarre/design-system-skills/svelte"><img src="https://agentmods.dev/badge/skills/dylantarre/design-system-skills/svelte.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.04716
Opus 5 $0.00023 $0.02358
Sonnet 5 $0.00009 $0.00943
Haiku 4.5 $0.00005 $0.00472

Measured 12d ago against content hash bc2a05ab1cb4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

svelte scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/frameworks/svelte/SKILL.md · 800 lines

How it starts

The opening of the file, as written. The whole thing — 800 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Svelte Component Patterns

Overview

Build accessible, token-driven Svelte 5 components using runes and modern patterns. Covers component structure, TypeScript integration, stores, and consuming design tokens.

When to Use

  • Creating a Svelte component library
  • Building components that use design tokens
  • Setting up a design system in SvelteKit
  • Converting designs to Svelte components

The Process

  1. Identify component type: Primitive, composite, or layout?
  2. Choose styling approach: Scoped CSS, Tailwind, or global tokens?
  3. Define props with TypeScript: Use $props() rune
  4. Implement with tokens: CSS custom properties
  5. Add accessibility: ARIA, keyboard handling, focus management
  6. Extract state logic: Use $state, $derived, and $effect

Svelte 5 Runes Quick Reference

Rune Purpose Example
$state Reactive state let count = $state(0)
$derived Computed values let double = $derived(count * 2)
$effect Side effects $effect(() => console.log(count))
$props Component props let { variant = 'primary' } = $props()
$bindable Two-way binding let { value = $bindable() } = $props()

Project Structure

src/
├── lib/
│   ├── components/
│   │   ├── primitives/
│   │   │   ├── Button/
│   │   │   │   ├── Button.svelte
│   │   │   │   ├── Button.test.ts
│   │   │   │   └── index.ts
│   │   │   ├── Input/
│   │   │   └── Text/
│   │   ├── composite/
│   │   │   ├── Card/
│   │   │   ├── Modal/
│   │   │   └── Dropdown/
│   │   └── layout/
│   │       ├── Stack/
│   │       ├── Grid/
│   │       └── Container/
│   ├── stores/
│   │   └── theme.svelte.ts
│   ├── tokens/
│   │   └── index.css
│   └── index.ts
└── routes/

Component Patterns

Button Component

Button.svelte:

<script lang="ts">
  import type { Snippet } from 'svelte';
  import type { HTMLButtonAttributes } from 'svelte/elements';

  interface Props extends HTMLButtonAttributes {
    /** Visual style variant */
    variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
    /** Size of the button */
    size?: 'sm' | 'md' | 'lg';
    /** Full width button */
    fullWidth?: boolean;
    /** Loading state */
    loading?: boolean;
    /** Icon before text */
    leftIcon?: Snippet;
    /** Icon after text */
    rightIcon?: Snippet;
    /** Button content */
    children: Snippet;
  }

  let {
    variant = 'primary',
    size = 'md',
    fullWidth = false,
    loading = false,
    disabled = false,
    leftIcon,
    rightIcon,
    children,
    class: className = '',
    ...restProps
  }: Props = $props();

  let isDisabled = $derived(disabled || loading);
</script>

<button
  class="btn btn--{variant} btn--{size} {className}"
  class:btn--full-width={fullWidth}
  class:btn--loading={loading}
  disabled={isDisabled}
  aria-busy={loading}
  {...restProps}
>
  {#if loading}
    <span class="btn__spinner" aria-hidden="true"></span>
  {/if}

  {#if leftIcon}
    <span class="btn__icon">
      {@render leftIcon()}
    </span>
  {/if}

  <span class="btn__label">
    {@render children()}
  </span>

  {#if rightIcon}
    <span class="btn__icon">
      {@render rightIcon()}
    </span>
  {/if}
</button>

<style>
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-family: inherit;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition:
      background-color 150ms ease,
      border-color 150ms ease,
      transform 100ms ease;
  }

  .btn:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
  }

  .btn:active:not(:disabled) {
    transform: scale(0.98);
  }

  .btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  /* Variants */
  .btn--primary {
    background-color: var(--color-primary-500);
    color: white;
  }

  .btn--primary:hover:not(:disabled) {
    background-color: var(--color-primary-600);
  }

  .btn--secondary {
    background-color: transparent;
    border-color: var(--color-gray-300);
    color: var(--color-gray-700);
  }

  .btn--secondary:hover:not(:disabled) {
    background-color: var(--color-gray-50);
    border-color: var(--color-gray-400);
  }

  .btn--ghost {
    background-color: transparent;
    color: var(--color-gray-700);
  }

  .btn--ghost:hover:not(:disabled) {
    background-color: var(--color-gray-100);
  }

  .btn--danger {
    background-color: var(--color-error-500);
    color: white;
  }

  .btn--danger:hover:not(:disabled) {
    background-color: var(--color-error-600);
  }

  /* Sizes */
  .btn--sm {
    height: 32px;
    padding: 0 var(--spacing-sm);
    font-size: var(--text-sm);
  }

  .btn--md {
    height: 40px;
    padding: 0 var(--spacing-md);
    font-size: var(--text-base);
  }

  .btn--lg {
    height: 48px;
    padding: 0 var(--spacing-lg);
    font-size: var(--text-lg);
  }

  /* Modifiers */
  .btn--full-width {
    width: 100%;
  }

  .btn--loading .btn__label {
    opacity: 0;
  }

  .btn__spinner {
    position: absolute;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 600ms linear infinite;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .btn__icon {
    display: flex;
    flex-shrink: 0;
  }
</style>

Read the full file on GitHub · 800 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 800 lines · 46 tokens per session scan A bc2a05ab1cb4

Subscribe to this mod's changes

svelte is a skill published in the GitHub repository dylantarre/design-system-skills (42 stars, last pushed 8mo ago), licensed MIT. It adds 46 tokens to every session and 4,716 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

nuxtjs-vue-typescript

Best practices for building Nuxt 3 and Vue 3 applications with TypeScript, the Composition API, and Tailwind CSS. Use when structuring Nuxt/Vue projects, writing composables, typing components and props, wiring up server routes and plugins, or optimizing Nuxt builds and Web Vitals.

Mindrally/skills · 70 tokens

inertia-rails-typescript

TypeScript type safety for Inertia Rails (React, Vue, Svelte): shared props, flash, and errors via InertiaConfig module augmentation in globals.d.ts. Use when setting up TypeScript types, configuring shared props typing, fixing TS2344 or TS2339 errors in Inertia components, or adding new shared data.

inertia-rails/skills · 74 tokens

nuxt-modules

Use when creating Nuxt modules: (1) Published npm modules (@nuxtjs/, nuxt-), (2) Local project modules (modules/ directory), (3) Runtime extensions (components, composables, plugins), (4) Server extensions (API routes, middleware), (5) Releasing/publishing modules to npm, (6) Setting up CI/CD workflows for modules.…

YuDefine/nuxt-supabase-starter · 105 tokens

vue-admin-skill

A planned Vue 3 and TypeScript skill for generating an administration interface: a back-office web application with pages, forms, tables, charts, navigation, and permissions. It describes a starter structure using Element Plus, Pinia, Vue Router, Vite, and related tools, but is not yet complete.

jiushiwon/wg-skills · 85 tokens

typescript-strict

Use when writing or reviewing TypeScript in Vue, Nuxt, Node, or shared TS utilities, fixing type errors, or deciding how to type API responses and composables.

pstuart/pstuart · 39 tokens

fec-vue3-project-standard

A Vue 3 and TypeScript project standard covering component boundaries, composables, routing, Pinia state, API layers, errors, styles, and project structure. Vue is a frontend framework, and composables are reusable functions for sharing component logic.

bovinphang/frontend-craft · 114 tokens