← Back to list

sveltekit-structure
by Seeker1911
backup dotfiles
⭐ 6🍴 0📅 Jan 21, 2026
SKILL.md
name: sveltekit-structure
IMPORTANT: Keep description on ONE line for Claude Code compatibility
prettier-ignore
description: SvelteKit structure guidance. Use for routing, layouts, error handling, and SSR. Covers file naming (+page vs +layout vs +server), nested layouts, error boundaries, and hydration.
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
- references/file-naming.md - File naming conventions
- references/layout-patterns.md - Nested layouts
- references/error-handling.md - Error boundary placement
- references/ssr-hydration.md - SSR and browser-only code
Notes
- Layouts must render
{@render children()}in Svelte 5 - Error boundaries (+error.svelte) must be above failing route
- Use
(groups)for layout organization without affecting URL - Check
browserfrom$app/environmentfor client-only code - Last verified: 2025-01-11
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon