Gateway workers vs Workers best practices
Gateway workers is an open-source agent skill for cloud and infrastructure. Workers best practices is an open-source agent skill for developer tools.
- Gateway workers is best for write a gateway forward worker that adds a header to permitted http requests.
- Workers best practices is best for review a worker's code for memory, secret handling and async errors.
- What it is
- Gateway workers is an open-source agent skill for cloud and infrastructure.Workers best practices is an open-source agent skill for developer tools.
- Best for
- Write a Gateway Forward Worker that adds a header to permitted HTTP requestsReview a Worker's code for memory, secret handling and async errors
- Kind
- SkillSkill
- Pricing
- Open sourceOpen source
- Platforms
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, GooseClaude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- GitHub stars
- 3.4K3.4K
- Last commit
- Nov 2026Nov 2026
- License
- Apache-2.0Apache-2.0
- Open source
- Good for
- Write a Gateway Forward Worker that adds a header to permitted HTTP requests; Debug why a Worker invoked by a Gateway policy is not being called; Return a synthetic response from a Worker for blocked or redirected trafficReview a Worker's code for memory, secret handling and async errors; Set up a new Worker's Wrangler config with logs and traces enabled; Check that Env types match the bindings declared in Wrangler
What Gateway workers does
Gateway middleware contract
Explains the named GatewayMiddleware entrypoint and the handle(request, context, next) method that Gateway calls over RPC.
Continuation rules
Covers when to call next(), when to return a synthetic response, and when to use fetch() for a different destination.
Identity and posture handling
Guides safe use of Gateway identity and device posture lookups, including anonymous users and failed lookups.
Forward behavior limits
Summarizes inspection order, WebSocket bypass, Workers VPC drops and fail-closed invocation failures.
Response and streaming checks
Lists valid final status codes, body rules for HEAD and no-body statuses, and streaming versus buffering.
Gateway-scoped testing
Describes type-checking and testing through a scoped Gateway Forward policy rather than direct requests.
What Workers best practices does
Current documentation lookup
Directs the agent to verify API, configuration and limit claims against Cloudflare docs before relying on memory.
Configuration and observability
Covers compatibility dates, bindings, generated types, secrets, logs and traces setup.
Runtime pattern guidance
Explains streaming, promise lifetime, request state and service call patterns for Workers.
Platform API checks
Reviews handler signatures, platform base classes, binding access and serialization boundaries.
Anti-pattern review table
Lists common Workers mistakes with their consequences and the preferred replacement pattern.
Gateway workers vs Workers best practices: questions
Is Gateway workers or Workers best practices cheaper?
Both are open source. Compare current plans on each official site.
What is the difference between Gateway workers and Workers best practices?
Gateway workers is an open-source agent skill for cloud and infrastructure. Workers best practices is an open-source agent skill for developer tools.
