Use the Svelte MCP server for Svelte 5 and SvelteKit documentation and automation.
- When asked about Svelte or SvelteKit, call
list-sectionsfirst to discover relevant docs (returns titles, use_cases, and paths). - Review the
use_cases, then callget-documentationfor every relevant section you identified. - Run
svelte-autofixeron any Svelte code you write and repeat until it reports no issues or suggestions. - Offer
playground-linkonly after the user confirms they want a playground URL and only when the code was not written to project files.
list-sections: initial discovery of documentation.get-documentation: fetch full content for chosen sections (single or multiple).svelte-autofixer: analyze Svelte code and return fixes/suggestions.playground-link: generate a Svelte Playground link after user opt-in.
- Package manager: prefer
pnpm(lockfile present). Install deps withpnpm install. - Dev/build:
pnpm dev,pnpm build,pnpm preview. - Static checks:
pnpm check(svelte-check) andpnpm lint; format withpnpm format. - Unit tests:
pnpm test(Vitest, jsdom). - Visual regression:
pnpm test:visual(starts dev server, uses Puppeteer). Baselines live insrc/snapshots/; latest/diff/report output tostatic/__vr/. Optional: setVR_DIFF_THRESHOLDto adjust tolerance and runpnpm vr:reportto generatestatic/__vr/report.html.
- Follow Go best practices and idiomatic patterns
- Maintain existing code structure and organization
- Use dependency injection patterns where appropriate
- Write unit tests for new functionality. Use table-driven unit tests when possible.
- Run
pnpm formatafter adding new code to make sure it's formatted correctly.