null-shot avatar

Cloudflare Opennext

This is the official adapter for running Next.js on Cloudflare Workers instead of Vercel. It handles both App Router and Pages Router, supports ISR and SSG, and critically uses the Node.js runtime, not Edge, which means you get full Node.js APIs and broader Next.js feature support. You access Cloudflare bindings like KV, R2, and D1 through getCloudflareContext() in any route or component. The setup requires specific wrangler.jsonc config with nodejs_compat flags and a self-referencing service binding that must match your worker name. The caching system is flexible but needs configuration, with options for R2, KV, or D1 depending on whether you need ISR, time-based revalidation, or tag-based invalidation.

skills.sh installs
466
last updated
Aug 21, 2026

Install

$ npx -y skills add null-shot/cloudflare-skills --skill cloudflare-opennext --agent claude-code

Installs into .claude/skills of the current project.

Files

Cloudflare OpenNext

Deploy Next.js applications to Cloudflare Workers using the @opennextjs/cloudflare adapter with full support for App Router, Pages Router, ISR, SSG, and Cloudflare bindings.

When to Use

  • Creating new Next.js apps for Cloudflare Workers
  • Migrating existing Next.js apps to Cloudflare
  • Configuring ISR/SSG caching with R2, KV, or D1
  • Accessing Cloudflare bindings (KV, R2, D1, Durable Objects, AI)
  • Using databases and ORMs (Drizzle, Prisma) in Next.js
  • Troubleshooting deployment issues or bundle size problems

Getting Started

New App

npm create cloudflare@latest -- my-next-app --framework=next --platform=workers
cd my-next-app
npm run dev      # Local development with Next.js
npm run preview  # Preview in Workers runtime
npm run deploy   # Deploy to Cloudflare

Existing App Migration

# 1. Install dependencies
npm install @opennextjs/cloudflare@latest
npm install --save-dev wrangler@latest

# 2. Create wrangler.jsonc (see Configuration section)
# 3. Create open-next.config.ts
# 4. Update next.config.ts
# 5. Add scripts to package.json
# 6. Deploy
npm run deploy

Core Concepts

How OpenNext Works

Sponsors

Details

Repository
github.com/null-shot/cloudflare-skills
Categories
Frontend Development, DevOps & CI/CD, Release Management, Cloud & Infrastructure
First seen
Jun 3, 2026
1secondsky avatartanstack-routersecondsky/claude-skillsTanStack Router type-safe file-based routing for React. Use for SPAs, TanStack Query integration, Cloudflare Workers, or encountering devtools, type safety, loa461skills.sh installs
2next-safe-action avatarsafe-action-tanstack-querynext-safe-action/skillsUse when integrating next-safe-action with TanStack Query (React Query) -- mutationOptions(), useMutation, ActionMutationError error handling, type guards, opti453skills.sh installs
3ncklrs avatarremotion-animationncklrs/startup-os-skillsGenerates animation configurations for Remotion including spring configs, interpolations, easing functions, and timing logic. Focuses ONLY on animation paramete452skills.sh installs
4aaronontheweb avatarverify-email-snapshotsaaronontheweb/dotnet-skillsSnapshot test email templates using Verify to catch regressions. Validates rendered HTML output matches approved baseline. Works with MJML templates and any ema436skills.sh installs
5secondsky avatarbun-sveltekitsecondsky/claude-skillsUse when building or running SvelteKit apps on Bun, including SSR, adapters, and Bun-specific APIs436skills.sh installs
6auth0 avatarauth0-spa-jsauth0/agent-skillsUse when adding Auth0 login or token management to a Vanilla JS, Svelte, or framework-agnostic SPA. Integrates @auth0/auth0-spa-js — use when there is no framew434skills.sh installs