svelte

svelte is a cursor rule for Cursor from nedcodes-ok/cursor-doctor. It costs 273 tokens per session, scanned A, a copy of svelte, MIT.

A set of coding rules for Svelte 5, a framework for building interactive web interfaces. It covers Svelte's runes for state and reactivity, component structure, shared data, asynchronous rendering, and styling.

In plain words
What is it for?
Use it when creating or changing Svelte 5 components, reactive state, derived values, effects, props, stores, shared context, transitions, or scoped styles.
Why use it?
It keeps Svelte components consistent and uses Svelte 5's current patterns for updating the interface. This reduces overly large components, broken updates, and unnecessary styling conflicts.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions Cursor.

Good fit Use it when creating or changing Svelte 5 components, reactive state, derived values, effects, props, stores, shared context, transitions, or scoped styles.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/nedcodes-ok/cursor-doctor/svelte
Install

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.

Clone the repo
git clone --depth 1 https://github.com/nedcodes-ok/cursor-doctor

Made for: Cursor.

Wrote 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.

agentmods badge for svelte

README.md
[![agentmods](https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/svelte/github.svg)](https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/svelte)
Your own site
<a href="https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/svelte"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/svelte/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.

agentmods 80×15 button for svelte

Your own site · 80×15
<a href="https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/svelte"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/svelte.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 273 This file is loaded in full into every session.
When invoked 273 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00273 $0.00273
Opus 5.5 $0.00109 $0.00109
Sonnet 5.5 $0.00055 $0.00055
Haiku 4.5 $0.00027 $0.00027

Measured 1mo ago against content hash 1edf91de3728, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

svelte 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.

Origin

This is a copy

100% identical to svelte — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

pro-kit/templates/frameworks/svelte.mdc · 39 lines

What it actually says

Svelte Cursor Rules

You are an expert Svelte 5 developer. Follow these rules:

Runes (Svelte 5)

  • $state() for reactive state
  • $derived() for computed values
  • $effect() for side effects
  • $props() for component props with defaults
  • $bindable() for two-way binding props

Components

  • Keep under 150 lines. Use TypeScript with lang="ts"
  • Props down, events up
  • {#snippet} for reusable template fragments

Reactivity

  • State is reactive by default — don't over-engineer
  • $state.frozen() for large immutable data
  • Reassign arrays/objects for reactivity, don't mutate
  • untrack() to read without dependency

Styling

  • Scoped styles by default. :global() sparingly
  • CSS custom properties for theming
  • Svelte transitions over CSS for enter/exit

Patterns

  • {#await} for inline async rendering
  • {#each items as item (item.id)} with keys
  • Stores for shared state across components
  • setContext/getContext for dependency injection
Changes

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.

  1. 1mo ago First seen · 39 lines · 273 tokens per session scan A 1edf91de3728

Subscribe to this mod's changes

svelte is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (10 stars, last pushed 7mo ago), licensed MIT. It adds 273 tokens to every session, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to svelte, differing in 0 lines, and is treated as a copy.