/svelte-skills:svelte-template-directivesfrom svelte-skills
Covers Svelte template directives: @attach (reactive DOM manipulation), @html, @render, @const, @debug. Useful for integrating third-party libraries, tooltips, canvas, and dynamic HTML.
Ships in svelte-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The reactive alternative to use: actions. Re-runs when dependencies
change, passes through components via spread, supports cleanup functions.
<script>
import ImageZoom from 'js-image-zoom';
function useZoom(options) {
return (element) => {
new ImageZoom(element, options);
return () => console.log('cleanup');
};
}
</script>
<!-- Re-runs if options changes (use: wouldn't!) -->
<figure {@attach useZoom({ width: 400 })}>
<img src="photo.jpg" alt="zoomable" />
</figure>
| Directive | Purpose | Reactive? |
|---|---|---|
{@attach} | DOM manipulation, 3rd-party | Yes |
{@html} | Render raw HTML strings | Yes |
{@render} | Render snippets | Yes |
{@const} | Local constants in blocks | N/A |
{@debug} | Pause debugger on value change | N/A |
{#each (key)} | Keyed iteration (always key!) | Yes |
<svelte:window> | Window event listeners | N/A |
| Feature | use: | @attach |
|---|---|---|
| Re-runs on arg change | No | Yes |
| Composable | Limited | Fully |
| Pass through props | Manual | Auto via spread |
| Convert legacy | N/A | fromAction() |
@attach requires Svelte 5.29+fromAction from svelte/attachments to convert legacy actions<svelte:window>/<svelte:document> for global events, not $effectWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/ecosystem-guideGuide to spences10's Claude Code ecosystem tools. Use when user asks which tool to use, how tools relate, or needs help choosing between MCP servers, skills, or CLIs./svelte-componentsSvelte component patterns. Use for web components, component libraries (Bits UI, Ark UI, Melt UI), form patterns, or third-party integration./svelte-deploymentSvelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds./sveltekit-data-flowSvelteKit data flow guidance. Use for load functions, form actions, server/client data, and invalidation. Covers +page.server.ts vs +page.ts, serialization, fail(), redirect(), error(), invalidateAll()./sveltekit-remote-functionsSvelteKit remote functions guidance. Use for query(), form(), command(), and prerender() patterns in .remote.ts files./sveltekit-structureSvelteKit structure guidance. Use for routing, layouts, error handling, SSR, or svelte:boundary. Covers file naming, nested layouts, error boundaries, pending UI, and hydration.npx claudepluginhub spences10/svelte-skills-kit --plugin svelte-skillsOther plugins' skills for the same job