cloudflare-pages-to-workers
Migrate a Cloudflare Pages project to Workers with static assets.
Skill by codewhale-hq
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/codewhale-hq-cloudflare-pages-to-workers
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cloudflare-pages-to-workers
What's inside
- Skill name
cloudflare-pages-to-workers- Description
- Migrate a Cloudflare Pages project to Workers with static assets. Convert config, handle _worker.js and Pages Functions, move authored commands to cf, validate with a dry run. Use when a project has pages_build_output_dir or uses wrangler pages deploy.
- License
- MIT
- Instructions
- 98 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Cloudflare Pages to Workers Cloudflare documents a migration from Pages to Workers with static assets (https://developers.cloudflare.com/workers/static-assets/migration-guides/migrate-from-pages/). This skill is a checklist for that migration; it does not deploy. Before changing anything, read Cloudflare's current guide. If the `cloudflare-docs` plugin is enabled, its docs MCP also publishes a migration-guide tool next to the search tool. ## 1. Inspect - `wrangler.toml|json|jsonc` with `pages_build_output_dir`, or a Pages project configured only in the dashboard (then there is no config file to convert; bindings and variables live in the dashboard and must be re-declared). - A `functions/` directory (Pages Functions), a built `_worker.js`, `_routes.json`, `_headers`, `_redirects`. - `package.json` scripts that call `wrangler pages dev` or `wrangler pages deploy`. - Inspect the installed cf version, framework adapter and Node22.18+ runtime. Preview a legacy conversion with `cf migrate --dry-run`; review its local edits and unresolved items. Do not create a new project over the old one. ## 2. Classify - **Assets only** (no `functions/`, no `_worker.js`): the new config needs only `name`, `compatibility_date` and `assets.directory`. - **Assets plus code** (a built `_worker.js`, or `functions/`): add `main` pointing to the Worker entry, and `assets.binding` (for example `ASSETS`) if the code serves assets itself. ## 3. Convert the config Use `cloudflare.config.ts` and the current `cf/config` helpers. The Worker needs `name` and `compatibilityDate`; code also needs `entrypoint`. Preserve account, bindings/IDs, compatibility behavior and domains from the Pages project. Static assets follow the adapter's current documented output format. If code needs an ASSETS binding, declare `bindings.assets()` in `worker.env`. Review generated output with `cf build` and `cf deploy --dry-run`. A built `_worker.js` must not become a public asset. Move it outside the assets directory or exclude it and `_routes.json` in `.assetsignore`: ``` _worker.js _routes.json ``` Pages excluded `node_modules`, `.DS_Store` and `.git` automatically; Workers does not, so list them (`**/node_modules`, `**/.DS_Store`, `**/.git`) if they are inside the assets directory. - `_headers` and `_redirects` placed in the assets directory are parsed by Workers and keep working for static asset responses, so do not ignore them. They are not applied to responses generated by Worker code; if the project has Pages Functions, `_worker.js`, or `run_worker_first`, headers and redirects for those responses must be set in code. - If `functions/` exists, the build must compile it. keep the framework's documented Functions build adapter and set the Worker entrypoint to its output. A legacy compatibility delegate may still be an adapter implementation detail; do not invent a cf Pages Functions build command or silently discard function routing. ## 4. Scripts | Before | After | | --- | --- | | `wrangler pages dev <dir>` | `cf dev` after reviewed migration | | `wrangler pages deploy <dir>` | `cf deploy` (needs approval) | Framework commands (`astro dev`, `next dev`) stay as they are. If the framework has a Cloudflare adapter that supports Workers, use its documented setup. ## 5. Validate locally 1. Build with the project's command. 2. Run `/cloudflare-preflight`. 3. `cf deploy --dry-run` and read its output for the asset count, the entry file and bindings. 4. `cf dev`, then request the routes that the old site served, including a missing path, an SPA route if applicable, and one Function route. ## 6. Cutover is the user's call Deployment, custom-domain changes and deleting the Pages project are account-level actions. Follow `cloudflare-deploy`: show the plan and wait for a yes. Things to tell the user before cutover: - Preview deployments, branch aliases and the `*.pages.dev` hostname do not carry over automatically; Workers Builds and `workers.dev` work differently. - Custom domains must be attached to the Worker, and that moves traffic. - Keep the Pages project until the Worker is verified; do not delete it. ## Done means The config converts, a dry run succeeds, `cf dev` serves the expected routes, and the report lists what still needs the user (dashboard-only bindings, domains, cutover). CLI migration: https://developers.cloudflare.com/cf/wrangler/migrate/.
From codewhale-hq/codewhale-plugin-marketplace, MIT.
More from codewhale-hq/codewhale-plugin-marketplace
- 0.621score
computer-use
codewhale-hq
Operate desktop apps and isolated browsers on registered computers.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
status-update
codewhale-hq
Write an evidence-based status update from Linear data - summarize what shipped, what is in progress, what is blocked or stale for a project, cycle, or a…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
issue-triage
codewhale-hq
Triage and draft GitHub issues with the GitHub MCP tools - search for duplicates, classify and prioritize, and draft a well-formed new issue for the user to…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-storage
codewhale-hq
Use Cloudflare KV, R2 and D1 from a Worker.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
issue-triage
codewhale-hq
Triage Linear issues and claim work with the Linear MCP tools - find the triage queue or your assigned work, check for duplicates and existing owners, set…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-workers
codewhale-hq
Build, configure and test a Cloudflare Worker locally with cf (cloudflare.config.ts, typed bindings, static assets, cf dev, vitest).
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
review-panel
codewhale-hq
Fan six specialist reviewers (general correctness, silent failures, type design, test gaps, comment accuracy, simplification) out over the current diff, a…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
ui-critique
codewhale-hq
Critique a user interface (screenshot, running page, HTML/CSS, mockup or description) and return severity-ranked findings with evidence and a concrete fix for…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
iterate-until-done
codewhale-hq
Set up a bounded iterate-until-done run with the loop plugin's /loop command.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
chromewhale
codewhale-hq
Read and act on selected Chrome tabs and frames — their real browser, their logged-in sessions.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
cloudflare-deploy
codewhale-hq
Deploy or change a Cloudflare Worker with cf.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
cloudflare-durable-objects
codewhale-hq
Design and write Cloudflare Durable Objects.
SkillAFreshness: A★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Oct 6, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- codewhale.net
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from codewhale-hq
- 0.724score
AGENTS.md · codewhale-hq/Codewhale
codewhale-hq
AGENTS.md from codewhale-hq/Codewhale: 266 lines covering The ponytail method, Working rules, Landing other people's work, Merging under a gate and more.
TemplateAFreshness: A★ 41.1KCodex +5 - 0.724score
Codewhale
codewhale-hq
Open-source Rust coding agent for the terminal that works with more than 40 model providers or local models
AgentAFreshness: A★ 41.1K - 0.621score
computer-use
codewhale-hq
Operate desktop apps and isolated browsers on registered computers.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
ui-critique
codewhale-hq
Critique a user interface (screenshot, running page, HTML/CSS, mockup or description) and return severity-ranked findings with evidence and a concrete fix for…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-storage
codewhale-hq
Use Cloudflare KV, R2 and D1 from a Worker.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-workers
codewhale-hq
Build, configure and test a Cloudflare Worker locally with cf (cloudflare.config.ts, typed bindings, static assets, cf dev, vitest).
SkillAFreshness: A★ 5Claude Code +9
Cite this page
cloudflare-pages-to-workers skill. Agent Mart. https://agentmart.dev/skills/codewhale-hq-cloudflare-pages-to-workers (last updated 2026-10-24)