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.
npx agentmods add rules/travishorn/cursor-rules-sveltekit/sveltekit-2git clone --depth 1 https://github.com/travishorn/cursor-rules-sveltekitWrote 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/travishorn/cursor-rules-sveltekit/sveltekit-2)<a href="https://agentmods.dev/rules/travishorn/cursor-rules-sveltekit/sveltekit-2"><img src="https://agentmods.dev/badge/rules/travishorn/cursor-rules-sveltekit/sveltekit-2.svg" alt="Measured on agentmods" 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.03037 |
| Opus 5 | $0.00000 | $0.01519 |
| Sonnet 5 | $0.00000 | $0.00607 |
| Haiku 4.5 | $0.00000 | $0.00304 |
Grade A, and why
sveltekit-2 scanned grade A with 1 finding 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 5d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = fetch(url).then(r => r.json()); How it starts
The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SvelteKit 2
This project uses the newer SvelteKit 2 instead of the older, but more common SvelteKit 1.
Using SvelteKit version 2 instead of version 1 is mostly seamless. There are a few breaking changes to note, which are listed here.
redirect and error are no longer thrown by you
Previously, you had to throw the values returned from error(...) and redirect(...) yourself. In SvelteKit 2 this is no longer the case — calling the functions is sufficient.
Old, SvelteKit 1 syntax:
import { error } from '@sveltejs/kit'
// ...
throw error(500, 'something went wrong');
New, SvelteKit 2 syntax:
import { error } from '@sveltejs/kit'
// ...
error(500, 'something went wrong');
Do not use error or redirect inside a try {...} block.
path is required when setting cookies
When receiving a Set-Cookie header that doesn't specify a path, browsers will set the cookie path to the parent of the resource in question. This behaviour isn't particularly helpful or intuitive, and frequently results in bugs because the developer expected the cookie to apply to the domain as a whole.
As of SvelteKit 2.0, you need to set a path when calling cookies.set(...), cookies.delete(...) or cookies.serialize(...) so that there's no ambiguity. Most of the time, you probably want to use path: '/', but you can set it to whatever you like, including relative paths — '' means 'the current path', '.' means 'the current directory'.
Old, SvelteKit 1 syntax:
/** @type {import('./$types').PageServerLoad} */
export function load({ cookies }) {
cookies.set(name, value);
return { response }
}
New, SvelteKit 2 syntax:
/** @type {import('./$types').PageServerLoad} */
export function load({ cookies }) {
cookies.set(name, value, { path: '/' });
return { response }
}
Top-level promises are no longer awaited
In SvelteKit version 1, if the top-level properties of the object returned from a load function were promises, they were automatically awaited. With the introduction of streaming this behavior became a bit awkward as it forces you to nest your streamed data one level deep.
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.
- 5d ago First seen · 239 lines · 0 tokens per session scan A d2d80c32be1b
sveltekit-2 is a cursor rule published in the GitHub repository travishorn/cursor-rules-sveltekit (9 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,037 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
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.
vue-typescript-patterns
Cursor rule "vue-typescript-patterns" from soaring-xiongkulu/easyaiot, covering vue3 + typescript 开发规范, vue 组件规范, vue sfc 组件规范, typescript 规范 and 状态管理.
svelte-mcp-tools
Instructions for using the Svelte MCP server tools for documentation lookup, code analysis, and validation.
frontend-component
Vue component structure, styling, derived state, modals, icons, DaisyUI/Tailwind frontend component conventions.
frontend
Vue frontend — components, Vitest, generated API client, apiCallWithLoading, DaisyUI. Read this first for any frontend work.