svelte-code-writer

Look up Svelte 5 documentation and analyze Svelte components using the @sveltejs/mcp CLI.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aashahin/ai-skills --skill svelte-code-writer-aashahin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: svelte-code-writer
Source: https://github.com/aashahin/ai-skills/tree/main/svelte-code-writer
Command: npx skills add https://github.com/aashahin/ai-skills --skill svelte-code-writer-aashahin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @sveltejs/mcp.

What problem does it solve? Writing or debugging Svelte 5 components requires accurate knowledge of runes like $state, $derived, and $effect, and mistakes are easy to make without checking official documentation or running static analysis on the code. ## Core Features & Use Cases - Documentation Lookup: List all Svelte 5 and SvelteKit documentation sections and retrieve full docs for specific topics via npx @sveltejs/mcp list-sections and get-documentation. - Code Analysis: Run svelte-autofixer on inline code or component files to detect common issues, with options for async mode and Svelte 4 or 5 targeting. - Use Case: When editing a .svelte component that uses $state and $derived, fetch the relevant rune documentation to confirm syntax, then run the autofixer on the file before finalizing it. ## Quick Start Ask the assistant to review your Svelte component file with the svelte-autofixer and fix any issues it reports.

Frequently Asked Questions about svelte-code-writer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I look up Svelte 5 documentation from the command line?▼

Run `npx @sveltejs/mcp list-sections` to see all available Svelte 5 and SvelteKit documentation sections, then use `npx @sveltejs/mcp get-documentation "<section1>,<section2>"` to retrieve the full docs for the topics you need.

How do I check a Svelte component for common issues?▼

Run `npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte` to analyze the file and get suggested fixes. You can also pass inline code directly, but escape `$` as `\$` so the shell does not interpret runes like $state as variables.

Does the Svelte autofixer support Svelte 4 code?▼

Yes, the svelte-autofixer command accepts a `--svelte-version` option that targets either version 4 or 5, with 5 as the default. Use `--svelte-version 4` when analyzing legacy Svelte components.

Why does my inline Svelte code analysis produce wrong results in the terminal?▼

The shell interprets `$` characters in runes like `$state` or `$derived` as variable substitutions before the code reaches the analyzer. Escape each `$` as `\$` when passing inline code to svelte-autofixer.

When should I run the Svelte autofixer during development?▼

Run it whenever you are reviewing or debugging a component, and always before finalizing any Svelte component you create or edit. It catches common issues in .svelte files and .svelte.ts/.svelte.js modules.