SvelteKit Cursor Rules Starter (Free)

Three SvelteKit rules that fix the mistakes agents make most often, ready to drop into .cursor/rules/, plus a linter.

SvelteKit Cursor Rules Starter (Free) cover

What it is

3 Cursor project rules for SvelteKit you can drop into a repo today, plus lint_rules.py, which tells you why a Cursor rule isn't loading.

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 5 tests OK on Python 3.13 and 3.10.

Real terminal output from SvelteKit Cursor Rules Starter: demo and passing tests

The rules (in .cursor/rules/)

RuleLoadsFirst instruction
sveltekit-overview.mdcalwaysCheck @sveltejs/kit and svelte versions in package.json first
sveltekit-runes-components.mdcby file (src//*.svelte, src//*.svelte.ts, src//*.svelte.js)State: let count = $state(0)
sveltekit-routing-state.mdcby file (src/routes/, src/lib//*.ts)Read page info from $app/state (page, navigating, updated), not $app/stores (removed in SvelteKit 3)

Install

Copy .cursor/rules/ into your project root (keep the .mdc extension). Then check them against your code:

python3 tools/lint_rules.py .cursor/rules --project .
./tools/demo.sh        # copies the rules into examples/sample-app and lints them
./run_tests.sh

Honest limits

  • Rules guide the model; they don't enforce anything.
  • Check version-specific advice against your installed versions.

Format and license

Zip, 12 KB, v1.0, 21 files. Free to use, modify and share for any purpose, including commercial work, as long as this notice stays in copies. Not affiliated with or endorsed by Cursor (Anysphere) or Svelte or SvelteKit.

FAQ

SvelteKit 2 or 3?
Both; the rules mark 3-only changes ($lib to #lib, config in vite.config, removed $app/stores) and tell the agent to check package.json first.
Is it really free?
Yes, free to use, change and share.
What's in the paid pack?
7 rules: Svelte 5 runes and snippets, load functions and remote functions, form actions, hooks and auth, routing and $app/state, testing.
How do I get the files?
Click Download free. The zip downloads straight away: no checkout, no account.
Do I have to sign up for the newsletter?
No. The form is optional and the download works without it.

Get SvelteKit Cursor Rules Starter (Free)

Free SvelteKit Cursor rules in .mdc format, checked against current SvelteKit docs, plus a linter that shows why a rule isn't applying.

Pairs well with

Download$12

Cursor Rules for Expo (React Native)

6 Cursor rules for Expo, written against current docs. Installs in one command, exports AGENTS.md for Claude Code and Codex. $12 once.

View Cursor Rules for Expo (React Native)
DownloadFree

Expo Cursor Rules Starter (Free)

Free Expo Cursor rules in .mdc format, checked against current Expo docs, plus a linter that shows why a rule isn't applying.

View Expo Cursor Rules Starter (Free)
Download$19

Claude Code Subagents Pack

10 Claude Code subagents (reviewer, security, tests, debugger, migrations, upgrades, docs, PRs, performance, refactors) plus a linter. $19 once.

View Claude Code Subagents Pack

Related