sveltekit

SvelteKit full-stack Svelte framework with SSR and routing. Use for Svelte applications.

7 stars

Best use case

sveltekit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

SvelteKit full-stack Svelte framework with SSR and routing. Use for Svelte applications.

Teams using sveltekit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/sveltekit/SKILL.md --create-dirs "https://raw.githubusercontent.com/G1Joshi/Agent-Skills/main/skills/frameworks/sveltekit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/sveltekit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sveltekit Compares

Feature / AgentsveltekitStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

SvelteKit full-stack Svelte framework with SSR and routing. Use for Svelte applications.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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 way to build Svelte apps in 2025.
- **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`.

```svelte
<!-- src/routes/+page.svelte -->
<script>
  let { data } = $props(); // Received from +page.server.js
</script>

<h1>{data.title}</h1>
```

```javascript
// 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`.

```javascript
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`.

## Best Practices (2025)

**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 `load` functions to stream non-critical data.

**Don't**:

- **Don't use `store` for server data**: Use `page.data` (Context) for data passing down the tree to avoid state leakage on valid server execution.

## References

- [SvelteKit Documentation](https://kit.svelte.dev/)