What problem does it solve?
Navigating SvelteKit's file-based routing, layouts, and error handling can be complex. This skill provides clear, concise guidance to structure your SvelteKit applications correctly, reducing development time and preventing common architectural mistakes.
Core Features & Use Cases
- File Naming Conventions: Understand
+page, +layout, +error, and +server files.
- Nested Layouts & Groups: Implement complex UI structures and authentication boundaries effortlessly.
- Error Handling: Correctly place error boundaries (
+error.svelte) to catch and display errors gracefully.
- SSR & Hydration: Learn how to write code that works seamlessly across server and client environments.
- Use Case: Quickly set up a new SvelteKit project with nested layouts for authenticated and public routes, ensuring proper error handling and SSR compatibility from the start.
Quick Start
Help me structure a SvelteKit application with a root layout, a dashboard layout, and an admin layout.
Show me how to implement error boundaries for a specific route.