
sveltejs/ai-tools
2 skills7.5k installs532 starsGitHub
Install
npx skills add https://github.com/sveltejs/ai-toolsSkills in this repo
1Svelte Code WriterSvelte Code Writer wires your coding agent to the official @sveltejs/mcp CLI so Svelte 5 and SvelteKit work stays aligned with current documentation and automated fixes. The skill is explicit: whenever you create, edit, or analyze a Svelte component or Svelte module file, you should use these tools rather than improvising runes, $state, $derived, or Kit conventions from memory. Solo builders shipping SaaS or mobile-adjacent web UIs get list-sections for discovery, get-documentation for full section text, and svelte-autofixer for inline code or file paths—including Svelte 4 fallback via flags. Run commands through npx, escape $ in inline snippets as documented, and prefer the dedicated svelte-file-editor agent when your stack exposes it for tighter file-scoped edits.5.4kinstalls2Svelte Core BestpracticesSvelte Core Best Practices for attachments teaches solo and indie builders how to use Svelte 5’s {@attach} directive instead of ad-hoc DOM side effects. Attachments run in an effect when an element mounts and when reactive state read inside the function changes, with optional teardown before re-run or on unmount. The skill walks through inline attachment functions and the attachment-factory pattern—functions like tooltip(content) that return an Attachment—for encapsulating behaviors such as third-party widgets. It clarifies that factories run inside effects so changing bound state recreates attachments cleanly. Use it while building Svelte 5.29+ apps when you need lifecycle-safe DOM integration, composable behaviors on elements, and patterns that align with Svelte’s reactivity rather than generic framework-agnostic hooks.2.1kinstalls