Back to list
justEstif

svelte-remote-functions

by justEstif

0🍴 0📅 Jan 1, 2026

SKILL.md


name: svelte-remote-functions description: Use SvelteKit remote functions (query, form, command, prerender) for type-safe client-server communication, data fetching, form handling, and mutations. metadata: audience: developers workflow: sveltekit-development

SvelteKit Remote Functions

Remote functions enable type-safe client-server communication in SvelteKit. They run on the server but can be called from anywhere in your app.

When to Use This Skill

  • Creating .remote.ts or .remote.js files
  • Type-safe data fetching from components
  • Form handling with schema validation
  • Server-side mutations (likes, updates, deletes)
  • Prerendering static data at build time

Function Types

FunctionPurposeReturns
queryRead dynamic dataPromise-like with refresh()
query.batchBatched queries (n+1 solution)Promise-like
formForm submissions with validationSpreadable form attributes
commandProgrammatic mutationsPromise
prerenderStatic data at build timeCached Promise-like

Configuration

Enable in svelte.config.js:

const config = {
  kit: {
    experimental: {
      remoteFunctions: true,
    },
  },
  compilerOptions: {
    experimental: {
      async: true, // Optional: enables await in components
    },
  },
};

Basic Pattern

// src/routes/data.remote.ts
import * as v from "valibot";
import { query, form, command } from "$app/server";

export const getItems = query(async () => {
  // fetch from database
});

export const getItem = query(v.string(), async (id) => {
  // validated id parameter
});

export const createItem = form(v.object({ name: v.string() }), async (data) => {
  // handle form submission
});

export const deleteItem = command(v.string(), async (id) => {
  // handle mutation
});

Full Documentation

Use the svelte-mcp skill and fetch documentation with section kit/remote-functions for complete API reference, form fields, validation, single-flight mutations, and advanced patterns.

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon