◉CLAUDE LABJP
●CC 2.1.330 — Claude Code 2.1.330 fixes the multi-minute freeze right after compacting a long conversation●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 8 days left. The suggested replacement is claude-sonnet-5-5●MCP 401 — Users report MCP servers that return 401 time out silently instead of showing an error●NEW — New: Desktop creates a worktree for every session? Three places to check●OPUS 4.5 — The 11/24 date for Opus 4.5 is a not-sooner-than floor, not a retirement notice●SCHEMA — Same schema, different shape: compare structured output from the Agent SDK and the Messages API●CC 2.1.330 — Claude Code 2.1.330 fixes the multi-minute freeze right after compacting a long conversation●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 8 days left. The suggested replacement is claude-sonnet-5-5●MCP 401 — Users report MCP servers that return 401 time out silently instead of showing an error●NEW — New: Desktop creates a worktree for every session? Three places to check●OPUS 4.5 — The 11/24 date for Opus 4.5 is a not-sooner-than floor, not a retirement notice●SCHEMA — Same schema, different shape: compare structured output from the Agent SDK and the Messages API
Articles/Claude Code
⟐ Claude Code/2026-04-09Advanced

Claude Code × SvelteKit Full-Stack Development Guide: From Zero to Production

A complete guide to full-stack development with Claude Code and SvelteKit. Covers Svelte 5 Runes, Drizzle ORM, Auth.js, and Cloudflare Workers deployment through practical, production-ready workflows.

SvelteKitClaude Code291full-stackSvelte 5Drizzle ORMCloudflare Workers17frontend

✦ Premium Article

Why SvelteKit + Claude Code?

In 2026's crowded web framework landscape, SvelteKit has carved out a distinctive position — and it deserves more attention from developers who use Claude Code as their primary AI assistant. SvelteKit's compile-time architecture eliminates unnecessary runtime overhead, producing JavaScript bundles that are dramatically smaller than React or Vue equivalents for the same feature set. Svelte 5's Runes syntax — $state, $derived, $effect, $props — brings a clarity to reactive programming that closely mirrors how developers think about data flow. And the first-class support for deploying to Cloudflare Workers and Vercel's edge network means your apps can run closer to users globally without the complexity of traditional server infrastructure.

Claude Code, meanwhile, has become more than an autocomplete engine. When given the right constraints — particularly a well-crafted CLAUDE.md file — it functions as an effective pair programmer: one that can implement boilerplate quickly, generate test code before implementation, and transform natural-language requirements into working TypeScript. The gap between having an idea and having a deployed, tested application narrows significantly when you combine these two tools.

This guide walks you through a real e-commerce project to demonstrate how Claude Code and SvelteKit work together across the full development lifecycle. By the end, you'll have a mental model for which tasks to hand off to Claude Code entirely, which tasks require careful human oversight, and how to set up the project so that Claude Code's output is consistently correct and production-ready from day one.


Chapter 1: Project Setup and CLAUDE.md Design

Initializing the SvelteKit Project

One of the first instincts developers have when using Claude Code is to ask it to scaffold the entire project. This is actually an area where you should stay in control. Technology selection decisions — which ORM to use, how to handle authentication, where to deploy — should be made by the developer, not delegated to an AI. Claude Code is excellent at implementing within a stack you've chosen, but it makes better decisions about implementation details when the architectural boundaries are already drawn.

Start by creating the SvelteKit project and installing your dependencies yourself:

# Create project (run this yourself before involving Claude Code)
npm create svelte@latest my-sveltekit-app
# → Select: TypeScript + ESLint + Prettier + Vitest + Playwright
cd my-sveltekit-app
 
# Decide on your full dependency list before instructing Claude Code
npm install drizzle-orm @auth/sveltekit
npm install -D drizzle-kit wrangler

The selection prompts during create svelte matter. Choosing TypeScript strict mode from the start ensures Claude Code generates properly typed code throughout. Selecting Vitest and Playwright during initialization means the test configuration is ready immediately, letting you take a test-first approach with Claude Code from the first component.

Designing CLAUDE.md for SvelteKit

The CLAUDE.md file is the most important configuration you'll create for working with Claude Code on a SvelteKit project. Think of it as a contract between you and Claude Code — it defines the boundaries of what the AI should and should not do, and it prevents the most common sources of wasted effort: code generated with wrong patterns that needs to be rewritten.

For SvelteKit projects, there are three things CLAUDE.md must address explicitly. First, Svelte version: if you don't specify Svelte 5 Runes, Claude Code may default to Svelte 4 patterns since its training data contains both. Second, SSR safety: Cloudflare Workers and edge deployment mean there is no window object available during server-side rendering, and this catches many developers off guard. Third, code organization: specifying where components, stores, and server-side code should live prevents Claude Code from creating arbitrary file structures.

# CLAUDE.md — SvelteKit Project
 
## Tech Stack
- Framework: SvelteKit 2.x + Svelte 5 (Runes API)
- Language: TypeScript (strict mode)
- Database: Cloudflare D1 + Drizzle ORM
- Auth: Auth.js v5 (@auth/sveltekit)
- Styling: TailwindCSS v4
- Test: Vitest (unit) + Playwright (e2e)
- Deploy: Cloudflare Workers (via wrangler)
 
## Coding Standards
- Always use Svelte 5 Runes ($state, $derived, $effect, $props)
- Never use legacy `export let` syntax
- Always type the return value of load functions
- Export Server Actions as an `actions` object
- Components live under src/lib/components/
- Page-specific components stay in the same directory as the route
 
## Forbidden Patterns
- Direct window/document access without a `browser` environment check (SSR safety)
- Usage of the `any` type
- Leaving console.log in production code
 
## Testing Policy
- Write Vitest unit tests for every component
- Write Playwright E2E tests for form submissions and auth flows

With this CLAUDE.md in place, Claude Code defaults to Svelte 5 Runes syntax, wraps browser APIs in environment guards automatically, and maintains a consistent project structure across every file it creates. The quality difference compared to a project without CLAUDE.md is significant — expect to spend dramatically less time reviewing and correcting generated code.


✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Developers stuck on the SvelteKit + Claude Code combination will be able to implement Svelte 5 Runes-based components, API routes, and database integrations starting today
✦You'll master type-safe implementation patterns using Drizzle ORM + Auth.js + Cloudflare D1 — the modern edge-first stack — with working code you can use immediately
✦You'll develop the judgment to know which tasks to delegate to Claude Code and which to review yourself, tripling your SvelteKit development velocity
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-08-19
Fixing the Code Doesn't Evict a Broken Page From the Edge Cache
I shipped a fix and the broken page kept serving. The problem was not the code but the edge cache, which had stored a broken HTML response because the store decision looked only at the status code. Here is the integrity guard I now run before every cache write, and the thresholds I had to tune in production.
⟐ Claude Code2026-11-22
When a Remote MCP Server Goes Silent After Its Token Expires, Check for mcp-remote First
A remote MCP tool call hangs with no error. How to tell an expired token from a slow tool, a script that finds servers bridged through mcp-remote, and how to switch to the native HTTP transport or cap the wait.
⟐ Claude Code2026-11-21
When Every New Desktop Session Creates a Worktree: Three Places to Check, and When It's Fine to Turn It Off
Claude Code Desktop keeps creating a worktree for every new session, and .claude/worktrees/ and claude/ branches pile up. Here is where the Worktree default actually gets turned on, when to keep it and when to skip it, and a SessionStart hook that tells you when a session is running inside a worktree.