/next-on-workers:next-on-workersfrom next-on-workers
Publish a Next.js app styled with Tailwind CSS to Cloudflare Workers with the OpenNext adapter, and prove the live URL serves this build. Covers setup, the cache choice, a preview in the Workers runtime, who can open the app, a one-commit deploy, and a live check of page, styles, and build ID. Use when the user wants to deploy, publish, host, or ship a Next.js site or app on Cloudflare Workers, move one there from Vercel or Cloudflare Pages, or asks why it works in next dev but breaks on Workers. Korean triggers "Next.js 워커에 올려", "넥스트 앱 클라우드플레어에 배포", "CF 워커로 발행", "OpenNext로 배포", "로컬은 되는데 워커에서 깨져". Not for sites without Next.js.
Ships in next-on-workers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Publish a Next.js + Tailwind CSS app to Cloudflare Workers with the OpenNext adapter. It counts only when the live URL serves this build: page, styles, and build ID.
Publishing Next.js to Workers without this skill fails in three ways:
next dev passes and the Worker does not. next dev runs Node.js; the Worker runs workerd. There a Cache Components page with no incremental cache hangs, and a local .env value ends up in the bundle.opennextjs-cloudflare migrate can create an R2 bucket in whatever account the CLI is logged into and adds a billable Images binding. Wrangler turns on a public workers.dev URL and preview URLs by default.Ask for the Cloudflare account, Worker name, audience (a public domain, workers.dev, or behind sign-in), and whether any page revalidates (ISR, revalidateTag, revalidatePath). Compare npx wrangler whoami with the account the user named. Gate: account ID, Worker name, audience, and cache need are written down, and the CLI account matches.
Read setup.md. Start with create-next-app --tailwind, or keep the existing app. Add the adapter by hand from the config template and the cache template. Run migrate only if the user agrees to the bucket it creates, then review every line it wrote. A site with no server code can use a static export, which swaps the build, preview, and deploy commands. Gate: a Wrangler config with account_id exists, and the user agreed to every binding in it.
Read runtime.md. Use the static-assets cache with interception off unless pages revalidate. Move server-only secrets from .env* files to Worker secrets. Run python3 -I <this skill>/scripts/preflight.py .. Gate: no FAIL line, and the user fixed or accepted each WARN line.
Run npx opennextjs-cloudflare build, then npx opennextjs-cloudflare preview --port <free port> --ip 127.0.0.1. Run python3 -I <this skill>/scripts/check_live.py http://127.0.0.1:<port> --build-dir . --css-class <class> --expect-text "<dynamic text>", adding --path for one route of each kind the app has. Run npx wrangler deploy --dry-run --outdir .open-next/dry-run > .open-next/dry-run.log 2>&1, then rerun preflight with --dry-run-log .open-next/dry-run.log --plan <free|paid>; after a build it also lists env keys in the Worker. Stop only the server you started. Gate: check_live exits 0 against the preview, and the gzip size fits the plan.
Read exposure.md. Keep workers_dev and preview_urls false until the user decides. Public: a custom domain in the same account, or workers.dev. Private: Cloudflare Access in front before any public URL is on. Gate: the user chose the audience, and the config matches it.
Read deploy.md. Get the user's yes for this deploy and every new resource. Commit, confirm a clean tree, rebuild, and run npx opennextjs-cloudflare deploy. Keep any deploy message free of spaces, such as git:<sha>. Gate: the output names a version ID, and the build came from a clean tree.
Run check_live against https://<host> with the step 4 options, or --private --signin-host <host> for an app behind sign-in. Confirm with npx wrangler deployments status that the new version serves 100% of traffic. Look at the page in a browser. Gate: both checks pass against the public host.
Write the live URL, version ID, build ID, deploy and rollback commands, and any trap you hit into the project README. Read it back to the user, with what was not checked. Gate: the README says how to redeploy and roll back.
account_id and wrangler whoami agree before any command that writes..env* files and vars. A local build copies .env* values into the Worker; vars are plain text. Use Worker secrets.sources.md says where each rule came from.
SKILL.ko.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/open-next.config.ts (opens in a new tab)assets/wrangler.jsonc (opens in a new tab)references/deploy.md (opens in a new tab)references/exposure.md (opens in a new tab)references/runtime.md (opens in a new tab)references/setup.md (opens in a new tab)references/sources.ko.md (opens in a new tab)references/sources.md (opens in a new tab)scripts/check_live.py (opens in a new tab)scripts/preflight.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub robfold/next-on-workers --plugin next-on-workers