All skills
openai avatar

/cloudflare-deploy

@bf9e226 official
by openaiopenai/skills28k stars
1,891

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.

Use this Skill: https://skilld.dev/gh/openai/skills/cloudflare-deploy

This session only. Nothing lands on disk.

referencesbindingsREADME.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Cloudflare Bindings Skill Reference

Expert guidance on Cloudflare Workers Bindings - the runtime APIs that connect Workers to Cloudflare platform resources.

What Are Bindings?

Bindings are how Workers access Cloudflare resources (storage, compute, services) via the env object. They're configured in wrangler.jsonc, type-safe via TypeScript, and zero-overhead at runtime.

Reading Order

  1. This file - Binding catalog and selection guide
  2. api.md - TypeScript types and env access patterns
  3. configuration.md - Complete wrangler.jsonc examples
  4. patterns.md - Best practices and common patterns
  5. gotchas.md - Critical pitfalls and troubleshooting

Binding Catalog

Storage Bindings

Binding Use Case Access Pattern
KV Key-value cache, CDN-backed reads env.MY_KV.get(key)
R2 Object storage (S3-compatible) env.MY_BUCKET.get(key)
D1 SQL database (SQLite) env.DB.prepare(sql).all()
Durable Objects Coordination, real-time state env.MY_DO.get(id)
Vectorize Vector embeddings search env.VECTORIZE.query(vector)
Queues Async message processing env.MY_QUEUE.send(msg)

Compute Bindings

Binding Use Case Access Pattern
Service Worker-to-Worker RPC env.MY_SERVICE.fetch(req)
Workers AI LLM inference env.AI.run(model, input)
Browser Rendering Headless Chrome env.BROWSER.fetch(url)

Platform Bindings

Binding Use Case Access Pattern
Analytics Engine Custom metrics env.ANALYTICS.writeDataPoint(data)
mTLS Client certificates env.MY_CERT (string)
Hyperdrive Database pooling env.HYPERDRIVE.connectionString
Rate Limiting Request throttling env.RATE_LIMITER.limit(id)
Workflows Long-running workflows env.MY_WORKFLOW.create()

Configuration Bindings

Binding Use Case Access Pattern
Environment Variables Non-sensitive config env.API_URL (string)
Secrets Sensitive values env.API_KEY (string)
Text/Data Blobs Static files env.MY_BLOB (string)
WASM WebAssembly modules env.MY_WASM (WebAssembly.Module)

Quick Selection Guide

Need persistent storage?

  • Key-value < 25MB → KV
  • Files/objects → R2
  • Relational data → D1
  • Real-time coordination → Durable Objects

Need AI/compute?

  • LLM inference → Workers AI
  • Scraping/PDFs → Browser Rendering
  • Call another Worker → Service binding

Need async processing?

  • Background jobs → Queues

Need config?

  • Public values → Environment Variables
  • Secrets → Secrets (never commit)

Quick Start

  1. Add binding to wrangler.jsonc:
{
  "kv_namespaces": [
    { "binding": "MY_KV", "id": "your-kv-id" }
  ]
}
  1. Generate types:
npx wrangler types
  1. Access in Worker:
export default {
  async fetch(request, env, ctx) {
    await env.MY_KV.put('key', 'value');
    return new Response('OK');
  }
}

Type Safety

Bindings are fully typed via wrangler types. See api.md for details.

Limits

  • 64 bindings max per Worker (all types combined)
  • See gotchas.md for per-binding limits

Key Concepts

Zero-overhead access: Bindings compiled into Worker, no network calls to access Type-safe: Full TypeScript support via wrangler types Per-environment: Different IDs for dev/staging/production Secrets vs Vars: Secrets encrypted at rest, never in config files

See Also

Source: SKILL.md on GitHub

2 warnings17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides comprehensive guidance for deploying and managing infrastructure on the Cloudflare platform. It includes extensive educational material on secure development practices, such as preventing SQL injection and managing secrets effectively. No malicious patterns or security risks were identified.

  • Socket17d

    2 alerts: gptAnomaly

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    310/310 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at bf9e226. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Activeupdated 8 months ago

README badge

README badge for openai/skills/cloudflare-deploy

Deploys applications and infrastructure to Cloudflare's platform, including Workers, Pages, D1, R2, Durable Objects, KV, and other services. Use decision trees to route to the right Cloudflare product based on compute, storage, AI, networking, security, or media needs.

Generated from the current SKILL.md.

Does this skill cover all Cloudflare products?
The skill is a consolidated index covering compute, storage, AI, networking, security, media, and developer tools on Cloudflare. It uses decision trees to route you to the right product reference, then loads detailed guidance for that product.
What authentication is required before deploying?
Run `npx wrangler whoami` to check if authenticated. For local deployment, use `wrangler login` (one-time OAuth). For CI/CD, set the `CLOUDFLARE_API_TOKEN` environment variable.
What should I do if deployment fails due to network issues?
Rerun the deploy with `sandbox_permissions=require_escalated` to grant elevated network access, which is required for outbound requests to Cloudflare during deployment.
How long does a Cloudflare deployment typically take?
Deployments may take several minutes. Use appropriate timeout values in your configuration or CI/CD environment.

Generated from the current SKILL.md. These answers refresh after source changes.