sveltekit · davila7 — Claude Code skill: what it does, how to install
A Claude skill that guides work on SvelteKit apps: routes from files, server rendering, endpoints and form handling.
npx claude-code-templates@latest --skill web-development/sveltekitWhat sveltekit does
The skill covers SvelteKit, the full-stack framework built on Svelte. Your agent gets instructions on routing driven by the file tree, server-side rendering and static generation, API endpoints, and form actions. The walkthrough goes step by step: scaffolding a project, the directory layout, fetching data in load, endpoints in +server.ts, forms with use:enhance, nested layouts, and per-route rendering options.
There are also examples of a guarded route, hooks used as session middleware, and re-running loaders with invalidateAll. A short practice list follows: keep database and auth code in +page.server.ts, share server-only modules under $lib/server/, type loader results with the generated $types.
The skill assumes a project created with npm create svelte@latest. Without Node.js and npm on the machine its steps go nowhere, so check your setup first. It earns its place when you start a fresh SvelteKit app or move a single-page app onto a framework with a server side.
What it helps with
- map URLs to files instead of hand-writing a router
- turn on server rendering or static output for chosen pages
- put an endpoint next to the page that uses it
- handle a form submit without a client-side request
- gate a section of the site behind a session check in a hook
Example prompts for the agent
- Scaffold a new SvelteKit project with TypeScript and show me the
src/routeslayout - Add a
+server.tsendpoint that lists posts and accepts alimitparameter - Build a subscribe form with an action in
+page.server.tsanduse:enhance
How to install sveltekit
1claude-code-templates
npx claude-code-templates@latest --skill web-development/sveltekit2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill sveltekit -a claude-code3Manually: put the files in place
~/.claude/skills/sveltekit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sveltekit/
Manually: put the files in place
.agents/skills/sveltekit/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/sveltekit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates sveltekit2Manually: put the files in place
.github/skills/sveltekit/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/web-development/sveltekitManually: put the files in place
.devin/skills/sveltekit/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about sveltekit
How do I install sveltekit in Claude Code?
Use the templates command: npx claude-code-templates@latest --skill web-development/sveltekit. Or run npx skills add davila7/claude-code-templates --skill sveltekit -a claude-code. The skill file then sits at ~/.claude/skills/sveltekit/SKILL.md.
What does the sveltekit skill do?
It hands your agent SvelteKit guidance: file-based routes, data loading, endpoints, form actions, layouts, rendering modes. It also ships examples of a protected route and a session hook.
What do I need before using it?
The project starts with npm create svelte@latest, so Node.js and npm must be present. The skill advises keeping server logic in +page.server.ts and $lib/server/.
Similar skills
Everything for Frontend and UI →sveltekit by other authors comes first.