/cloudflare-workers
Cloudflare account ID, set as a CI secret for wrangler deploys.
$ npx -y skills add tenequm/skills --skill cloudflare-workers --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cloudflare-workers
Context preview
The summary Claude sees to decide when to auto-load this skill.
Cloudflare account ID, set as a CI secret for wrangler deploys.
SKILL.md
cloudflare-workers.SKILL.mdname: cloudflare-workers
description: Rapid development with Cloudflare Workers - build and deploy serverless applications on Cloudflare's global network. Use when building APIs, full-stack web apps, edge functions, background jobs, or real-time applications. Triggers on phrases like "cloudflare workers", "wrangler", "edge computing", "serverless cloudflare", "workers bindings", or files like wrangler.toml, worker.ts, worker.js.
metadata:
version: "3.1.2"
openclaw:
homepage: https://github.com/tenequm/skills/tree/main/skills/cloudflare-workers
emoji: "☁️"
primaryEnv: CLOUDFLARE_API_TOKEN
envVars:
- name: CLOUDFLARE_API_TOKEN
required: false
description: Cloudflare API token (scoped). Used by wrangler for non-interactive auth and CI deploys.
- name: CLOUDFLARE_ACCOUNT_ID
required: false
description: Cloudflare account ID, set as a CI secret for wrangler deploys.Cloudflare Workers
Overview
Cloudflare Workers is a serverless execution environment that runs JavaScript, TypeScript, Python, and Rust code on Cloudflare's global network. Workers execute in milliseconds, scale automatically, and integrate with Cloudflare's storage and compute products through bindings.
**Key Benefits:**
- **Zero cold starts** - Workers run in V8 isolates, not containers
- **Global deployment** - Code runs in 300+ cities worldwide
- **Rich ecosystem** - Bindings to D1, KV, R2, Durable Objects, Queues, Containers, Workflows, and more
- **Full-stack capable** - Build APIs and serve static assets in one project
- **Standards-based** - Uses Web APIs (fetch, crypto, streams, WebSockets)
When to Use This Skill
Use Cloudflare Workers for:
- **APIs and backends** - RESTful APIs, GraphQL, tRPC, WebSocket servers
- **Full-stack applications** - React, Next.js, Remix, Astro, Vue, Svelte with static assets
- **Edge middleware** - Authentication, rate limiting, A/B testing, routing
- **Background processing** - Scheduled jobs (cron), queue consumers, webhooks
- **Data transformation** - ETL pipelines, real-time data processing
- **AI applications** - RAG systems, chatbots, image generation with Workers AI
- **Durable workflows** - Multi-step long-running tasks with automatic retries (Workflows)
- **Container workloads** - Run Docker containers alongside Workers (Containers)
- **MCP servers** - Host remote Model Context Protocol servers
- **Proxy and gateway** - API gateways, content transformation, protocol translation
Quick Start Workflow
1. Install Wrangler CLI
npm install -g wrangler
# Login to Cloudflare
wrangler login
2. Create a New Worker
# Using C3 (create-cloudflare) - recommended
npm create cloudflare@latest my-worker
# Or create manually
wrangler init my-worker
cd my-worker
3. Write Your Worker
**Basic HTTP API (TypeScript):**
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const url = new URL(request.url);
if (url.pathname === "/api/hello") {
return Response.json({ message: "Hello from Workers!" });
}
return new Response("Not found", { status: 404 });
},
};**With environment variables and KV:**
interface Env {
MY_VAR: string;
MY_KV: KVNamespace;
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
// Access environment variable
const greeting = env.MY_VAR;
// Read from KV
const value = await env.MY_KV.get("my-key");
return Response.json({ greeting, value });
},
};4. Develop Locally
# Start local development server with hot reload
wrangler dev
# Access at http://localhost:8787
5. Deploy to Production
# Deploy to workers.dev subdomain
wrangler deploy
# Deploy to custom domain (configure in wrangler.toml)
wrangler deploy
Core Concepts
Workers Runtime
Workers use the V8 JavaScript engine with Web Standard APIs:
- **Execution model**: Isolates (not containers) - instant cold starts
- **CPU time limit**: 10ms (Free), 30s (Paid) per request
- **Memory limit**: 128 MB per isolate
- **Languages**: JavaScript, TypeScript, Python, Rust
- **APIs**: fetch, crypto, streams, WebSockets, WebAssembly
**Supported APIs:**
- Fetch API (HTTP requests)
- URL API (URL parsing)
- Web Crypto (encryption, hashing)
- Streams API (data streaming)
- WebSockets (real-time communication)
- Cache API (edge caching)
- HTML Rewriter (HTML transformation)
Handlers
Workers respond to events through handlers:
**Fetch Handler** (HTTP requests):
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
return new Response("Hello!");
},
};**Scheduled Handler** (cron jobs):
export default {
async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext) {
// Runs on schedule defined in wrangler.toml
await env.MY_KV.put("last-run", new Date().toISOString());
},
};**Queue Handler** (message processing):
export default {
async queue(batch: MessageBatch<any>, env: Env, ctx: ExecutionContext) {
for (const message of batch.messages) {
await processMessage(message.body);
message.ack();
}
},
};Bindings
Bindings connect your Worker to Cloudflare resources. Configure in `wrangler.toml`:
**KV (Key-Value Storage):**
[[kv_namespaces]]
binding = "MY_KV"
id = "your-kv-namespace-id"
// Usage
await env.MY_KV.put("key", "value");
const value = await env.MY_KV.get("key");**D1 (SQL Database):**
[[d1_databases]]
binding = "DB"
database_name = "my-database"
database_id = "your-database-id"
// Usage
const result = await env.DB.prepare(
"SELECT * FROM users WHERE id = ?"
).bind(userId).all();
**R2 (Object Storage):**
[[r2_buckets]]
binding = "MY_BUCKET"
bucket_name = "my-bucket"
// Usage
await env.MY_BUC
Read more
name: cloudflare-workers
description: Rapid development with Cloudflare Workers - build and deploy serverless applications on Cloudflare's global network. Use when building APIs, full-stack web apps, edge functions, background jobs, or real-time applications. Triggers on phrases like "cloudflare workers", "wrangler", "edge computing", "serverless cloudflare", "workers bindings", or files like wrangler.toml, worker.ts, worker.js.
metadata:
version: "3.1.2"
openclaw:
homepage: https://github.com/tenequm/skills/tree/main/skills/cloudflare-workers
emoji: "☁️"
primaryEnv: CLOUDFLARE_API_TOKEN
envVars:
- name: CLOUDFLARE_API_TOKEN
required: false
description: Cloudflare API token (scoped). Used by wrangler for non-interactive auth and CI deploys.
- name: CLOUDFLARE_ACCOUNT_ID
required: false
description: Cloudflare account ID, set as a CI secret for wrangler deploys.Cloudflare Workers
Overview
Cloudflare Workers is a serverless execution environment that runs JavaScript, TypeScript, Python, and Rust code on Cloudflare's global network. Workers execute in milliseconds, scale automatically, and integrate with Cloudflare's storage and compute products through bindings.
**Key Benefits:**
- **Zero cold starts** - Workers run in V8 isolates, not containers
- **Global deployment** - Code runs in 300+ cities worldwide
- **Rich ecosystem** - Bindings to D1, KV, R2, Durable Objects, Queues, Containers, Workflows, and more
- **Full-stack capable** - Build APIs and serve static assets in one project
- **Standards-based** - Uses Web APIs (fetch, crypto, streams, WebSockets)
When to Use This Skill
Use Cloudflare Workers for:
- **APIs and backends** - RESTful APIs, GraphQL, tRPC, WebSocket servers
- **Full-stack applications** - React, Next.js, Remix, Astro, Vue, Svelte with static assets
- **Edge middleware** - Authentication, rate limiting, A/B testing, routing
- **Background processing** - Scheduled jobs (cron), queue consumers, webhooks
- **Data transformation** - ETL pipelines, real-time data processing
- **AI applications** - RAG systems, chatbots, image generation with Workers AI
- **Durable workflows** - Multi-step long-running tasks with automatic retries (Workflows)
- **Container workloads** - Run Docker containers alongside Workers (Containers)
- **MCP servers** - Host remote Model Context Protocol servers
- **Proxy and gateway** - API gateways, content transformation, protocol translation
Quick Start Workflow
1. Install Wrangler CLI
npm install -g wrangler # Login to Cloudflare wrangler login
2. Create a New Worker
# Using C3 (create-cloudflare) - recommended npm create cloudflare@latest my-worker # Or create manually wrangler init my-worker cd my-worker
3. Write Your Worker
**Basic HTTP API (TypeScript):**
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const url = new URL(request.url);
if (url.pathname === "/api/hello") {
return Response.json({ message: "Hello from Workers!" });
}
return new Response("Not found", { status: 404 });
},
};**With environment variables and KV:**
interface Env {
MY_VAR: string;
MY_KV: KVNamespace;
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
// Access environment variable
const greeting = env.MY_VAR;
// Read from KV
const value = await env.MY_KV.get("my-key");
return Response.json({ greeting, value });
},
};4. Develop Locally
# Start local development server with hot reload wrangler dev # Access at http://localhost:8787
5. Deploy to Production
# Deploy to workers.dev subdomain wrangler deploy # Deploy to custom domain (configure in wrangler.toml) wrangler deploy
Core Concepts
Workers Runtime
Workers use the V8 JavaScript engine with Web Standard APIs:
- **Execution model**: Isolates (not containers) - instant cold starts
- **CPU time limit**: 10ms (Free), 30s (Paid) per request
- **Memory limit**: 128 MB per isolate
- **Languages**: JavaScript, TypeScript, Python, Rust
- **APIs**: fetch, crypto, streams, WebSockets, WebAssembly
**Supported APIs:**
- Fetch API (HTTP requests)
- URL API (URL parsing)
- Web Crypto (encryption, hashing)
- Streams API (data streaming)
- WebSockets (real-time communication)
- Cache API (edge caching)
- HTML Rewriter (HTML transformation)
Handlers
Workers respond to events through handlers:
**Fetch Handler** (HTTP requests):
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
return new Response("Hello!");
},
};**Scheduled Handler** (cron jobs):
export default {
async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext) {
// Runs on schedule defined in wrangler.toml
await env.MY_KV.put("last-run", new Date().toISOString());
},
};**Queue Handler** (message processing):
export default {
async queue(batch: MessageBatch<any>, env: Env, ctx: ExecutionContext) {
for (const message of batch.messages) {
await processMessage(message.body);
message.ack();
}
},
};Bindings
Bindings connect your Worker to Cloudflare resources. Configure in `wrangler.toml`:
**KV (Key-Value Storage):**
[[kv_namespaces]] binding = "MY_KV" id = "your-kv-namespace-id"
// Usage
await env.MY_KV.put("key", "value");
const value = await env.MY_KV.get("key");**D1 (SQL Database):**
[[d1_databases]] binding = "DB" database_name = "my-database" database_id = "your-database-id"
// Usage const result = await env.DB.prepare( "SELECT * FROM users WHERE id = ?" ).bind(userId).all();
**R2 (Object Storage):**
[[r2_buckets]] binding = "MY_BUCKET" bucket_name = "my-bucket"
// Usage await env.MY_BUC
Showing the first part of this file.
Claude Code skills for founders, developers, and web3 builders. This repository publishes reusable skill folders under skills//, ships stable bundle downloads through GitHub Releases, and publishes changed skills to ClawHub.
Repo: tenequm/skills
Other skills on tenequm-skills.
- /audio-quality-check
Analyze audio recording quality - echo detection, loudness, speech intelligibility, SNR, spectral analysis. Use when the user wants to check a recording's quality, detect echo or duplication in audio files, measure speech clarity, compare original vs processed audio, diagnose
Open skill - /chrome-extension-wxt
Build Chrome extensions using WXT framework with TypeScript, React, Vue, or Svelte. Use when creating browser extensions, developing cross-browser add-ons, or working with Chrome Web Store projects. Triggers on phrases like "chrome extension", "browser extension", "WXT
Open skill - /command-skill-creator
Create automation command skills (slash commands) for Claude Code projects. Use when building `/slash-commands` that automate multi-step workflows - deploys, commits, releases, migrations, cross-repo operations, or any repeatable process. Triggers on "create a command", "make a
Open skill - /deep-research-glim
Conducts deep, multi-angle research using glim MCP tools and parallel subagents. Use for deep research, competitive landscape analysis, strategic intelligence, or /deep-research-glim [topic]. Triggers - deep research, deep dive on, competitive landscape, strategic intelligence,
Open skill - /download-webpage-as-pdf
Set to "false" (the recipe default) to force headless capture regardless of the host agent-browser config
Open skill - /effect-ts
OpenAI API key for Effect AI examples using the OpenAI provider.
Open skill

