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/spences10/sveltest/cursorrulesgit clone --depth 1 https://github.com/spences10/sveltestWhat 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 | $0.00000 | $0.02253 |
| Opus 5 | $0.00000 | $0.01126 |
| Sonnet 5 | $0.00000 | $0.00451 |
| Haiku 4.5 | $0.00000 | $0.00225 |
Grade A, and why
cursorrules 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 yesterday.
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 — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Rules & Best Practices
You are an expert in Svelte 5, SvelteKit, TypeScript, and modern testing with vitest-browser-svelte.
Core Testing Principles
1. Testing Coverage Strategy
- Aim for 100% test coverage using the "Foundation First" approach
- Start with complete test structure - write all describe blocks and test stubs first
- Use
.skipfor unimplemented tests to create comprehensive test plan - Implement tests incrementally - remove
.skipas you write each test - Test all code paths - every branch, condition, and edge case
2. Test File Organization
- Component Tests:
*.svelte.test.ts- Real browser testing with vitest-browser-svelte - SSR Tests:
*.ssr.test.ts- Server-side rendering validation - Server Tests:
*.test.ts- API routes, utilities, business logic - Colocate tests next to the files they test
vitest-browser-svelte Patterns
Essential Imports & Setup
import { describe, expect, test, vi } from 'vitest';
import { render } from 'vitest-browser-svelte';
import { page } from '@vitest/browser/context';
import { createRawSnippet } from 'svelte';
import { flushSync, untrack } from 'svelte';
CRITICAL: Always Use Locators, Never Containers
// ❌ NEVER use containers - no auto-retry, manual DOM queries
const { container } = render(MyComponent);
const button = container.querySelector('[data-testid="submit"]');
// ✅ ALWAYS use locators - auto-retry, semantic queries
render(MyComponent);
const button = page.getByTestId('submit');
await button.click(); // Automatic waiting and retrying
Locator Patterns (Auto-retry Built-in)
// ✅ Semantic queries (preferred - test accessibility)
page.getByRole('button', { name: 'Submit' });
page.getByRole('textbox', { name: 'Email' });
page.getByLabel('Email address');
page.getByText('Welcome');
// ✅ Test IDs (when semantic queries aren't possible)
page.getByTestId('submit-button');
// ✅ Assertions with locators (always await)
await expect.element(page.getByText('Success')).toBeInTheDocument();
await expect.element(page.getByRole('button')).toBeDisabled();
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.
- yesterday First seen · 343 lines · 2,253 tokens per session scan A 121995c8952f
cursorrules is a cursor rule published in the GitHub repository spences10/sveltest (112 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,253 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-08-30.
Other cursor rules, from other repositories
svelte
You are an expert in Svelte 5, SvelteKit, TypeScript, and modern web development.
praman-cli
Praman CLI patterns for SAP UI5 test automation with playwright-cli.
praman
Praman v1.0 — SAP UI5 Test Automation Platform for Playwright.
tests
Praman test writing rules — Vitest unit tests and Playwright integration tests.
cursor-rules-appendable
Praman SAP UI5 Test Automation Rules.
neverthrow
When handling errors, use the neverthrow library to handle errors.