/harness-claude:svelte-adapter-configfrom harness-claude
Selects and configures the correct SvelteKit adapter (Node, Vercel, Cloudflare, Netlify, static) for production deployment, including per-route SSR/prerender settings.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:svelte-adapter-config still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Deploy SvelteKit to any platform by selecting and configuring the correct adapter in svelte.config.js
Selecting an adapter:
svelte.config.js:// svelte.config.js
import adapter from '@sveltejs/adapter-auto'; // or specific adapter
export default {
kit: {
adapter: adapter(),
},
};
adapter-auto (default):
adapter-auto detects the deployment environment and selects the correct adapter automatically. It works for Vercel, Netlify, and Cloudflare Pages with zero configuration:npm install -D @sveltejs/adapter-auto
Note: For production, prefer the specific adapter to avoid ambiguity and get access to all configuration options.
adapter-node — Node.js server:
npm install -D @sveltejs/adapter-node
import adapter from '@sveltejs/adapter-node';
export default {
kit: {
adapter: adapter({
out: 'build', // output directory
precompress: true, // gzip/brotli static assets
envPrefix: 'APP_', // prefix for environment variable access
}),
},
};
Run the output: node build/index.js. Set PORT and HOST env vars to configure the server.
adapter-vercel:
npm install -D @sveltejs/adapter-vercel
import adapter from '@sveltejs/adapter-vercel';
export default {
kit: {
adapter: adapter({
runtime: 'nodejs20.x', // or 'edge'
regions: ['iad1'], // function regions
isr: { expiration: 60 }, // ISR default
}),
},
};
Configure per-route behavior using export const config in route files:
// src/routes/api/stream/+server.ts
export const config = {
runtime: 'edge',
};
adapter-cloudflare:
npm install -D @sveltejs/adapter-cloudflare
import adapter from '@sveltejs/adapter-cloudflare';
export default {
kit: {
adapter: adapter({
routes: { include: ['/*'], exclude: ['<all>'] },
}),
},
};
Access Cloudflare bindings (KV, R2, D1) via event.platform.env:
// +page.server.ts
export const load: PageServerLoad = async ({ platform }) => {
const kv = platform?.env?.MY_KV_NAMESPACE;
const value = await kv?.get('my-key');
return { value };
};
Declare the App.Platform interface for type safety:
// src/app.d.ts
declare global {
namespace App {
interface Platform {
env: {
MY_KV_NAMESPACE: KVNamespace;
MY_D1: D1Database;
};
}
}
}
adapter-static — full static export:
npm install -D @sveltejs/adapter-static
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: '200.html', // for SPA mode
precompress: false,
strict: true,
}),
},
};
All pages must be prerenderable. Disable SSR globally or per-page for SPA mode:
// src/routes/+layout.ts
export const ssr = false;
export const prerender = true;
Prerendering specific pages:
// +page.ts or +page.server.ts
export const prerender = true;
Or configure in svelte.config.js:
export default {
kit: {
prerender: {
entries: ['/', '/about', '/blog'],
crawl: true, // follow links from prerendered pages
handleMissingId: 'warn',
},
},
};
Adapter comparison:
| Adapter | Hosting | SSR | Edge | Static files |
|---|---|---|---|---|
| adapter-auto | Vercel/Netlify/CF | Yes | Partial | CDN |
| adapter-node | VPS/Docker | Yes | No | Serve manually |
| adapter-vercel | Vercel | Yes | Yes | CDN |
| adapter-cloudflare | CF Pages | Yes | Yes (Workers) | CF CDN |
| adapter-netlify | Netlify | Yes | Yes (Edge Fns) | CDN |
| adapter-static | Any | No | No | Any CDN |
Environment variables:
SvelteKit distinguishes between build-time and runtime env vars:
// Build-time (baked into bundle):
import { PUBLIC_API_URL } from '$env/static/public';
import { SECRET_KEY } from '$env/static/private';
// Runtime (read from process.env):
import { PUBLIC_API_URL } from '$env/dynamic/public';
import { SECRET_KEY } from '$env/dynamic/private';
Use $env/dynamic/* for variables that change between deployments without a rebuild.
Cloudflare vs. Node — key differences:
fs on Cloudflare Workers — use R2 or KV for storageprocess.env on Workers — use Cloudflare bindings and platform.envadapter-node + Docker:
FROM node:20-alpine
WORKDIR /app
COPY build ./build
COPY node_modules ./node_modules
COPY package.json .
EXPOSE 3000
CMD ["node", "build/index.js"]
https://kit.svelte.dev/docs/adapters
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job