PlugWiki

gateway-workers skill (Cloudflare) for Claude Code: Workers for Gateway Forward

gateway-workers helps your agent build, debug and review Cloudflare Workers that Gateway HTTP policies call with the Forward action.

Installs
13.5K
on skills.sh
Stars
3.2K
on GitHub
Files
1
besides SKILL.md
Updated
Oct 2026
last repo commit

gateway-workers is a skill from Cloudflare's skills repo. It is for one narrow job: a Worker that Cloudflare Gateway invokes on permitted HTTP traffic. It tells the agent to read Cloudflare's current Forward guide first, then write a named GatewayMiddleware class that extends WorkerEntrypoint and has a handle(request, context, next) method.

It also covers Gateway context (identity and device posture), the rule that next() may be called at most once, and what Gateway does and does not inspect. It ends with validation steps. The skill bundles no scripts. Its docs links point to developers.cloudflare.com, which the agent reads at run time.

Good for

  • Cloudflare One admins writing Workers that modify or answer Gateway HTTP traffic
  • Workers developers who need the Gateway RPC contract right
  • Reviewers checking a Gateway Worker for fail-closed and context mistakes

Install gateway-workers

Claude Code

  1. 1

    Copy this prompt.

    Install the gateway-workers skill in Claude Code. Run this command:
    
    npx skills add https://github.com/cloudflare/skills --skill gateway-workers
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

The Cloudflare plugin installs all 19 skills in the repo and also registers Cloudflare's remote MCP server (https://mcp.cloudflare.com/mcp) from its .mcp.json.

From the vendor's docs. Source.

What's in the skill

When it loads

Build, debug, or review Cloudflare Workers invoked by the Forward action in Gateway HTTP policies, including the GatewayMiddleware entrypoint, Gateway types, context, and continuation.

Sections in SKILL.md

  1. Workflow
  2. Context
  3. Gateway behavior
  4. Validation
  5. Related skills
  6. Skill feedback

Key facts

Installs on skills.sh
13,499 as of 2026-11-02
License
Apache-2.0
Last repo commit
2026-10-31

What it includes

  • Looks at the existing Worker and picks a Worker template from Cloudflare's list.

    Read · 1. Inspect and pick a template

  • Named class extending WorkerEntrypoint, with handle(request, context, next).

    A default fetch() handler alone does not implement the Forward contract.

    Write · 2. Export GatewayMiddleware

  • Follows the chosen template's package and type-import instructions.

    3. TypeScript setup

  • Second argument holds identity and device posture; both lookups can reject.

    4. Gateway context

  • Calls next(request) at most once, or returns a synthetic response without it.

    next() always targets the original destination. Use fetch() for a different destination.

    5. Continue or answer

  • First matching Forward policy only; HTTPS needs decryption; WebSockets bypass the Worker.

    Gateway behavior notes

  • Type-check, test the RPC entrypoint, then test a request through a scoped Forward policy.

    Runs code · Validation

  • On a bad-guidance report, drafts a public GitHub issue for your approval.

    It must show you the exact title and body and get a yes before posting with gh issue create.

    Write · Skill feedback

From the official docs

Permissions

Medium risk

The skill bundles no scripts, but the code it helps you write runs in your Gateway traffic path. Test with a narrowly scoped Forward policy first.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Worker failures fail closed

    SKILL.md says Worker invocation failures fail closed, so a broken Worker can block traffic matching the Forward policy. Scope the policy narrowly while testing. github.com

  • The plugin route adds a remote MCP server

    The cloudflare plugin's .mcp.json registers the remote server https://mcp.cloudflare.com/mcp. The README describes it as access to the Cloudflare API and current developer documentation through the Code Mode MCP server. The plugin also installs all 19 skills in the repo. The skills CLI route installs only this skill. github.com

  • Skill feedback can post a public issue

    references/skill-feedback.md describes drafting a GitHub issue on cloudflare/skills. It requires your explicit yes after you see the exact title and body. Public issues can be read by anyone. github.com

Technical details
Talks todevelopers.cloudflare.com (docs the agent reads). github.com (only if you approve a skill-feedback issue)
Scopes
  • Your Worker project and Gateway policy (through tools you approve)

Questions

How do I install the gateway-workers skill?

Use the install box above. The skills CLI command installs only this skill. The Cloudflare plugin installs the whole repo, which is 19 skills, and registers Cloudflare's remote MCP server as well.

What is a Gateway Forward Worker?

A Cloudflare Worker that Gateway calls through RPC when an HTTP policy with the Forward action matches. Per SKILL.md it can modify the request, return a synthetic response or run background work, and it must export a GatewayMiddleware class.

Does it need a Cloudflare API key or the MCP server?

The skill does not ask for either. It points the agent to Cloudflare's docs pages and to other Cloudflare skills for project setup and deployment, such as wrangler. The plugin route adds the Cloudflare MCP server.

Why does the skill link to other Cloudflare skills?

Its Related skills section points to cloudflare-one for Gateway policy design, workers-best-practices for streaming and bindings, and the cf-cli or wrangler skills for setup and deployment. These are hand-offs, so you can use gateway-workers alone.

Can it post to GitHub on its own?

Only for skill feedback, and only after you approve. references/skill-feedback.md says to ask permission, show the exact title and body, and post a public issue on cloudflare/skills only after a yes. It warns not to include secrets or private data.

Is gateway-workers safe to install?

It bundles no scripts. Its guidance can lead the agent to write and test Workers that sit in your Gateway traffic path, and SKILL.md notes that Worker failures fail closed. Test with a scoped policy before wide rollout.

Information

updated Nov 2, 2026

Folder
skills/gateway-workers

cloudflare/skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 8
  1. cloudflare/skills README · github.com
  2. Claude Code skills · code.claude.com
  3. Using skills in Claude · support.claude.com
  4. gateway-workers SKILL.md · github.com
  5. gateway-workers on skills.sh · skills.sh
  6. gateway-workers skill-feedback.md · github.com
  7. cloudflare/skills .mcp.json · github.com
  8. plugin.json · github.com

Updated Nov 2, 2026.