sveltekit-adapters
Provides guidance on selecting and configuring SvelteKit adapters for various hosting platforms and runtime environments.
Install
mkdir -p .claude/skills/sveltekit-adapters && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14971" && unzip -o skill.zip -d .claude/skills/sveltekit-adapters && rm skill.zipInstalls to .claude/skills/sveltekit-adapters
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when selecting, configuring, or troubleshooting SvelteKit adapters for deployment to Node.js, static hosts, Vercel, Cloudflare, and other targets.Key capabilities
- →Select appropriate SvelteKit adapter for deployment
- →Configure `svelte.config.js` for chosen adapter
- →Access `platform.env` for platform-specific bindings
- →Plan environment variable usage
- →Audit load functions for Node.js API compatibility
- →Test production build output locally
How it works
The skill guides the selection and configuration of SvelteKit adapters based on the target deployment platform and rendering requirements. It covers `svelte.config.js` settings, `platform.env` access, and compatibility audits for Node.js APIs.
Inputs & outputs
When to use sveltekit-adapters
- →Configuring adapter-node for a self-hosted server deployment
- →Switching from adapter-auto to adapter-cloudflare for Edge functions
- →Setting up adapter-static for a fully pre-rendered application
- →Debugging platform.env binding issues in Vercel or Cloudflare
- →Updating svelte.config.js to handle specific server-side rendering constraints
About this skill
SvelteKit Adapters
Specialization
Expert guidance for SvelteKit adapter selection, configuration, and deployment. Covers adapter-auto, adapter-node, adapter-static, adapter-vercel, adapter-cloudflare, platform-specific platform.env access, and the constraints each adapter places on rendering modes and runtime APIs.
Trigger Conditions
- Deploying a SvelteKit application to a specific hosting platform.
- Choosing the correct adapter for the target environment.
- Diagnosing runtime errors caused by adapter-incompatible APIs.
- Configuring environment variables and platform bindings for edge or serverless runtimes.
- Building a fully static site with
adapter-static.
Scope Boundaries
In scope:
@sveltejs/adapter-auto: zero-config detection for supported platforms.@sveltejs/adapter-node: self-hosted Node.js server output.@sveltejs/adapter-static: fully static HTML export.@sveltejs/adapter-vercel: Vercel Functions and Edge Functions.@sveltejs/adapter-cloudflare: Cloudflare Workers and Pages.svelte.config.jsadapter configuration.platform.envandplatform.contextfor platform-specific bindings.BODY_SIZE_LIMIT,ORIGIN, andADDRESS_HEADERnode adapter options.- Adapter compatibility matrix: which adapters support SSR, edge, and static.
Out of scope:
- Page rendering mode decisions (covered by
sveltekit-page-options). - CI/CD pipeline setup (covered by
ci-cd-workflows). - Load function implementation (covered by
sveltekit-load). - Container packaging for Node adapter output (separate concern).
Inputs
- Target deployment platform.
- Rendering mode requirements (SSR, static, edge).
- Platform-specific bindings needed (KV, D1, R2, Vercel Blob, etc.).
- Environment variable strategy.
- Evaluation date in ISO format (
YYYY-MM-DD).
Required Outputs
| Output | Description |
|---|---|
| Adapter selection decision | Chosen adapter with documented rationale |
svelte.config.js configuration | Correct adapter import and options |
| Platform binding access | platform.env typed access for applicable adapters |
| Environment variable plan | $env/static/private, $env/dynamic/private, or platform env usage |
| Adapters quality checklist | Pass/fail against the checklist below |
Depth Modes
| Level | Intent | Exit Rule |
|---|---|---|
| L1 Orientation | Build output reaches the target platform | App deploys and responds to requests |
| L2 Practical Delivery | Correct adapter with platform bindings and env vars | SSR or static output verified; env vars accessible; platform bindings working |
| L3 Specialist Hardening | Optimise for cold start, edge latency, and bundle size | Bundle analysed; cold start measured; incompatible Node APIs removed |
| L4 Expert Standardisation | Adapter and deployment policy for a project | Adapter selection guide, platform env registry, and incompatibility matrix documented |
Adapter Selection Guide
| Target Platform | Recommended Adapter | Notes |
|---|---|---|
| Vercel | adapter-vercel | Auto-detects Edge vs. Serverless per route |
| Cloudflare Pages / Workers | adapter-cloudflare | Use platform.env for KV, D1, R2 |
| Node.js server (self-hosted) | adapter-node | Produces build/ with index.js entry |
| Netlify | adapter-netlify (community) | Not in @sveltejs org; verify currency |
| Fully static site | adapter-static | Requires all routes to be prerenderable |
| Unknown / multi-platform | adapter-auto | Detects at build time; not for production use in CI |
Workflow
- Identify the target deployment platform and runtime (Node.js, edge, static CDN).
- Select the adapter using the guide above; reject
adapter-autofor production CI builds. - Install the adapter package and update
svelte.config.jswith adapter import and options. - Audit page options:
adapter-staticrequires all routes to haveprerender = true; SSR routes require a server-capable adapter. - Configure environment variable access: use
$env/static/privatefor build-time secrets,$env/dynamic/privatefor runtime secrets. - For edge adapters, audit load functions and actions for incompatible Node.js APIs (
fs,crypto,net); replace with Web API equivalents. - Access platform-specific bindings through
event.platform.envin load functions and actions; type viaApp.Platformaugmentation. - Test the production build locally (
vite build+ adapter output) before deploying. - Run the adapters quality checklist.
Adapters Quality Checklist
- Adapter matches the target deployment runtime;
adapter-autois not used in CI. -
svelte.config.jsreferences the correct adapter with explicit options, not defaults. - All routes rendered at runtime use a server-capable adapter; static-only routes use
prerender = true. - Secrets are accessed via
$env/static/privateor$env/dynamic/private; they are never exposed to the client. - Edge adapter routes contain no Node.js-only APIs.
-
platform.envis accessed throughApp.Platformtyped interface augmentation. - Production build output is tested locally before first deployment.
Security Notes
- Never access
$env/static/publicor$env/dynamic/publicfor secrets; these are exposed to the browser. $env/static/privatevalues are inlined at build time; do not use for secrets that rotate.- For rotating secrets use
$env/dynamic/privateor platform secret manager bindings.
L4 Coverage Matrix
| Requested Outcome | Skill Section |
|---|---|
| Adapter selection | Adapter Selection Guide |
| Configuration | Workflow steps 3–4 |
| Environment variables | Workflow step 5 + Security Notes |
| Edge API compatibility | Workflow step 6 |
| Platform bindings | Workflow step 7 |
| Quality validation | Adapters Quality Checklist |
References
See references/source-catalog.md for active source tracking.
Execution Context
Input Context
- Request objective and scope boundary.
- Applicable constraints and required outputs.
Process Context
- Follow this skill's deterministic workflow from intake to closure.
- Record ownership and decisions for required outputs.
Output Context
- Deliverables with explicit completion status.
- Residual risks and next actions.
When not to use it
- →When the task is about page rendering mode decisions
- →When the task is about CI/CD pipeline setup
- →When the task is about load function implementation
Limitations
- →adapter-auto is not for production use in CI
- →adapter-static requires all routes to be prerenderable
- →Edge adapter routes must not contain Node.js-only APIs
How it compares
This skill provides specialized guidance for SvelteKit adapter configuration, ensuring correct setup for various deployment targets and addressing platform-specific constraints, which is more targeted than general SvelteKit development advi
Compared to similar skills
sveltekit-adapters side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| sveltekit-adapters (this skill) | 0 | 2mo | Review | Intermediate |
| svelte-ui-design | 23 | 9mo | No flags | Intermediate |
| skeleton-svelte | 15 | 9mo | No flags | Beginner |
| svelte-expert | 11 | 9mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by sextondjc
View all by sextondjc →You might also like
svelte-ui-design
XIYO
ALWAYS use this skill for ANY Svelte component styling, design, or UI work. Svelte 5 UI design system using Tailwind CSS 4, Skeleton Labs design tokens/presets/Tailwind Components, and Bits UI headless components. Covers class composition, color systems, interactive components, forms, overlays, and all visual design.
skeleton-svelte
martinemde
Use this skill when working with Skeleton UI components in Svelte projects. It provides guidelines for Skeleton's component composition pattern, theme-aware color system, design presets, and layout patterns. Trigger when building UI components, styling elements, creating layouts, or working with Skeleton-specific features in Svelte 5 and SvelteKit 2+ projects.
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
svelte5-development
splinesreticulating
Comprehensive Svelte 5 and SvelteKit development guidance. Use this skill when building Svelte components, working with runes, or developing SvelteKit applications. Covers reactive patterns, component architecture, routing, and data loading.
sveltekit-structure
spences10
SvelteKit structure guidance. Use for routing, layouts, error handling, and SSR. Covers file naming (+page vs +layout vs +server), nested layouts, error boundaries, and hydration.
tanstack-form
exceptionless
TanStack Form with Zod validation in Svelte 5. Form state management, field validation, error handling, and ProblemDetails integration. Keywords: TanStack Form, createForm, Field, form validation, zod schema, form errors, onSubmit, onSubmitAsync, problemDetailsToFormErrors