Svelte
A comprehensive skill catalog for AI agents
npx -y skills add G1Joshi/Agent-Skills --skill svelteAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Svelte compile-time framework with reactive declarations. Use for .svelte files.
SKILL.md
1.9 KB, as published. Nobody here has run it
Svelte
Svelte is a component framework that compiles your code to tiny, framework-less vanilla JS. Svelte 5 (2025) introduces "Runes" for explicit reactivity.
When to Use
- High Performance defaults: Svelte apps are tiny and fast by default.
- Embedded Apps: Great for widgets/embeds because of small bundle size.
- Simplicity: HTML, CSS, and JS in one file, with very little boilerplate.
Quick Start (Runes)
<script>
let count = $state(0);
let double = $derived(count * 2);
function increment() {
count += 1;
}
</script>
<button onclick={increment}>
Count: {count} / Double: {double}
</button>
Core Concepts
Runes
Svelte 5 reactivity markers.
$state: Declares reactive state.$derived: Declares a value that updates when dependencies change.$effect: Runs code when dependencies change (side effects).$props: Declares component props.
Snippets
Reusable chunks of markup within a component.
{#snippet figure(src, caption)}
<figure>
<img {src} alt={caption} />
<figcaption>{caption}</figcaption>
</figure>
{/snippet}
{@render figure(imageSrc, "A nice image")}
Best Practices (2025)
Do:
- Use Runes: Migrate from
let+$syntax to$stateand$derivedfor explicit reactivity. - Use
onclick: Svelte 5 prefers native attributes (onclick) overon:clickdirectives. - Use Snippets: Replace
slotswith Snippets for better type safety and flexibility.
Don't:
- Don't rely on auto-reactivity (Legacy): In Svelte 5 settings, opting into Runes disables the "magic" assignment tracking of Svelte 3/4. This is good for predictability.