spences10 avatar

Sveltekit Structure

This is your reference for SvelteKit's file-based routing conventions and layout system. Covers the plus-file naming scheme (+page.svelte, +layout.svelte, +error.svelte, +server.ts), nested layouts with the children render pattern, and SSR/hydration gotchas. Honestly most useful when you're setting up a new SvelteKit project or debugging why your layout isn't applying where you expect. The quick start shows the route-to-URL mapping and a basic layout structure. Reference files drill into error boundaries, the svelte:boundary component for pending states, and how to handle browser-only code. Saves you from constantly checking the SvelteKit docs for file naming rules.

skills.sh installs
1.1K
GitHub stars
95
last updated
Aug 21, 2026

Install

$ npx -y skills add spences10/svelte-skills-kit --skill sveltekit-structure --agent claude-code

Installs into .claude/skills of the current project.

Files

SvelteKit Structure

Quick Start

File types: +page.svelte (page) | +layout.svelte (wrapper) | +error.svelte (error boundary) | +server.ts (API endpoint)

Routes: src/routes/about/+page.svelte → /about | src/routes/posts/[id]/+page.svelte → /posts/123

Layouts: Apply to all child routes. +layout.svelte at any level wraps descendants.

Example

src/routes/
├── +layout.svelte              # Root layout (all pages)
├── +page.svelte                # Homepage /
├── about/+page.svelte          # /about
└── dashboard/
    ├── +layout.svelte          # Dashboard layout (dashboard pages only)
    ├── +page.svelte            # /dashboard
    └── settings/+page.svelte   # /dashboard/settings
<!-- +layout.svelte -->
<script>
	let { children } = $props();
</script>

<nav><!-- Navigation --></nav>
<main>{@render children()}</main>
<footer><!-- Footer --></footer>

Reference Files

Sponsors

Details

Repository
github.com/spences10/svelte-skills-kit
Categories
Frontend Development, Code Review & Quality, Debugging
First seen
May 16, 2026

More from spences10/svelte-skills-kit

All 8
1plugin87 avatarimage-to-codeplugin87/ux-ui-agent-skillsTurn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, rad768skills.sh installs
2plugin87 avatara11y-auditplugin87/ux-ui-agent-skillsAudit a UI or design against WCAG 2.2 AA/AAA and ARIA patterns, returning criterion-referenced findings with severity and specific fixes. Use when the user want598skills.sh installs
3syncfusion avatarsyncfusion-blazor-rich-text-editorsyncfusion/blazor-ui-components-skillsImplements the Syncfusion Blazor Rich Text Editor (SfRichTextEditor) from Syncfusion.Blazor.RichTextEditor. Supports HTML, Markdown, and IFrame editor modes. Us385skills.sh installs
4syncfusion avatarsyncfusion-blazor-ribbonsyncfusion/blazor-ui-components-skillsImplement the Syncfusion Blazor Ribbon component. Use this skill when creating ribbon interfaces, implementing ribbon tabs/groups/items, adding file menus, hand374skills.sh installs
5webflow avatarflowkit-namingwebflow/webflow-skillsApply Flowkit CSS naming system in Webflow. Use when creating classes, auditing existing naming, or building new components following Flowkit conventions. Flowk304skills.sh installs
6nextlevelbuilder avatardesignnextlevelbuilder/ui-ux-pro-max-skillComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP 48.9Kskills.sh installs