Preface

Deploying a project to Cloudflare sounds as simple as running wrangler deploy, but in practice, you often get stuck on a few common issues: Which one should you choose, Workers or Pages? How do you bind KV, D1, R2 and other storage services? Using OAuth login for local development, what Token should you configure in CI? Cloudflare has many product lines with scattered documentation, and without structured guidance, agents can easily get stuck on the wrong product paths.

cloudflare-deploy is an Agent Skill maintained by OpenAI in the .curated directory of the openai/skills repository, targeting requirements like “deploying, hosting, publishing, and building projects on Cloudflare”. Unlike vercel-deploy, which focuses on one-click preview deployments for Vercel, it covers the full suite of Cloudflare capabilities—edge functions with Workers, full-stack sites with Pages, Durable Objects, R2 object storage, Workers AI, and more. It is more like a deployment decision manual that you can flip through as needed.

This article is based on the official SKILL.md and the references/ subdocuments, introducing the positioning, capabilities, installation methods and typical usage of this Skill.

What is this

cloudflare-deploy is a skill package that follows the open Agent Skills standard (agentskills.io). Its core file is SKILL.md in the directory, along with a large number of references/ reference documents for agents to load on demand according to scenarios.

The official description is as follows:

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Source attribution: Curated skill directory in openai/skills maintained by OpenAI. The repository’s README is marked deprecated, and points to OpenAI Plugins as a new example source for Codex plugins; however, cloudflare-deploy can still be used in tools that support SKILL.md such as Cursor, Codex CLI via GitHub directory or local copy.

Its core problem solved: Organizing the complex product matrix of Cloudflare into executable decision trees and product-specific reference documents for agents, reducing common mistakes such as “choosing the wrong product, missing authentication configuration, ignoring sandbox network restrictions”.

Core Features and Highlights

1. Decision Tree: Choose the product first, then read the details

The main Skill body does not try to cram all Cloudflare documentation at once, but uses a decision tree to help agents quickly locate the right product:

When you need to run code: Branch by scenario:
- Edge Serverless functions → Workers
- Full-stack web applications with Git deployment → Pages
- Stateful coordination / real-time applications → Durable Objects
- Long-running multi-step tasks → Workflows
- Containers → Containers
- Scheduled tasks → Cron Triggers
- Lightweight HTTP rewriting → Snippets

When you need to store data:
- Key-value (configuration, sessions, caching) → KV
- Relational SQL → D1 (SQLite) or Hyperdrive (existing Postgres/MySQL)
- Object / file storage → R2
- Message queues → Queues
- Vector embeddings → Vectorize

There are also branches for AI/ML, network connectivity, security, media content, infrastructure as code (Pulumi / Terraform / REST API) and more. Once the agent hits a branch, it will load the corresponding product’s README and configuration instructions under references/.

2. Product Index: Compute, Storage, AI all in one place

The end of SKILL.md includes a complete Product Index covering:

Category Representative Products
Compute and Runtime Workers, Pages, Durable Objects, Workflows, Containers
Storage and Data KV, D1, R2, Queues, Hyperdrive, Secrets Store
AI and Machine Learning Workers AI, Vectorize, Agents SDK, AI Gateway
Network and Security Tunnel, WAF, Turnstile, Bot Management
Developer Tools Wrangler, Miniflare, C3, Observability

This index structure allows agents to look up modules separately for complex requirements (such as “Pages functions + D1 database + R2 static resources”), instead of hardcoding configurations from memory.

3. Deployment prerequisites and authentication flows are built into the Skill

Similar to vercel-deploy’s emphasis on “default preview deployment”, cloudflare-deploy includes authentication and sandbox network in its Prerequisites:
- You must verify your Cloudflare login status before deployment
- If the agent is running in a sandbox environment with blocked outbound network, retry with sandbox_permissions=require_escalated
- Deployment may take several minutes, the agent should set a sufficiently long timeout

4. Comparative perspective with vercel-deploy

Dimension vercel-deploy cloudflare-deploy
Platform Vercel Cloudflare
Scope Mainly CLI-based deployment, with unauthenticated fallback scripts Full-platform decision tree + product-specific references
Default Strategy Default preview deployment, production requires explicit user confirmation Executes according to product documentation, emphasizes running wrangler whoami first
Typical Commands vercel deploy -y wrangler deploy / wrangler pages deploy
Applicable Scenarios Frontend / full-stack quick preview launches Edge computing, Serverless, multi-cloud deployments

If your team uses both Vercel and Cloudflare, both skills can be installed side by side, and the agent will automatically select based on the user’s intent.

Installation and Activation

The universal format for Agent Skills: Each skill is a folder containing SKILL.md, with optional subdirectories scripts/, references/, assets/.

Install in Codex CLI

According to the official OpenAI README, curated skills can be installed by name via Codex’s built-in $skill-installer:

$skill-installer cloudflare-deploy

You can also specify the GitHub directory URL:

$skill-installer install https://github.com/openai/skills/tree/main/skills/.curated/cloudflare-deploy

After installation, restart Codex to load the new skill.

Install in Cursor

Cursor automatically discovers skills from the following directories (official documentation):

Path Scope
.cursor/skills/ Project-level
.agents/skills/ Project-level
~/.cursor/skills/ User-level (global)
~/.agents/skills/ User-level (global)

Manual installation steps:
1. Clone or download the cloudflare-deploy directory
2. Place the entire cloudflare-deploy folder into any of the above skills directories
3. Restart Cursor, or manually invoke it by typing / in the agent chat and searching for cloudflare-deploy

You can also import the GitHub repository link via the Cursor sidebar Customize → Rules → Add Rule → Remote Rule (Github).

Compatible with Claude Code and other tools

Skills follow open standards, and directories like .claude/skills/, ~/.claude/skills/ will also be loaded in Cursor; other tools that support Agent Skills can place the same directory structure according to their own documentation.

Typical Usage Examples

The following examples are all from the official SKILL.md and references/wrangler/auth.md, references/workers/, references/pages/, and can be reproduced directly.

Step 1: Verify Cloudflare authentication

Before executing wrangler deploy, wrangler pages deploy or npm run deploy, the agent should run:

npx wrangler whoami    # Display account information if already logged in

How to handle when not logged in:
- Local / interactive environment: npx wrangler login (one-time OAuth, browser authorization)
- CI/CD / browserless environment: Set the environment variable CLOUDFLARE_API_TOKEN (create a token in the Cloudflare console, it is recommended to use the “Edit Cloudflare Workers” template)

Step 2: Choose Workers or Pages according to your needs

Deploy an edge Worker (API, proxy, WebSocket, etc.):

npm create cloudflare@latest my-worker -- --type hello-world
cd my-worker
npx wrangler dev          # Local development
npx wrangler deploy       # Production deployment

Workers are recommended to use Module mode:

export default {
  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
    return new Response('Hello World!');
  },
};

Deploy a Pages static / full-stack site:

# Deploy build artifact directory
npx wrangler pages deploy ./dist --project-name=my-project

# Local preview
npx wrangler pages dev ./dist

Pages also supports Git integration (connect GitHub/GitLab for automatic deployment via Dashboard) and the C3 scaffold:

npm create cloudflare@latest my-app

Step 3: Trigger method in agent chat

When the user says something similar to the following intentions, the agent should automatically match this Skill:
- “Deploy this project to Cloudflare”
- “Write an edge API with Workers and launch it”
- “How do Pages bind a D1 database?”
- “Help me host this static site on Cloudflare”

You can also explicitly invoke it by typing /cloudflare-deploy in Cursor.

Sandbox and network permissions

If the deployment fails due to timeout, DNS error or connection reset, the official Troubleshooting guides the agent to retry with elevated network permissions and explain to the user:

The deploy needs escalated network access to deploy to Cloudflare. I can rerun the command with escalated permissions—want me to proceed?

Applicable Scenarios and Notes

Who it is for and what scenarios:
- Need to run APIs, middleware logic on edge nodes to reduce latency for global users
- Use Pages to host JAMstack / framework projects (SvelteKit, Astro, Nuxt, etc.), and want agents to understand both Git deployment and Direct Upload methods
- Projects involve Cloudflare storage (KV, D1, R2) or AI capabilities (Workers AI, Vectorize), and need agents to write binding configurations according to official references
- Multi-cloud deployment workflow coexisting with Vercel, handled by different skills

Limitations and notes:
1. Large skill size: There are many documents under references/, agents should load incrementally to avoid filling the context at once.
2. Authentication required: Unlike vercel-deploy’s unauthenticated fallback script, Cloudflare deployment depends on Wrangler login or API Token, and the agent should not skip the whoami check.
3. Repository status: The main openai/skills repository is marked deprecated, you can pay attention to the OpenAI Plugins ecosystem for long-term use; the current GitHub directory content can still be copied and used.
4. Deployment time: Build and global distribution may take several minutes, the agent command needs to configure a reasonable timeout.
5. Product selection: Workers are suitable for APIs / complex routing; Pages are suitable for static sites and framework Git workflows; the two can be combined via Pages Functions, and the decision tree in the Skill can help distinguish them.

Closing

The value of cloudflare-deploy lies in translating the fact that Cloudflare has expanded from “edge CDN vendor” to “orchestrable full-stack platform” into a decision path that agents can execute step by step: authenticate first, then select the product, then read the reference, and finally execute the Wrangler command. If you are already using vercel-deploy for quick preview deployments on Vercel, you might as well install cloudflare-deploy as well, so that agents have a reliable reference for Serverless and edge computing scenarios.

Official directory: https://github.com/openai/skills/tree/main/skills/.curated/cloudflare-deploy