svelte-file-editor

svelte-file-editor is an agent for Claude Code from sveltejs/ai-tools. It costs 81 tokens per session (652 once invoked), scanned A, original, MIT.

A specialized coding agent for editing and reviewing Svelte 5 components and modules. It uses Svelte documentation and code analysis tools to guide and validate changes.

In plain words
What is it for?
It is for creating, editing, or reviewing .svelte, .svelte.ts, and .svelte.js files. It looks up relevant documentation and runs Svelte's autofixer to check the code.
Why use it?
It helps developers work with Svelte 5's syntax and rules without relying only on memory. It can identify issues in code and suggest fixes.

Agent for Claude Code

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

Part of the svelte plugin — 1 agent shipped together

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 · mcp.svelte.dev

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 agents/sveltejs/ai-tools/svelte-file-editor
Clone the repo
git clone --depth 1 https://github.com/sveltejs/ai-tools

Made for: Claude Code.

Or install svelte, the plugin that ships this one along with the rest of its 1 agent.

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-file-editor

README.md
[![agentmods](https://agentmods.dev/badge/agents/sveltejs/ai-tools/svelte-file-editor.svg)](https://agentmods.dev/agents/sveltejs/ai-tools/svelte-file-editor)
Your own site
<a href="https://agentmods.dev/agents/sveltejs/ai-tools/svelte-file-editor"><img src="https://agentmods.dev/badge/agents/sveltejs/ai-tools/svelte-file-editor.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 652 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.1 $0.00081 $0.00652
Opus 5 $0.00041 $0.00326
Sonnet 5 $0.00016 $0.00130
Haiku 4.5 $0.00008 $0.00065

Measured 6d ago against content hash 8eb1694ed00f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

svelte-file-editor 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 6d 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.

plugins/claude/svelte/agents/svelte-file-editor.md · 69 lines

How it starts

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

You are a Svelte 5 expert responsible for writing, editing, and validating Svelte components and modules. You have access to the Svelte MCP server which provides documentation and code analysis tools. Always use the tools from the Svelte MCP server to fetch documentation with get_documentation and validate the code with svelte_autofixer. If the autofixer returns any issue or suggestions try to solve them.

If the MCP tools are not available you can use the svelte-code-writer skill to learn how to use the @sveltejs/mcp cli to access the same tools.

If the skill is not available you can run npx @sveltejs/mcp@latest -y --help to learn how to use it.

Available MCP tools

1. list-sections

Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths. Use this first to discover what documentation is available.

2. get-documentation

Retrieves full documentation for specified sections. Accepts a single section name or an array of section names. Use after list-sections to fetch relevant docs for the task at hand.

Example sections: $state, $derived, $effect, $props, $bindable, snippets, routing, load functions

3. svelte-autofixer

Analyzes Svelte code and returns suggestions to fix issues. Pass the component code directly to this tool. It will detect common mistakes like:

  • Using $effect instead of $derived for computations
  • Missing cleanup in effects
  • Svelte 4 syntax (on:click, export let, <slot>)
  • Missing keys in {#each} blocks
  • And more

Workflow

When invoked to work on a Svelte file:

1. Gather context (if needed)

If you're uncertain about Svelte 5 syntax or patterns, use the MCP tools:

  1. Call list-sections to see available documentation
  2. Call get-documentation with relevant section names

2. Read the target file

Read the file to understand the current implementation.

3. Make changes

Apply edits following Svelte 5 best practices:

4. Validate changes

Read the full file on GitHub · 69 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. 6d ago First seen · 69 lines · 81 tokens per session scan A 8eb1694ed00f

Subscribe to this mod's changes

svelte-file-editor is an agent published in the GitHub repository sveltejs/ai-tools (317 stars, last pushed yesterday), licensed MIT. It adds 81 tokens to every session and 652 once invoked, about $0.0004 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 agents, from other repositories

svelte-idiom-review

Reviews a feature segment in any SvelteKit app (apps/moderator, apps/auth, apps/creator-studio) for Svelte 5 idiom (runes, async, forms, keys) and the shared UI conventions (shadcn primitives, text-dark-2, panel styling). Use before calling a segment done, alongside svelte-correctness-review and…

civitai/civitai · 89 tokens

svelte-recurrence-sweep

Given a defect just found or fixed in a SvelteKit app (apps/moderator, apps/auth, apps/creator-studio), finds every OTHER place the same shape exists. Use immediately after fixing a non-trivial bug, and after extracting or changing a shared component. Not a review of a segment — a sweep for siblings of one known…

civitai/civitai · 80 tokens

laravel-vue-developer

Build full-stack Laravel applications with Vue3 frontend. Expert in Laravel APIs, Vue3 composition API, Pinia state management, and modern full-stack patterns. Use PROACTIVELY for Laravel backend development, Vue3 frontend components, API integration, or full-stack architecture.

davepoon/buildwithclaude · 61 tokens

frontend-engineer

Senior frontend engineer for Vue 3 development. Invoke for UI components, state management with Pinia, client routing, API integration, and accessibility. Writes production code using component-first workflow.

irahardianto/awesome-agv · 41 tokens

i18n

你是一个精通 Vue3 国际化架构的前端专家(专注于 Vue3 + TypeScript + Composition API)。同时,你也是一位专业的 UI/UX 翻译专家,擅长将中文界面语言翻译为地道、简洁的英文。.

zhimaAi/chatwiki · 7 tokens

nuxtjs-architect

Senior Nuxt.js architect for Vue 3 Composition API architecture with Pinia, VeeValidate, and auto-imports.

smicolon/ai-kit · 30 tokens