# svelte-code-writer

> Claude/Codex skill by [@sveltejs](https://omgskills.com/library/sveltejs/index.md) · 334 stars · Updated 2026-10-18

CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating, editing or analyzing any Svelte component (\`.svelte\`) or Svelte module (\`.svelte.ts\`/\`.svelte.js\`). If possible, this skill should be executed within the \`svelte-file-editor\` subagent for optimal results.

## Install

```sh
git clone https://github.com/sveltejs/ai-tools /tmp/ai-tools && ln -s /tmp/ai-tools/tools/skills/svelte-code-writer ~/.claude/skills/svelte-code-writer
```

## From README

CLI tools You have access to @sveltejs/mcp CLI for Svelte-specific assistance. Use these commands via npx: List documentation sections Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths. Get documentation Retrieves full documentation for specified sections. Use after list-sections to fetch relevant docs. Example: Svelte autofixer Analyzes Svelte code and suggests fixes for common issues. Options: --async - Enable async Svelte mode (default: false) --svelte-version - Target version, ideally the full version from package.json (e.g. 5.16.0) so version-specific suggestions are enabled. The major must be 4 or 5 (default: 5) Examples: Important: When passing code with runes ($state, $derived, etc.) via the terminal, escape the $ character as \\$ to prevent shell variable substitution. Workflow Uncertain about syntax? Run list-sections then get-documentation for relevant topics Reviewing/debugging?

## Links

- HTML page: https://omgskills.com/skills/sveltejs/ai-tools/svelte-code-writer/
- GitHub: https://github.com/sveltejs/ai-tools
- Author: [@sveltejs](https://omgskills.com/library/sveltejs/index.md)

## More from this repo

- [svelte-core-bestpractices](https://omgskills.com/skills/sveltejs/ai-tools/svelte-core-bestpractices/index.md) — Guidance on writing fast, robust, modern Svelte code.
   - [@sveltejs](https://omgskills.com/library/sveltejs/index.md) · 334 stars

## More skills by this author

- [performance-investigation](https://omgskills.com/skills/sveltejs/svelte/performance-investigation/index.md) — Investigate performance regressions and find opportunities for optimization
   - [@sveltejs](https://omgskills.com/library/sveltejs/index.md) · 88k stars
