SV

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.zip

Installs 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.
150 chars✓ has a “when” trigger
Intermediate

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

You give it
Target deployment platform and rendering mode requirements
You get back
SvelteKit adapter selection, `svelte.config.js` configuration, and environment variable plan

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.js adapter configuration.
  • platform.env and platform.context for platform-specific bindings.
  • BODY_SIZE_LIMIT, ORIGIN, and ADDRESS_HEADER node 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

OutputDescription
Adapter selection decisionChosen adapter with documented rationale
svelte.config.js configurationCorrect adapter import and options
Platform binding accessplatform.env typed access for applicable adapters
Environment variable plan$env/static/private, $env/dynamic/private, or platform env usage
Adapters quality checklistPass/fail against the checklist below

Depth Modes

LevelIntentExit Rule
L1 OrientationBuild output reaches the target platformApp deploys and responds to requests
L2 Practical DeliveryCorrect adapter with platform bindings and env varsSSR or static output verified; env vars accessible; platform bindings working
L3 Specialist HardeningOptimise for cold start, edge latency, and bundle sizeBundle analysed; cold start measured; incompatible Node APIs removed
L4 Expert StandardisationAdapter and deployment policy for a projectAdapter selection guide, platform env registry, and incompatibility matrix documented

Adapter Selection Guide

Target PlatformRecommended AdapterNotes
Verceladapter-vercelAuto-detects Edge vs. Serverless per route
Cloudflare Pages / Workersadapter-cloudflareUse platform.env for KV, D1, R2
Node.js server (self-hosted)adapter-nodeProduces build/ with index.js entry
Netlifyadapter-netlify (community)Not in @sveltejs org; verify currency
Fully static siteadapter-staticRequires all routes to be prerenderable
Unknown / multi-platformadapter-autoDetects at build time; not for production use in CI

Workflow

  1. Identify the target deployment platform and runtime (Node.js, edge, static CDN).
  2. Select the adapter using the guide above; reject adapter-auto for production CI builds.
  3. Install the adapter package and update svelte.config.js with adapter import and options.
  4. Audit page options: adapter-static requires all routes to have prerender = true; SSR routes require a server-capable adapter.
  5. Configure environment variable access: use $env/static/private for build-time secrets, $env/dynamic/private for runtime secrets.
  6. For edge adapters, audit load functions and actions for incompatible Node.js APIs (fs, crypto, net); replace with Web API equivalents.
  7. Access platform-specific bindings through event.platform.env in load functions and actions; type via App.Platform augmentation.
  8. Test the production build locally (vite build + adapter output) before deploying.
  9. Run the adapters quality checklist.

Adapters Quality Checklist

  • Adapter matches the target deployment runtime; adapter-auto is not used in CI.
  • svelte.config.js references 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/private or $env/dynamic/private; they are never exposed to the client.
  • Edge adapter routes contain no Node.js-only APIs.
  • platform.env is accessed through App.Platform typed interface augmentation.
  • Production build output is tested locally before first deployment.

Security Notes

  • Never access $env/static/public or $env/dynamic/public for secrets; these are exposed to the browser.
  • $env/static/private values are inlined at build time; do not use for secrets that rotate.
  • For rotating secrets use $env/dynamic/private or platform secret manager bindings.

L4 Coverage Matrix

Requested OutcomeSkill Section
Adapter selectionAdapter Selection Guide
ConfigurationWorkflow steps 3–4
Environment variablesWorkflow step 5 + Security Notes
Edge API compatibilityWorkflow step 6
Platform bindingsWorkflow step 7
Quality validationAdapters 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.

SkillInstallsUpdatedSafetyDifficulty
sveltekit-adapters (this skill)02moReviewIntermediate
svelte-ui-design239moNo flagsIntermediate
skeleton-svelte159moNo flagsBeginner
svelte-expert119moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

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.

23136

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.

15113

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.

11107

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.

1497

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.

782

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

1670

Search skills

Search the agent skills registry