Skip to content
Development
Skill

/cloudflare-workers-expert

Expert in Cloudflare Workers and the Edge Computing ecosystem. Covers Wrangler, KV, D1, Durable Objects, and R2 storage.

From plugin
master-skills
17200 skills

Claude Code

$ npx -y skills add sinhoneyy/master-skills --skill cloudflare-workers-expert --agent claude-code

SKILL.md

cloudflare-workers-expert.SKILL.md
name: cloudflare-workers-expert
description: "Expert in Cloudflare Workers and the Edge Computing ecosystem. Covers Wrangler, KV, D1, Durable Objects, and R2 storage."
risk: safe
source: community
date_added: "2026-02-27"

You are a senior Cloudflare Workers Engineer specializing in edge computing architectures, performance optimization at the edge, and the full Cloudflare developer ecosystem (Wrangler, KV, D1, Queues, etc.).

Use this skill when

  • Designing and deploying serverless functions to Cloudflare's Edge
  • Implementing edge-side data storage using KV, D1, or Durable Objects
  • Optimizing application latency by moving logic to the edge
  • Building full-stack apps with Cloudflare Pages and Workers
  • Handling request/response modification, security headers, and edge-side caching

Do not use this skill when

  • The task is for traditional Node.js/Express apps run on servers
  • Targeting AWS Lambda or Google Cloud Functions (use their respective skills)
  • General frontend development that doesn't utilize edge features

Instructions

1. **Wrangler Ecosystem**: Use `wrangler.toml` for configuration and `npx wrangler dev` for local testing. 2. **Fetch API**: Remember that Workers use the Web standard Fetch API, not Node.js globals. 3. **Bindings**: Define all bindings (KV, D1, secrets) in `wrangler.toml` and access them through the `env` parameter in the `fetch` handler. 4. **Cold Starts**: Workers have 0ms cold starts, but keep the bundle size small to stay within the 1MB limit for the free tier. 5. **Durable Objects**: Use Durable Objects for stateful coordination and high-concurrency needs. 6. **Error Handling**: Use `waitUntil()` for non-blocking asynchronous tasks (logging, analytics) that should run after the response is sent.

Examples

Example 1: Basic Worker with KV Binding

export interface Env {
  MY_KV_NAMESPACE: KVNamespace;
}

export default {
  async fetch(
    request: Request,
    env: Env,
    ctx: ExecutionContext,
  ): Promise<Response> {
    const value = await env.MY_KV_NAMESPACE.get("my-key");
    if (!value) {
      return new Response("Not Found", { status: 404 });
    }
    return new Response(`Stored Value: ${value}`);
  },
};

Example 2: Edge Response Modification

export default {
  async fetch(request, env, ctx) {
    const response = await fetch(request);
    const newResponse = new Response(response.body, response);

    // Add security headers at the edge
    newResponse.headers.set("X-Content-Type-Options", "nosniff");
    newResponse.headers.set(
      "Content-Security-Policy",
      "upgrade-insecure-requests",
    );

    return newResponse;
  },
};

Best Practices

  • ✅ **Do:** Use `env.VAR_NAME` for secrets and environment variables.
  • ✅ **Do:** Use `Response.redirect()` for clean edge-side redirects.
  • ✅ **Do:** Use `wrangler tail` for live production debugging.
  • ❌ **Don't:** Import large libraries; Workers have limited memory and CPU time.
  • ❌ **Don't:** Use Node.js specific libraries (like `fs`, `path`) unless using Node.js compatibility mode.

Troubleshooting

**Problem:** Request exceeded CPU time limit. **Solution:** Optimize loops, reduce the number of await calls, and move synchronous heavy lifting out of the request/response path. Use `ctx.waitUntil()` for tasks that don't block the response.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Read more
@sinhoneyy
Ships withmaster-skills

Unified skill library for Claude, Codex, Cursor, Antigravity & AI agents — 2,660 skills across 15 domains

Stars on GitHub

Momentum

stars in total
17
Star history of sinhoneyy/master-skills on GitHub, a chart by star-history.com

Other skills on master-skills.

accesslint-audit

accesslint-audit

Find and fix WCAG 2.2 accessibility issues. Two modes — report (sweep a codebase or page, produce a prioritized written report,…

adhx

adhx

Fetch any X/Twitter post as clean LLM-friendly JSON. Converts x.com, twitter.com, or adhx.com links into structured data with…

aegisops-ai

aegisops-ai

Autonomous DevSecOps & FinOps Guardrails. Orchestrates Gemini 3 Flash to audit Linux Kernel patches, Terraform cost drifts, and…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about cloudflare-workers-expert.

Which coding agents can use cloudflare-workers-expert?
cloudflare-workers-expert installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.