Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Compatibility flags

How to enable or disable specific runtime features and manage Node.js compatibility versions in Cloudflare Workers using Wrangler, the Dashboard, or the API.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Compatibility flags

How to enable or disable specific runtime features and manage Node.js compatibility versions in Cloudflare Workers using Wrangler, the Dashboard, or the API.

When To Use

Use when you need to opt into upcoming runtime features, hold back breaking changes, or configure specific Node.js polyfill versions for a Workers project.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-configuration-compatibility-flags-workflow-guide.mdDocumentation explaining how to configure and manage Workers compatibility flags via Wrangler, the Cloudflare Dashboard, and the Cloudflare API.Questions about documentation explaining how to configure and manage Workers compatibility flags via Wrangler, the Cloudflare Dashboa...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili.textA wrangler.toml configuration snippet demonstrating how to set compatibility_date and compatibility_flags for a Cloudflare Worker.Exact payloads, commands, or snippets shown in A wrangler.toml configuration snippet demonstrating how to set compatibilitydate and compatibilityflags for a Cloudfl...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-2.textA configuration snippet demonstrating how to set the compatibility_date and compatibility_flags in a wrangler.toml file.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to set the compatibilitydate and compatibilityflags in a wrangler.toml file.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-3.textA configuration snippet demonstrating the use of compatibility_flags and compatibility_date properties within a Workers configuration file.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating the use of compatibilityflags and compatibilitydate properties within a Workers...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-4.textA configuration snippet demonstrating the use of compatibility_flags and compatibility_date settings for Cloudflare Workers.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating the use of compatibilityflags and compatibilitydate settings for Cloudflare Wor...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-5.textA configuration snippet demonstrating how to define compatibility flags within a wrangler configuration file.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define compatibility flags within a wrangler configuration file.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-6.textA text configuration example demonstrating how to define compatibility flags within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to define compatibility flags within a Cloudflare Workers environment.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-7.textA configuration snippet demonstrating how to define compatibility flags within a wrangler configuration file.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define compatibility flags within a wrangler configuration file.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-8.textA text configuration example demonstrating how to define compatibility flags within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to define compatibility flags within a Cloudflare Workers environment.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-9.textA text example demonstrating how the compatibility flag changes the error message behavior when throwing a NonRetryableError within a Cloudflare Workflow.Exact payloads, commands, or snippets shown in A text example demonstrating how the compatibility flag changes the error message behavior when throwing a NonRetryab...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-10.textA JavaScript code snippet demonstrating how to use compatibility flags to opt back into ArrayBuffer delivery for WebSocket messages in Cloudflare Workers.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to use compatibility flags to opt back into ArrayBuffer delivery for WebS...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-11.textA JavaScript code snippet demonstrating the usage of the WebSocketPair object within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating the usage of the WebSocketPair object within a Cloudflare Workers environment.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-12.textA code example demonstrating how to use the allowHalfOpen compatibility flag for WebSocket proxying in Cloudflare Workers.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the allowHalfOpen compatibility flag for WebSocket proxying in Cloudflare Wor...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-13.textA text example demonstrating how to use compatibility flags to manage WebSocket handshake behavior in Cloudflare Workers.Exact payloads, commands, or snippets shown in A text example demonstrating how to use compatibility flags to manage WebSocket handshake behavior in Cloudflare Work...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-14.textA sample wrangler.toml configuration demonstrating how to define compatibility flags for a Cloudflare Workers project.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration demonstrating how to define compatibility flags for a Cloudflare Workers project.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-15.textA sample wrangler.toml configuration demonstrating how to define compatibility flags for a Cloudflare Workers project.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration demonstrating how to define compatibility flags for a Cloudflare Workers project.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-16.textA text example demonstrating the syntax and usage of Workers compatibility flags.Exact payloads, commands, or snippets shown in A text example demonstrating the syntax and usage of Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-17.textA text example demonstrating the syntax and usage of Workers compatibility flags.Exact payloads, commands, or snippets shown in A text example demonstrating the syntax and usage of Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-18.textA text configuration example demonstrating how to implement Workers compatibility flags.Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to implement Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-19.textA JavaScript code example demonstrating the implementation of a Cloudflare Workers fetch and queue handler.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the implementation of a Cloudflare Workers fetch and queue handler.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-20.textA text example demonstrating the syntax and usage of Workers compatibility flags.Exact payloads, commands, or snippets shown in A text example demonstrating the syntax and usage of Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-21.textA text example demonstrating the syntax and usage of Workers compatibility flags.Exact payloads, commands, or snippets shown in A text example demonstrating the syntax and usage of Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-22.textA text example demonstrating the syntax and usage of Workers compatibility flags.Exact payloads, commands, or snippets shown in A text example demonstrating the syntax and usage of Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-23.textA JavaScript code example demonstrating the use of the BYOB mode in the ReadableStream default reader within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the use of the BYOB mode in the ReadableStream default reader within a Cloudf...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-24.textA JavaScript code snippet demonstrating the implementation of Workers compatibility flags within a fetch handler.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating the implementation of Workers compatibility flags within a fetch handler.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-25.textA text snippet demonstrating the usage of URLSearchParams within the context of Cloudflare Workers compatibility flags.Exact payloads, commands, or snippets shown in A text snippet demonstrating the usage of URLSearchParams within the context of Cloudflare Workers compatibility flags.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-26.textA text snippet demonstrating how to manipulate URL search parameters, which is relevant to configuring compatibility flags in Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating how to manipulate URL search parameters, which is relevant to configuring compatibility...
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-27.textA text example demonstrating the usage of Workers compatibility flags in a script context.Exact payloads, commands, or snippets shown in A text example demonstrating the usage of Workers compatibility flags in a script context.
examples/workers-configuration-compatibility-flags-cloudflare-workers-compatibili-28.textA JavaScript code example demonstrating how to consume and discard a readable stream using a single 4KiB buffer with BYOB mode.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to consume and discard a readable stream using a single 4KiB buffer with...

What This Skill Covers

  • Compatibility flags enable specific features. They can be useful if you want to help the Workers team test upcoming changes that are not yet enabled by defau...
  • Main sections: Setting compatibility flags, Via Wrangler, Via the Cloudflare Dashboard, Via the Cloudflare API, Node.js compatibility flag.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/configuration/compatibility-flags