Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Configuration and Bindings

Explains how to configure Cloudflare Workers static assets by defining a directory, using an assets binding for dynamic fetching, managing excluded files via .assetsignore, and controlling request routing with the run...

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Configuration and Bindings

Explains how to configure Cloudflare Workers static assets by defining a directory, using an assets binding for dynamic fetching, managing excluded files via .assetsignore, and controlling request routing with the run...

When To Use

Use when you need to configure a Worker to serve static assets, exclude specific files from deployment, or control whether a Worker script or a static asset handles an incoming request.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-static-assets-binding-configuration-and-bindings-workflow-guide.mdDocumentation regarding the configuration of directory paths and assets bindings within a Wrangler file for Cloudflare Workers.Questions about documentation regarding the configuration of directory paths and assets bindings within a Wrangler file for Cloudflar...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work.textA wrangler.toml configuration file demonstrating how to define the static assets binding directory and compatibility date for a Cloudflare Worker.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to define the static assets binding directory and compatibility...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-2.textA wrangler.toml configuration file demonstrating the static assets binding setup including directory and compatibility date settings.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating the static assets binding setup including directory and compatibilit...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-3.textA worker.js script demonstrating how to implement header redirects using the static assets binding in Cloudflare Workers.Exact payloads, commands, or snippets shown in A worker.js script demonstrating how to implement header redirects using the static assets binding in Cloudflare Work...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-4.textA wrangler.toml configuration file demonstrating how to define the static assets binding and directory for a Cloudflare Worker.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to define the static assets binding and directory for a Cloudfla...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-5.textA wrangler.toml configuration file demonstrating the setup for the static assets binding in a Cloudflare Worker.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating the setup for the static assets binding in a Cloudflare Worker.
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-6.textA wrangler.toml configuration file demonstrating how to bind static assets to a Cloudflare Worker with single-page application handling.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to bind static assets to a Cloudflare Worker with single-page ap...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-7.textA toml configuration file demonstrating the setup for static assets binding and single-page application error handling in a Cloudflare Worker.Exact payloads, commands, or snippets shown in A toml configuration file demonstrating the setup for static assets binding and single-page application error handlin...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-8.textA wrangler.toml configuration file demonstrating how to define the static assets binding for a Cloudflare Worker.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to define the static assets binding for a Cloudflare Worker.
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-9.textA wrangler.toml configuration file demonstrating the setup for a Cloudflare Workers static assets binding.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating the setup for a Cloudflare Workers static assets binding.
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-10.textA JavaScript code example demonstrating how to use the ASSETS binding within a Cloudflare Workers fetch handler to serve static assets.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the ASSETS binding within a Cloudflare Workers fetch handler to se...
examples/workers-static-assets-binding-configuration-and-bindings-cloudflare-work-11.textA TypeScript interface definition demonstrating how to declare the ASSETS Fetcher binding within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A TypeScript interface definition demonstrating how to declare the ASSETS Fetcher binding within a Cloudflare Workers...

What This Skill Covers

  • Configuring a Worker with assets requires specifying a directory and, optionally, an assets binding, in your Worker's Wrangler file. The assets binding allow...
  • Main sections: Tags, directory, Ignoring assets, runworkerfirst, binding.

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/static-assets/binding