Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/TheSethRose/DevRulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/thesethrose/devrules/svelte5)<a href="https://agentmods.dev/rules/thesethrose/devrules/svelte5"><img src="https://agentmods.dev/badge/rules/thesethrose/devrules/svelte5/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/thesethrose/devrules/svelte5"><img src="https://agentmods.dev/badge/rules/thesethrose/devrules/svelte5.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01054 |
| Opus 5.5 | $0.00000 | $0.00422 |
| Sonnet 5.5 | $0.00000 | $0.00211 |
| Haiku 4.5 | $0.00000 | $0.00105 |
Grade A, and why
Svelte5 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Svelte 5+ Best Practices
Core Principles
- Compiler as Framework: Understand Svelte compiles your code to small, imperative JavaScript at build time.
- Reactivity with Runes: Leverage Svelte 5's rune-based reactivity system (
$state,$derived,$effect).
Component Structure (.svelte files)
- Structure: Organize components with
<script>, template markup, and<style>sections. - Keep Components Focused: Design components with a single, clear responsibility.
- Props: Define component inputs using
export let propNameor$props()rune.- Use
$props()for better explicitness and compatibility with future features. - Provide default values for props if applicable (
export let count = 0).
- Use
- Slots: Use
<slot>elements (default and named) to allow parent components to inject content. - Scoped Styles: Styles within
<style>are scoped to the component by default.
Reactivity (Runes - Svelte 5+)
- State Declaration: Use
$state()to declare reactive component state.<script> let count = $state(0); </script> - Derived State: Use
$derived()for values computed from other reactive state. Svelte optimizes these derivations.<script> let count = $state(0); let double = $derived(count * 2); </script> - Side Effects: Use
$effect()to run code reactively in response to state changes (e.g., logging, data fetching, manual DOM manipulation). Effects automatically track their dependencies.<script> let count = $state(0); $effect(() => { console.log('Count changed:', count); // Cleanup function (optional) return () => console.log('Effect cleanup'); }); </script> - Avoid Top-Level Effects: Prefer
$effectwithin the component instance scope. For module-level effects (rarely needed), userunevariants like$effect.root()with caution.
Templating Syntax
- Text Interpolation: Use curly braces
{expression}to embed JavaScript expressions in text. - Attribute Binding: Bind attributes using
{attribute}shorthand orattribute={expression}. - Event Handling: Use
on:eventnameto listen for DOM events. - Conditional Rendering: Use
{#if expression} ... {:else if expression} ... {:else} ... {/if}blocks. - List Rendering: Use
{#each list as item, index (key)} ... {:else} ... {/each}blocks. Always provide a uniquekeyexpression for efficient updates. - Await Blocks: Use
{#await promise} ... {:then value} ... {:catch error} ... {/await}to handle promises directly in the markup.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 81 lines · 1,054 tokens per session scan A 45b58d7c04b6
Svelte5 is a cursor rule published in the GitHub repository TheSethRose/DevRules (26 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,054 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
svelte-5-vs-svelte-4-cursorrules-prompt-file
Cursor rules for comparing Svelte 5 and Svelte 4 development.
sveltekit-typescript-guide-cursorrules-prompt-file
Cursor rules for SvelteKit development with TypeScript integration.
javascript-astro-tailwind-css-cursorrules-prompt-f
Cursor rules for JavaScript development with Astro and Tailwind CSS integration.
sveltekit-tailwindcss-typescript-cursorrules-promp
Cursor rules for SvelteKit development with Tailwind CSS and TypeScript integration.
sveltekit-restful-api-tailwind-css-cursorrules-pro
Cursor rules for SvelteKit development with RESTful API and Tailwind CSS integration.
svelte
Svelte best practices and patterns for modern web applications.