Skip to main content
skill CX Codex

sveltekit-structure — Claude Code skill: SvelteKit layout rules

Tells the agent how to lay out routes, nested layouts and error boundaries in SvelteKit. Useful once a project grows and files start to blur.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add spences10/svelte-skills-kit --skill sveltekit-structure -a claude-code
Open on GitHub

What sveltekit-structure does

The skill spells out SvelteKit file rules for the agent: +page.svelte for a page, +layout.svelte for a wrapper, +error.svelte for an error boundary, +server.ts for an endpoint. A route like src/routes/about/+page.svelte maps to /about, and src/routes/posts/[id]/+page.svelte maps to /posts/123. A layout at any level wraps every descendant route, while folders in brackets such as (name) leave the URL alone.

Five reference files sit behind the main one: file naming, nested layouts, where +error.svelte goes, component-level svelte:boundary for errors and pending UI, plus SSR and browser-only code. The main SKILL.md stays short on purpose, with detail pushed into references/.

Error boundaries in SvelteKit sit above the failing route, so a +error.svelte placed at the wrong level will not catch what you expect. Worth checking your route tree before asking the agent to rewrite anything. Browser-only code needs a browser check, otherwise SSR breaks on window.

What it helps with

  • lay out routes in folders without mixing them up
  • wrap one part of the app in its own layout
  • place +error.svelte at the right level of the tree
  • add pending UI with svelte:boundary
  • split server and browser code under SSR

Example prompts for the agent

  • Help me lay out SvelteKit routes: I have /dashboard and /dashboard/settings and want a layout just for them
  • Where should +error.svelte live so it catches errors inside /posts/[id]?
  • SSR breaks on window — show me how to split server and client code

How to install sveltekit-structure

1Skills CLI (Vercel)

npx skills add spences10/svelte-skills-kit --skill sveltekit-structure -a claude-code

2Manually: put the files in place

~/.claude/skills/sveltekit-structure/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sveltekit-structure/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sveltekit-structure

How do I install sveltekit-structure in Claude?

Run npx skills add spences10/svelte-skills-kit --skill sveltekit-structure -a claude-code. The skill lands in ~/.claude/skills/sveltekit-structure/SKILL.md.

What does sveltekit-structure do?

It gives the agent SvelteKit structure rules: file naming, nested layouts, +error.svelte placement, svelte:boundary, and separating SSR from browser code.

Which platforms can use the skill?

Besides Claude there are install commands for Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, each with its own SKILL.md path.

Similar skills

Everything for Frontend and UI →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor