svelte-code-writer
Original:🇺🇸 English
Not Translated
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 agent for optimal results.
3installs
Sourcesveltejs/ai-tools
Added on
NPX Install
npx skill4agent add sveltejs/ai-tools svelte-code-writerSKILL.md Content
Svelte 5 Code Writer
CLI Tools
You have access to CLI for Svelte-specific assistance. Use these commands via :
@sveltejs/mcpnpxList Documentation Sections
bash
npx @sveltejs/mcp list-sectionsLists all available Svelte 5 and SvelteKit documentation sections with titles and paths.
Get Documentation
bash
npx @sveltejs/mcp get-documentation "<section1>,<section2>,..."Retrieves full documentation for specified sections. Use after to fetch relevant docs.
list-sectionsExample:
bash
npx @sveltejs/mcp get-documentation "$state,$derived,$effect"Svelte Autofixer
bash
npx @sveltejs/mcp svelte-autofixer "<code_or_path>" [options]Analyzes Svelte code and suggests fixes for common issues.
Options:
- - Enable async Svelte mode (default: false)
--async - - Target version: 4 or 5 (default: 5)
--svelte-version
Examples:
bash
# 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 4Important: When passing code with runes (, , etc.) via the terminal, escape the character as to prevent shell variable substitution.
$state$derived$\$Workflow
- Uncertain about syntax? Run then
list-sectionsfor relevant topicsget-documentation - Reviewing/debugging? Run on the code to detect issues
svelte-autofixer - Always validate - Run before finalizing any Svelte component
svelte-autofixer