# Cloudflare pages deploy

> Cloudflare pages deploy is an open-source agent skill for cloud and infrastructure. Deploys static sites and previews to Cloudflare Pages with wrangler and checks the live. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ivy00johns/Skill-Madness/tree/main/skills/workflows/cloudflare-pages-deploy
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** cloudflare-pages-deploy
- **Collection:** https://github.com/ivy00johns/Skill-Madness
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through publishing static sites, preview builds and review hubs to Cloudflare Pages using the wrangler CLI. It starts with a preflight check that confirms the account is logged in and lists existing Pages projects, so the agent does not assume Cloudflare is unavailable when wrangler is simply missing from the PATH. It then asks the agent to look for a repository's own deploy script, workflow or docs before inventing a process, and to match the site to an existing project rather than overwriting a live one.

The deploy steps cover direct uploads of a built output folder, with previews on a branch by default and production only when requested. The guide also covers a known issue where new project creation is delegated to Workers and needs a --force flag, along with guidance on verifying the public origin with curl and redirect handling. Pitfalls include propagation-related 522 errors, 308 rewrites for .html paths, _redirects files, and shared origins for hubs that frame other sites.

The skill expects a Node environment with npx, a built site folder, and access to a Cloudflare account through a local login or, in remote sessions, an API token and account ID. It also sets a consent rule: deploy when asked, but do not redeploy after every later edit.

## When your agent uses it

> Deploy static sites, previews and review hubs to Cloudflare Pages (free) with wrangler, then verify the public URL. This machine is already logged in with live projects, so check here before concluding Cloudflare is unavailable. Not Railway, here.now, or a private claude.ai page (artifact-publish). Trigger on "deploy to Cloudflare", "pages.dev", "wrangler", "host this site publicly", "is it live".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/workflows/cloudflare-pages-deploy)
- [Asks for: Read, Write, Edit, Bash, Glob, Grep](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/workflows/cloudflare-pages-deploy/SKILL.md)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/workflows/cloudflare-pages-deploy)

## Features

- **Preflight access check:** Confirms the wrangler login and lists existing Pages projects and their domains before any deploy.
- **Existing convention lookup:** Prefers a repository's own deploy script, workflow or documented process over an ad hoc command.
- **Preview and production deploys:** Deploys to a preview branch by default and to production only when the user asks for it.
- **Public URL verification:** Checks status codes on the live origin with curl and lists recent deployments.
- **Known deploy pitfalls:** Covers the Workers delegation fix, propagation delays, redirect behaviour and shared hub origins.

## Good for

- Publish a static site preview on Cloudflare Pages
- Deploy a built documentation or landing page to pages.dev
- Host a review hub that frames several static sites
- Check whether a deployed site is live and returning the right status codes
- Create a new Pages project for a static folder

## Install

### Claude Code

This skill ships in the `skill-madness` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness
```

Or copy only this skill to `~/.claude/skills/cloudflare-pages-deploy`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cloudflare-pages-deploy &&
cp -R "$tmp/skills/workflows/cloudflare-pages-deploy" ~/.claude/skills/cloudflare-pages-deploy &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/cloudflare-pages-deploy` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/cloudflare-pages-deploy` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cloudflare-pages-deploy &&
cp -R "$tmp/skills/workflows/cloudflare-pages-deploy" ~/.agents/skills/cloudflare-pages-deploy &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/cloudflare-pages-deploy` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/cloudflare-pages-deploy` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cloudflare-pages-deploy &&
cp -R "$tmp/skills/workflows/cloudflare-pages-deploy" ~/.cursor/skills/cloudflare-pages-deploy &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/cloudflare-pages-deploy` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/workflows/cloudflare-pages-deploy
```

Or copy the folder to `~/.gemini/skills/cloudflare-pages-deploy` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/cloudflare-pages-deploy`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cloudflare-pages-deploy &&
cp -R "$tmp/skills/workflows/cloudflare-pages-deploy" ~/.copilot/skills/cloudflare-pages-deploy &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/cloudflare-pages-deploy` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git
```

Then copy `Skill-Madness/skills/workflows/cloudflare-pages-deploy` into your agent's skills folder as `cloudflare-pages-deploy`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs wrangler, which the skill runs through npx, and a Cloudflare login with Pages write access. In remote sessions it expects CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID to be set.

### Does Cloudflare pages deploy deploy to production by default?

No. It defaults to a preview branch and deploys to production only when the user asks for a production or live deploy.

### What happens if a new project fails to deploy?

The skill describes a Workers delegation error for new static projects and says to create the project with the --force flag, which creates it on classic Pages.

### Which tools does Cloudflare pages deploy use?

The allowed tools are Read, Write, Edit, Bash, Glob and Grep.

### How do I install Cloudflare pages deploy in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cloudflare-pages-deploy to use it in all your projects, or to .claude/skills/cloudflare-pages-deploy in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

### Does Cloudflare pages deploy run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Cloudflare pages deploy?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Cloudflare pages deploy?

The closest alternatives to Cloudflare pages deploy are Cloudflare pages stale assets, Cloudflare deploy, Wrangler, Deploy to vercel and Frameworks on cloudflare.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Cloudflare pages stale assets](https://ai-powered.com/skills/cloudflare-pages-stale-assets): Cloudflare pages stale assets is an open-source agent skill for cloud and infrastructure.
- [Cloudflare deploy](https://ai-powered.com/skills/cloudflare-deploy): Cloudflare deploy is a free agent skill for cloud and infrastructure.
- [Wrangler](https://ai-powered.com/skills/wrangler): Wrangler is an open-source agent skill for cloud and infrastructure.
- [Deploy to vercel](https://ai-powered.com/skills/deploy-to-vercel-chicio): Deploy to vercel is an open-source agent skill for cloud and infrastructure.
- [Frameworks on cloudflare](https://ai-powered.com/skills/frameworks-on-cloudflare): Frameworks on cloudflare is an open-source agent skill for cloud and infrastructure.
- [Netlify deploy](https://ai-powered.com/skills/netlify-deploy): Netlify deploy is a free agent skill for cloud and infrastructure.
- [Cloudflare](https://ai-powered.com/skills/cloudflare-cloudflare): Cloudflare is an open-source agent skill for cloud and infrastructure.
- [Vercel deploy](https://ai-powered.com/skills/vercel-deploy): Vercel deploy is a free agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/cloudflare-pages-deploy
