← Explore all agents

FRAMEWORK DEVELOPMENT / Svelte

Svelte File Editor

A focused Svelte editing prompt that consults current documentation and iterates with the Svelte MCP static checker.

“Specialized Svelte 5 code editor. MUST BE USED PROACTIVELY when creating, editing, or reviewing any .svelte file or .svelte.ts/.svelte.js module and MUST”

01 / THE REASONING

Why this made the selection.

  • Separates Svelte component work into a focused agent context with relevant documentation.
  • Requires review of autofixer output after edits instead of treating generated syntax as already validated.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • tools/agents/svelte-file-editor.md
  • README.md (installation and supported-host sections)
  • LICENSE

Our findings

  • The full definition and official subagent guidance were read, alongside the local MCP setup and autofixer implementation.
  • The downloaded file is the original prompt, not a bundled Svelte server or a tested integration.

Not established by this review

  • No upstream definition, helper, installer or generated workload was executed.
  • No end-to-end agent session or effectiveness benchmark was run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Use the role in your project.

Upstream setup instructions ↗
  1. Download the original definition and retain its licence and attribution. Inspect its instructions before loading it.
  2. For Claude Code, put a reviewed working copy in .claude/agents/ as a Markdown agent file. Check the frontmatter name, model and tool permissions for your host.
  3. Configure the official Svelte MCP server first and inspect the exposed tool names. Use the configured MCP workflow rather than assuming the fallback shell command is usable.
  4. Run the project’s required tests and inspect the resulting UI independently of the autofixer.

Before you start

  • Claude Code with project-agent support
  • The actual source, data and tools required for the task; this prompt does not install them
  • A configured Svelte MCP server and a Svelte 5 project

THE COMPLETE REVIEWED DEFINITION

Read it before you reuse it.

Original source bytes, with attribution.
Review the host-specific setup notes above.

---
name: svelte-file-editor
description: Specialized Svelte 5 code editor. MUST BE USED PROACTIVELY when creating, editing, or reviewing any .svelte file or .svelte.ts/.svelte.js module and MUST use the tools from the MCP server or the `svelte-file-editor` skill if they are available. Fetches relevant documentation and validates code using the Svelte MCP server tools.
---

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

After editing, ALWAYS call `svelte-autofixer` with the updated code to check for issues.

### 5. Fix any issues

If the autofixer reports problems, fix them and re-validate until no issues remain.

## Output format

After completing your work, provide:

1. Summary of changes made
2. Any issues found and fixed by the autofixer
3. Recommendations for further improvements (if any)

The download contains svelte-file-editor.md. Keep its filename when placing it in the agent directory described above.

By Svelte. Exact upstream source ↗ · Licence · Attribution

SHA-256 50d8ad485802d3ca15a2cf17e50effb1d8707f59edc4466cda5944441b0e181a

Read the applicable licence
MIT License

Copyright (c) 2026 [Svelte Contributors](https://github.com/sveltejs/ai-tools/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://github.com/sveltejs/ai-tools/blob/5c15fbcb5b630ac8ce0281ee1782fc2056fab853/tools/agents/svelte-file-editor.md

    Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, access

  2. https://github.com/sveltejs/ai-tools/blob/5c15fbcb5b630ac8ce0281ee1782fc2056fab853/README.md

    Supports: install, compatibility

  3. https://github.com/sveltejs/ai-tools/blob/5c15fbcb5b630ac8ce0281ee1782fc2056fab853/LICENSE

    Supports: license, access.cost

  4. https://github.com/sveltejs/ai-tools/blob/5c15fbcb5b630ac8ce0281ee1782fc2056fab853/documentation/docs/50-subagents/10-subagent.md

    Supports: install, compatibility, whySelected

  5. Svelte local MCP setup ↗Checked

    https://svelte.dev/docs/mcp/local-setup

    Supports: install, limitations, access

  6. https://code.claude.com/docs/en/sub-agents

    Supports: install, compatibility, limitations, access