rc-sveltekit

Implements and reviews SvelteKit 2 applications with Svelte 5 runes and Bun runtime.

19|1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/rodolfochicone/rc-project --skill rc-sveltekit-rodolfochicone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rc-sveltekit
Source: https://github.com/rodolfochicone/rc-project/tree/main/skills/stacks/rc-sveltekit
Command: npx skills add https://github.com/rodolfochicone/rc-project --skill rc-sveltekit-rodolfochicone

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building full-stack SvelteKit applications involves many error-prone decisions: where to put secrets, how to wire SSR loads to a backend API, how to configure form actions, sessions, CSRF, CSP, and adapter-node deployment. This Skill encodes those decisions as concrete rules and reference guides so routes, auth, and deploys follow a consistent, secure pattern. ## Core Features & Use Cases - SSR and routing guidance: Server load functions, +page.server.ts patterns, layout data, and Svelte 5 runes ($state, $props, $derived) for new components. - Forms, sessions, and security: Form actions with fail(), hooks.server.ts locals, httpOnly cookie sessions, CSRF, CSP, and XSS rules from references/security.md. - Deployment and testing: adapter-node builds run under Bun on a VPS behind Caddy, with systemd, env var tables, and Vitest/Playwright testing layers. - Use Case: You are adding a login page and dashboard to a SvelteKit app backed by a Rust Axum API. The Skill walks you through the form action, cookie flags, event.locals synchronization, same-origin /api proxying, and the Bun-based production deploy. ## Quick Start Ask the agent to implement a SvelteKit route with a server load and a form action using this skill, then follow its security and deploy checklists.

Frequently Asked Questions about rc-sveltekit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement form actions in SvelteKit 2?▼

Define an `actions` object in `+page.server.ts` using the generated `Actions` type, read form data with `request.formData()`, and return `fail(400, ...)` for validation errors. Post with `<form method="POST" action="?/login">` for progressive enhancement without client JavaScript.

How do I deploy SvelteKit with adapter-node and Bun?▼

Install `@sveltejs/adapter-node`, configure it in `svelte.config.js`, then build with `bun run build` and start the output with `bun ./build/index.js`. Bind to `HOST=127.0.0.1` behind a reverse proxy like Caddy and set `ORIGIN` so CSRF and cookies work correctly.

Where should I store API secrets in a SvelteKit app?▼

Store secrets in server-only modules using `$env/dynamic/private` or `$env/static/private`, never in `PUBLIC_*` variables which ship to the client. Keep server-only code under `$lib/server` so client components cannot import it.

Why does my SvelteKit session not update after login?▼

The `handle` hook does not re-run between an action and the following load on the same request. After an action sets or clears a session cookie, update `event.locals.user` inside the action so subsequent loads see the fresh state.

When should I not use SvelteKit for a project?▼

Do not use this stack for React or Next.js codebases, standalone Rust Axum APIs without a UI (use rc-axum instead), or plain static Svelte sites without Kit. It targets full-stack SSR apps deployed with adapter-node under Bun.