Deploy Next.js to Cloudflare Workers via OpenNext adapter. Use for SSR, ISR, App/Pages Router, or encountering worker size limits, runtime compatibility, connection scoping errors.
View on GitHubsecondsky/claude-skills
cloudflare-nextjs
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/secondsky/claude-skills/blob/main/plugins/cloudflare-nextjs/skills/cloudflare-nextjs/SKILL.md -a claude-code --skill cloudflare-nextjsInstallation paths:
.claude/skills/cloudflare-nextjs/# Cloudflare Next.js Deployment Skill Deploy Next.js applications to Cloudflare Workers using the OpenNext Cloudflare adapter for production-ready serverless Next.js hosting. ## When to Load References Load additional reference files based on your specific task: - **`references/error-catalog-extended.md`** - Load when encountering ANY error during setup, build, or deployment. Contains complete catalog of 11+ documented issues with root causes, solutions, and official sources. - **`references/service-integration-patterns.md`** - Load when integrating Cloudflare services (D1, R2, KV, Workers AI) with Next.js. Contains complete patterns for database queries, file uploads, caching, and AI inference. - **`references/troubleshooting.md`** - Load for general troubleshooting and debugging guidance beyond the error catalog. - **`references/feature-support.md`** - Load when checking if a specific Next.js feature is supported on Cloudflare Workers (e.g., "Can I use Server Actions?", "Does ISR work?"). - **`references/database-client-example.ts`** - Load when integrating external database clients (Drizzle, Prisma, PostgreSQL, MySQL) with proper request-scoping patterns required by Workers. - **`references/open-next.config.ts`** - Load when configuring caching behavior, image optimization, or custom OpenNext settings. - **`references/package.json`** - Load when setting up a new project or migrating an existing Next.js application to Cloudflare Workers. - **`references/wrangler.jsonc`** - Load when configuring Worker settings, compatibility flags, environment bindings (D1, R2, KV, AI), or deployment options. ## Use This Skill When - Deploying Next.js applications (App Router or Pages Router) to Cloudflare Workers - Need server-side rendering (SSR), static site generation (SSG), or incremental static regeneration (ISR) on Cloudflare - Migrating existing Next.js apps from Vercel, AWS, or other platforms to Cloudflare - Building full-stack Next.js applications with Clou