skills/sveltekit/SKILL.md
Build, review, refactor, and debug modern SvelteKit apps. Use for routes, `+page/+layout/+server`, `load`, form actions, hooks, cookies, auth, invalidation, SSR, hydration, navigation, and URL/server/client state boundaries, even for small bugfixes or features.
npx skillsauth add sjunepark/custom-skills sveltekitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Work from current SvelteKit idioms. Optimize for route and data flows that stay correct under SSR, hydration, navigation, and progressive enhancement.
Do not spend time explaining basic framework syntax unless the user asks. Focus on boundaries, best practices, gotchas, and the shortest correct implementation.
Use this skill when the hard part is app-level or route-level behavior.
load, actions, +server.*, hooks, cookies, auth, SSR or hydration behavior, invalidation, route state, and server/client boundaries.svelte skill.package.json, svelte.config.*, the route tree, hooks, and nearby route files.+page.server.*, +layout.server.*, +server.*, hooks, or $lib/server/*.$lib, not route files.+page.server.* or +layout.server.* when code needs secrets, direct database access, cookies, or trusted request context.load only when the logic is safe on both server and client and rerunning in the browser is acceptable.load side-effect free. Fetch, read, and derive there; mutate in actions, endpoints, or other server handlers.fetch provided by SvelteKit inside load so cookies, auth, SSR inlining, and internal request shortcuts work correctly.load instead of pushing reshaping work into every consumer.load becomes part of the SSR payload and may be visible to the client.$types helpers like PageProps, LayoutProps, and route-specific load/action types.page.data when parent layouts need child data, but do not create hidden coupling casually.parent() deliberately. Call other independent async work first to avoid accidental waterfalls.depends() and targeted invalidation when automatic reruns are insufficient. Do not scatter invalidateAll() as a default refresh strategy.fail(...) rather than throwing generic errors for expected bad input.method="GET" plus URL params for idempotent filter and search forms.use:enhance for progressive enhancement, not to replace the native form flow with a custom client-side mutation system.applyAction or custom enhance callbacks only when the default enhanced flow is insufficient.+server.* endpoints for API-style interactions, webhooks, non-form clients, or cases where the action model is awkward.event.locals as well when later load logic depends on it. handle runs before the action and does not rerun before the post-action load.path: '/'.+page.server.* for page-specific protection.+layout.server.*: child pages only reliably benefit when they call await parent() before protected work.page.url instead of assuming a remount.window, document, storage, observers, and media APIs behind onMount or a browser check.load runs on the server for SSR and then again in the browser for hydration. Do not put server-only assumptions there.load returns can bloat HTML, slow hydration, and expose data you never render. Shape the data to what the route actually needs.href or a native form already expresses the flow.goto only when navigation is genuinely imperative.invalidateAll() as a reflex when one dependency or URL key would do.load updates props but does not recreate the component. Use afterNavigate, derived state, or {#key ...} when reset semantics matter.awaits or unnecessary await parent() ordering.load that inflates SSR payloads with data the page never renders.load or client code.load owns it, what dependencies it tracks, whether depends() or invalidation is missing, and whether the code is universal or server-only.use:enhance logic.event.locals is updated after cookie writes.path, domain expectations, and whether the code is running in an action, endpoint, or server load.load that the page does not actually use.$app/state over older store-based access and PageProps/LayoutProps where available.Consult the current SvelteKit docs when behavior matters or seems version-sensitive:
https://svelte.dev/docs/kit/loadhttps://svelte.dev/docs/kit/form-actionshttps://svelte.dev/docs/kit/state-managementhttps://svelte.dev/tutorial/kit/invalidationdevelopment
Long-running systematic codebase review with a persistent ledger in reviews/. Use to plan review areas, continue the next review pass, check campaign status, triage findings with the user, or apply auto-tier fixes. Modes: plan, continue, status, triage, fix (default continue).
development
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, empty states, UX review, visual hierarchy, information architecture, accessibility, performance, responsive behavior, theming, typography, spacing, layout, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, design systems, tokens, live browser iteration, and ambitious visual effects. Not for backend-only or non-UI tasks.
development
Manually integrate Git branch work without blind mechanical merges. Use when merging, transplanting, or refactoring branch work; resolving conflicts; preserving source-branch intent in a clean current-branch structure; or auditing that source additions, removals, tests, and docs landed intentionally.
testing
Prepare, audit, set up, and guide Release Please releases. Use when releasing, preparing or reviewing a release PR, adding Release Please, classifying SemVer impact or breaking changes, writing Release Please-compatible Conventional Commit guidance, or documenting release criteria. Release work requires existing Release Please config; setup requires an explicit setup request.