sveltekit
Skill15 starsChanged 42 days agoMITView on GitHub
Expert SvelteKit assistance covering file-based routing (+page.svelte, +page.server.ts), form actions, hooks, and adapters. Use when developing full-stack, server-rendered Svelte web applications.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- Mindrally/skillstheir own version, first seen Oct 8, 2026
- epicenter-md/epicentertheir own version, first seen Oct 8, 2026
- EpicenterHQ/epicentertheir own version, first seen Oct 8, 2026
- authdog/agent-skillstheir own version, first seen Sep 18, 2026
- Adhamxon/claude-code-skillstheir own version, first seen Jul 30, 2026
- joshuadavidthomas/agent-skillstheir own version, first seen May 9, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- Mindrally/skills★ 275same name
- joshuadavidthomas/agent-skills★ 49same name
- Adhamxon/claude-code-skills★ 2same name
- authdog/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 66
Use SvelteKit Form Actions with use:enhance:
- Distinctive: line 100
Use Svelte 5 Runes: SvelteKit 2+ fully supports Runes mode.
- Very specific: line 101
Use App.State: New SvelteKit interface for typesafe global app state.
- Very specific: line 106
Use store for server data: Use page.data (Context) for data passing down the tree to avoid state leakage on valid server execution.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SvelteKit
SvelteKit is the meta-framework for Svelte, similar to Next.js for React. It uses standard Web APIs and provides routing, server-side rendering, and API endpoints.
When to Use
- Svelte Apps: The standard framework for building full-stack Svelte applications.
- Full Stack: Unified backend and frontend.
- Edge Deployment: Runs on any platform via Adapters (Vercel, Cloudflare, Netlify, Node).
Quick Start
File-based routing in src/routes.
<!-- src/routes/+page.svelte -->
<script>
let { data } = $props(); // Received from +page.server.js
</script>
<h1>{data.title}</h1>// src/routes/+page.server.js
export function load() {
return { title: "Hello from Server" };
}Core Concepts
Load Functions
load functions in +page.server.js run before the page renders, fetching data. The data is typed automatically in the component.
Form Actions
Handle form submissions in +page.server.js exports named actions.
export const actions = {
default: async ({ request }) => {
const data = await request.formData();
// save to db
},
};Adapters
Deployment targets are plugins. adapter-auto, adapter-node, adapter-cloudflare.
Common Patterns
Form Actions with Progressive Enhancement
Problem: Writing separate API endpoints and client fetch handlers for simple form submissions.
Solution:
Use SvelteKit Form Actions with use:enhance:
// src/routes/login/+page.server.ts
import { fail, redirect, type Actions } from "@sveltejs/kit";
export const actions: Actions = {
default: async ({ request }) => {
const data = await request.formData();
const email = data.get("email");
if (!email) return fail(400, { email, missing: true });
// Process login
throw redirect(303, "/dashboard");
},
};<!-- src/routes/login/+page.svelte -->
<script>
import { enhance } from '$app/forms';
export let form;
</script>
<form method="POST" use:enhance>
<input name="email" value={form?.email ?? ''} />
<button type="submit">Log In</button>
</form>Best Practices
Do:
- Use Svelte 5 Runes: SvelteKit 2+ fully supports Runes mode.
- Use
App.State: New SvelteKit interface for typesafe global app state. - Stream Data: Return promises in
loadfunctions to stream non-critical data.
Don't:
- Use
storefor server data: Usepage.data(Context) for data passing down the tree to avoid state leakage on valid server execution. - Perform sensitive database queries or secret token lookups in client-facing
+page.tsfiles; place them in+page.server.tsinstead.
Troubleshooting
| Error | Cause | Solution |
500 Internal Error: Cannot load module ... in SSR | Client-only library imported directly in SSR bundle. | Use dynamic import in onMount() or check browser in $app/environment. |
Not found: /route | File naming convention mismatch. | Ensure route page is named +page.svelte (with leading plus sign). |
Adapter not specified | svelte.config.js missing build adapter for target platform. | Install and configure @sveltejs/adapter-auto or @sveltejs/adapter-node. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

