spences10/sveltekit-remote-functions
SvelteKit remote functions guidance. Use for command(), query(), form() patterns in .remote.ts files.
npx skills add https://github.com/spences10/svelte-claude-skills --skill sveltekit-remote-functions
File naming: *.remote.ts for remote function files
Which function? One-time action → command() | Repeated reads →
query() | Forms → form()
// actions.remote.ts
import { command } from '$app/server';
import * as v from 'valibot';
export const delete_user = command(
v.object({ id: v.string() }),
async ({ id }) => {
await db.users.delete(id);
return { success: true };
},
);
// Call from client: await delete_user({ id: '123' });
Complete guide with all patterns
getRequestEvent() available for cookies/headers access.refresh() to get fresh datasrc/lib/server/ - they won't work there<!--
PROGRESSIVE DISCLOSURE GUIDELINES:
LLM WORKFLOW (when editing this file):
-->
Take spences10/sveltekit-remote-functions from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.