SvelteKit Engineer
Use this skill for SvelteKit work: routes, layouts, load functions, form
actions, endpoints, hooks, cookies, auth, environment variables, adapters,
redirects, errors, and server-only modules.
Operating contract
- Inspect the route tree, layout hierarchy, server modules, hooks, adapter,
existing auth/session code, forms, and tests before editing.
- Use Svelte MCP documentation before changing SvelteKit APIs, routing
behavior, load/action semantics, adapter behavior, or current migration
paths.
- Keep private data and credentials on server-only surfaces.
- Preserve progressive enhancement for forms unless the product requirement
explicitly chooses a client-only flow.
- Use redirects, errors, cookies, and headers through SvelteKit-supported
primitives, not ad hoc response handling.
- Route component-only work to
svelte-component-engineer and final proof to
svelte-verification.
Server/client boundaries
- Do not import server-only modules into client-rendered code.
- Treat environment variables, credentials, database clients, and privileged API
calls as server-owned.
- Keep route data minimal and serializable.
- Avoid leaking internal error details to users.
- Prefer project-owned auth/session helpers over introducing a parallel system.
Read the relevant reference
| Reference |
Read when |
| sveltekit-surfaces.md |
Choosing routes, layouts, loads, actions, endpoints, redirects, and errors. |
| server-and-security.md |
Handling cookies, auth, env, server-only modules, adapters, and deployment risk. |
When a fix changes request handling, state which HTTP path, method, session
state, and failure path were verified.
1---2name: sveltekit-engineer3description: Use when implementing, reviewing, or debugging SvelteKit routes, layouts, load functions, form actions, endpoints, hooks, cookies, auth, env, adapters, redirects, or server-only modules. Do not use for component-only work.4---56# SvelteKit Engineer78Use this skill for SvelteKit work: routes, layouts, `load` functions, form9actions, endpoints, hooks, cookies, auth, environment variables, adapters,10redirects, errors, and server-only modules.1112## Operating contract13141. Inspect the route tree, layout hierarchy, server modules, hooks, adapter,15 existing auth/session code, forms, and tests before editing.162. Use Svelte MCP documentation before changing SvelteKit APIs, routing17 behavior, load/action semantics, adapter behavior, or current migration18 paths.193. Keep private data and credentials on server-only surfaces.204. Preserve progressive enhancement for forms unless the product requirement21 explicitly chooses a client-only flow.225. Use redirects, errors, cookies, and headers through SvelteKit-supported23 primitives, not ad hoc response handling.246. Route component-only work to `svelte-component-engineer` and final proof to25 `svelte-verification`.2627## Server/client boundaries2829- Do not import server-only modules into client-rendered code.30- Treat environment variables, credentials, database clients, and privileged API31 calls as server-owned.32- Keep route data minimal and serializable.33- Avoid leaking internal error details to users.34- Prefer project-owned auth/session helpers over introducing a parallel system.3536## Read the relevant reference3738| Reference | Read when |39| ----------------------------------------------------------- | -------------------------------------------------------------------------------- |40| [sveltekit-surfaces.md](references/sveltekit-surfaces.md) | Choosing routes, layouts, loads, actions, endpoints, redirects, and errors. |41| [server-and-security.md](references/server-and-security.md) | Handling cookies, auth, env, server-only modules, adapters, and deployment risk. |4243When a fix changes request handling, state which HTTP path, method, session44state, and failure path were verified.