SvelteKit remote functions guidance. Use for command(), query(), form() patterns in .remote.ts files.
/plugin marketplace add spences10/svelte-skills-kit/plugin install svelte-skills@svelte-skills-kitThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdreferences/remote-functions.mdFile 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' });
getRequestEvent() available for cookies/headers access<svelte:boundary> + {@const await} (no flicker)query().refresh() - updates without flickerUse when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.