Skip to main content
skill CX Codex

sveltekit-data-flow — Claude Code skill: what it does, how to install

Teaches your AI coding assistant proper SvelteKit data flow patterns, from form actions and load functions to serialization and cache invalidation.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add spences10/svelte-skills-kit --skill sveltekit-data-flow -a claude-code
Open on GitHub

What sveltekit-data-flow does

This skill guides coding agents through SvelteKit data management conventions. It instructs the assistant when to isolate code in +page.server.ts, when to rely on universal +page.ts scripts, and when to create +server.ts endpoints. Sensitive database logic stays strictly on the server side.

The instructions specify standard handling for form submissions, handling validation errors via fail() while requiring throw redirect() and throw error() for status navigation. Server load outputs must remain JSON-serializable: attempting to return class instances or functions from +page.server.ts breaks the contract.

What it helps with

  • pick the appropriate file between +page.server.ts, +page.ts, and +server.ts
  • implement form actions returning fail() and redirecting with throw redirect()
  • avoid non-serializable objects inside server load functions
  • trigger cache refreshes with invalidateAll() after client authentication

Example prompts for the agent

  • Set up a SvelteKit form action that validates inputs and redirects on success
  • Refactor this data fetch into +page.server.ts so database secrets stay hidden
  • Show how to invalidate page data using invalidateAll after client sign-in

How to install sveltekit-data-flow

1Skills CLI (Vercel)

npx skills add spences10/svelte-skills-kit --skill sveltekit-data-flow -a claude-code

2Manually: put the files in place

~/.claude/skills/sveltekit-data-flow/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sveltekit-data-flow/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sveltekit-data-flow

How do I install sveltekit-data-flow in Claude Code?

Run npx skills add spences10/svelte-skills-kit --skill sveltekit-data-flow -a claude-code. Alternatively, save the skill file directly to ~/.claude/skills/sveltekit-data-flow/SKILL.md.

What does sveltekit-data-flow do?

It provides guidelines for handling SvelteKit data pipelines. The agent learns how to structure server and universal load functions, process form actions, and manage errors accurately.

What cannot be returned from a server load function?

Any data returned from +page.server.ts must be serializable to JSON. You cannot return class instances or functions to the client.

Similar skills

Everything for Frontend and UI →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor