svelte-template-directives

Add reactive template directives for DOM manipulation and library integration in Svelte.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/kvnaponte/Cinema_Puntuacion --skill svelte-template-directives-kvnaponte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: svelte-template-directives
Source: https://github.com/kvnaponte/Cinema_Puntuacion/tree/main/.claude/skills/svelte-template-directives
Command: npx skills add https://github.com/kvnaponte/Cinema_Puntuacion --skill svelte-template-directives-kvnaponte

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of adding advanced functionalities to Svelte components, such as DOM manipulation, third-party library integration, and dynamic HTML rendering.

Core Features & Use Cases

  • Reactive DOM Manipulation: Use @attach to integrate third-party libraries and manipulate the DOM reactively.
  • Dynamic HTML Rendering: Render raw HTML strings with {@html} and snippets with {@render}.
  • Local Constants: Declare local constants within blocks with {@const}.
  • Debugging: Use {@debug} to pause execution and inspect values.
  • Use Case: Quickly add a tooltip to a button or highlight text without leaving the Svelte template.

Quick Start

Use the svelte-template-directives skill to add a tooltip to a button with the text 'Hover for more info'.

Frequently Asked Questions about svelte-template-directives

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate third-party libraries for DOM manipulation in Svelte components?

You can integrate third-party libraries for DOM manipulation in Svelte by using reactive template directives like @attach, enabling dynamic HTML rendering directly within your templates.

What is the best way to render raw HTML strings dynamically in Svelte?

The best way to render raw HTML strings dynamically in Svelte is by using the {@html} template directive, which allows you to inject unescaped HTML content directly into your component's template.

How do I add interactive features like tooltips without leaving Svelte templates?

You can add interactive features like tooltips without leaving Svelte templates by applying reactive template directives to enhance elements, such as attaching tooltip functionality directly to a button.

Can I declare local constants within Svelte template blocks?

Yes, you can declare local constants within Svelte template blocks by using the {@const} directive, allowing you to define variables scoped specifically to that block for cleaner reactive rendering.

How does the Svelte @debug directive work for inspecting values?

The Svelte {@debug} directive works by pausing code execution when specific variables change, opening the debugger so you can inspect current values and troubleshoot reactive template behavior.

Does this approach require external dependencies to enhance Svelte templates?

No, this approach requires no external dependencies to enhance Svelte templates, as the reactive template directives operate within the native Svelte environment to handle DOM manipulation and dynamic rendering.