svelte-code-writer

svelte-code-writer is a skill for Claude Code, Codex from sveltejs/ai-tools. It costs 68 tokens per session (524 once invoked), scanned A, original, MIT.

A command-line guide for looking up Svelte 5 documentation and analyzing Svelte code. Svelte is a tool for building web user interfaces, and Svelte components usually use .svelte files.

In plain words
What is it for?
It is for creating, editing, or analyzing Svelte components and Svelte modules. It can retrieve documentation sections and run an autofixer on inline code or files.
Why use it?
It helps developers find the relevant Svelte 5 guidance and catch common code issues while working on components or modules.

Skill for Claude CodeCodex

About the project

Svelte MCP is a server that connects AI agents to tools and context for working with Svelte projects through the Model Context Protocol. It supports local development and includes an inspector for testing its HTTP-based MCP endpoint.

sveltejs/ai-tools · 317 stars · on GitHub

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.

agentmods
npx agentmods add skills/sveltejs/ai-tools/svelte-code-writer
Any agent
npx skills add sveltejs/ai-tools --skill svelte-code-writer
Clone the repo
git clone --depth 1 https://github.com/sveltejs/ai-tools

Made for: Claude Code, Codex.

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-code-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/sveltejs/ai-tools/svelte-code-writer.svg)](https://agentmods.dev/skills/sveltejs/ai-tools/svelte-code-writer)
Your own site
<a href="https://agentmods.dev/skills/sveltejs/ai-tools/svelte-code-writer"><img src="https://agentmods.dev/badge/skills/sveltejs/ai-tools/svelte-code-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 524 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00068 $0.00524
Opus 5 $0.00034 $0.00262
Sonnet 5 $0.00014 $0.00105
Haiku 4.5 $0.00007 $0.00052

Measured 5d ago against content hash ccd435bc524f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

svelte-code-writer 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 5d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

packages/opencode/skills/svelte-code-writer/SKILL.md · 65 lines

What it actually says

CLI tools

You have access to @sveltejs/mcp CLI for Svelte-specific assistance. Use these commands via npx:

List documentation sections

npx @sveltejs/mcp list-sections

Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths.

Get documentation

npx @sveltejs/mcp get-documentation "<section1>,<section2>,..."

Retrieves full documentation for specified sections. Use after list-sections to fetch relevant docs.

Example:

npx @sveltejs/mcp get-documentation "$state,$derived,$effect"

Svelte autofixer

npx @sveltejs/mcp svelte-autofixer "<code_or_path>" [options]

Analyzes Svelte code and suggests fixes for common issues.

Options:

  • --async - Enable async Svelte mode (default: false)
  • --svelte-version - Target version: 4 or 5 (default: 5)

Examples:

# Analyze inline code (escape $ as \$)
npx @sveltejs/mcp svelte-autofixer '<script>let count = \$state(0);</script>'

# Analyze a file
npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte

# Target Svelte 4
npx @sveltejs/mcp svelte-autofixer ./Component.svelte --svelte-version 4

Important: When passing code with runes ($state, $derived, etc.) via the terminal, escape the $ character as \$ to prevent shell variable substitution.

Workflow

  1. Uncertain about syntax? Run list-sections then get-documentation for relevant topics
  2. Reviewing/debugging? Run svelte-autofixer on the code to detect issues
  3. Always validate - Run svelte-autofixer before finalizing any Svelte component
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. 5d ago First seen · 65 lines · 68 tokens per session scan A ccd435bc524f

Subscribe to this mod's changes

svelte-code-writer is a skill published in the GitHub repository sveltejs/ai-tools (317 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 524 once invoked, about $0.0003 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

shadcn-svelte

Pre-built shadcn-svelte components for json-render Svelte apps. Use when working with @json-render/shadcn-svelte, adding standard UI components to a Svelte catalog, or building Svelte web UIs with shadcn-svelte + Tailwind CSS components.

vercel-labs/json-render · 63 tokens

moderator-page-migration

Port a moderator page from the main Next.js app (src/pages/moderator/) into apps/moderator. Use when asked to migrate, move or cut over a /moderator/ page to the spoke, or to port its tRPC procedures and Prisma services to SvelteKit loads/actions and Kysely.

civitai/civitai · 71 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

v3-create-crud

创建增删改查(CRUD)页面,基于 Element Plus 组件库,包含表格、搜索、分页、新增/编辑弹窗、删除确认等功能。当用户提到以下任何场景时都应触发:创建管理页面、创建列表页、创建表格页。即使用户没有明确说 CRUD,只要意图是创建带表格和表单操作的后台页面就应该使用此 Skill。使用时需提供模块名称和字段信息。.

un-pany/v3-admin-vite · 108 tokens

v3-use-composables

项目内置组合式函数使用教程,涵盖设备检测、异步下拉、全屏加载、分页、路由监听、主题切换、动态标题、水印等组合式函数。当用户提到以下任何场景时都应触发:使用组合式函数、调用 Composables、判断设备类型、异步加载下拉选项、全屏 Loading、分页逻辑、监听路由变化、切换主题、设置页面标题、添加水印。即使用户没有明确说 Composables,只要意图是使用项目内置的组合式函数就应该使用此 Skill。.

un-pany/v3-admin-vite · 137 tokens

markstream-vue2-cli

Integrate markstream-vue2 into a Vue 2 Vue CLI or Webpack 4 app. Use when Codex needs Webpack 4-friendly setup, CDN worker fallbacks for Mermaid or KaTeX, dist/index.css imports, Vue 2 composition-api shims, or code block choices limited to stream-diffs or plain .

Simon-He95/markstream-vue · 83 tokens