gateway-workers

gateway-workers is a skill for Claude Code from fcakyon/claude-codex-settings. It costs 37 tokens per session (934 once invoked), scanned A, a copy of gateway-workers, Apache-2.0.

Guidance for building Cloudflare Workers that run when a Gateway HTTP policy forwards a permitted request. The Worker can modify the request, continue it to its original destination, or return a response itself.

In plain words
What is it for?
It is for implementing, debugging, or reviewing Gateway Middleware that transforms requests, returns synthetic responses, or continues permitted traffic.
Why use it?
It prevents using the wrong Worker entry point or confusing Gateway request context with the Worker runtime context.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cloudflare-skills plugin — 19 skills shipped together

Good fit It is for implementing, debugging, or reviewing Gateway Middleware that transforms requests, returns synthetic responses, or continues permitted traffic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcakyon/claude-codex-settings/gateway-workers
About the project

claude-codex-settings is a collection of configurations and reusable extensions for Claude Code, OpenAI Codex, Cursor, and related coding tools. Developers use its skills, commands, hooks, agents, plugins, and MCP servers to shape coding-agent workflows and connect alternative model APIs. The catalogue entries are components of this collection that can be installed into supported coding tools.

fcakyon/claude-codex-settings · 1,223 stars · on GitHub · claudesettings.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fcakyon/claude-codex-settings --skill gateway-workers
Clone the repo
git clone --depth 1 https://github.com/fcakyon/claude-codex-settings

Made for: Claude Code.

Or install cloudflare-skills, the plugin that ships this one along with the rest of its 19 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gateway-workers

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcakyon/claude-codex-settings/gateway-workers/github.svg)](https://agentmods.dev/skills/fcakyon/claude-codex-settings/gateway-workers)
Your own site
<a href="https://agentmods.dev/skills/fcakyon/claude-codex-settings/gateway-workers"><img src="https://agentmods.dev/badge/skills/fcakyon/claude-codex-settings/gateway-workers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gateway-workers

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcakyon/claude-codex-settings/gateway-workers"><img src="https://agentmods.dev/badge/skills/fcakyon/claude-codex-settings/gateway-workers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 934 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00934
Opus 5.5 $0.00015 $0.00374
Sonnet 5.5 $0.00007 $0.00187
Haiku 4.5 $0.00004 $0.00093

Measured 1mo ago against content hash 9c598c8b9bb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gateway-workers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to gateway-workers — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/cloudflare-skills/skills/gateway-workers/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gateway Workers

Read the current Forward guide before implementing a Worker. It defines how Gateway invokes Workers on permitted HTTP traffic. Retrieve the relevant page below rather than copying setup, API payloads, or limits into the project from memory.

Workflow

  1. Inspect the existing Worker and choose a Worker template for the required transformation, synthetic response, or background task.
  2. Export a named GatewayMiddleware class extending WorkerEntrypoint from cloudflare:workers. Implement handle(request, context, next) and return a Response. Gateway calls this method through RPC. A default fetch() handler alone does not implement the Forward contract.
  3. For TypeScript, follow the chosen template's current package installation and type-import instructions.
  4. Use the second argument for Gateway context. It describes the original request and stays unchanged when the Worker modifies the request. Keep it distinct from this.ctx (Workers execution context) and this.env (bindings).
  5. Continue the user's request with next(request) at most once, or return a synthetic response without calling it. next() always targets the original destination. Changes to the destination URL or host are ignored, and it cannot redirect, retry, or fan out. Use fetch() to send a request to a different destination. It creates an independent subrequest that does not inherit the user's Gateway policies or egress configuration.

Context

Use the published types and context reference for field names and availability. Treat a falsy identity (!identity) as anonymous and guard optional posture values. Call await context.identity() or await context.devicePosture() only when needed. Both getters can reject. Catch lookup failures separately from missing values and decide how to handle each when the Worker depends on them. Use Gateway-provided identity rather than client-supplied identity headers.

Read the full file on GitHub · 44 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +4 lines 9c598c8b9bb0
  2. 1mo ago First seen · 40 lines · 37 tokens per session scan A 91dbd8480c28

Subscribe to this mod's changes

gateway-workers is a skill published in the GitHub repository fcakyon/claude-codex-settings (1,223 stars, last pushed today), licensed Apache-2.0. It adds 37 tokens to every session and 934 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 97% identical to gateway-workers, differing in 1 line, and is treated as a copy.

Related

gateway-workers compared with skills from other repositories

gateway-workers next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gateway-workersfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A37Claude Code
azure-appconfiguration-javarootcastleco/rei-skillsSkill11yesterdaynoneA56Claude Code, Codex
azure-identity-javarootcastleco/rei-skillsSkill11yesterdaynoneA37Claude Code, Codex
azure-appconfiguration-tsrootcastleco/rei-skillsSkill11yesterdaynoneA40Claude Code, Codex
azure-eventgrid-javarootcastleco/rei-skillsSkill11yesterdaynoneA35Claude Code, Codex
azure-eventhub-dotnetrootcastleco/rei-skillsSkill11yesterdaynoneA94Claude Code, Codex
azure-eventhub-javarootcastleco/rei-skillsSkill11yesterdaynoneA37Claude Code, Codex