Svelte Code Writer
Use this workflow when creating, editing, reviewing, or debugging Svelte files.
Workflow
- Load
svelte-core-bestpracticesfor baseline Svelte 5 rules. - Load deeper local skills as needed:
svelte-runes,svelte-template-directives,svelte-styling,sveltekit-data-flow, orsveltekit-structure. - Check relevant official docs when syntax or behavior is uncertain.
- Validate changed Svelte files before finalizing.
Official Svelte CLI Helpers
List documentation sections:
npx @sveltejs/mcp list-sections
Fetch relevant documentation sections:
npx @sveltejs/mcp get-documentation "$state,$derived,$effect"
Analyze a Svelte file:
npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte
If a project uses async Svelte features, include --async:
npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte --async
Notes
- Prefer checking docs for exact syntax over guessing.
- Escape
$when passing inline rune code through a shell. - Run validation on every changed
.svelte,.svelte.ts, and.svelte.jsfile when practical. - Last verified: 2026-05-14