Home › SvelteKit › SvelteKit AGENTS.md
SvelteKit AGENTS.md
AGENTS.md for SvelteKit 2 + Svelte 5 (runes) apps with TypeScript.
AGENTS.mdSvelteKit
How to use
Save this as AGENTS.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.
AGENTS.mdDownload # AGENTS.md — SvelteKit
- Svelte 5 with runes: `$state`, `$derived`, `$effect`, `$props`. Do not use legacy `export let` or `$:` syntax in new code.
- Load data in `+page.server.ts` `load` functions; mutations via form `actions` with progressive enhancement (`use:enhance`).
- Shared server code in `src/lib/server/` (never importable from the client).
- Env: `$env/static/private` for secrets, `$env/static/public` for `PUBLIC_*` values.
- Styling: component-scoped `<style>` or Tailwind, matching what the file already uses.
- Checks: `pnpm check && pnpm lint && pnpm test` must pass before finishing.