All skills
theprimeagen avatar

/cloudflare-assets

@f36e8eb
by theprimeagentheprimeagen/skills233 stars
6

Cloudflare Assets binding usage rules

  • 1 file
  • 839 B
  • Updated 7 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/theprimeagen/skills/cloudflare-assets

This session only. Nothing lands on disk.

SKILL.md

≈14 tokens always: the name and description. ≈185 when used: this file.

Cloudflare Assets

Rules

  1. Configure static assets in wrangler.jsonc with an assets block that sets both binding and directory.
  2. Serve static files from the Worker by returning env.ASSETS.fetch(request) inside fetch.
  3. Keep the binding name consistent across config and code (for example ASSETS in both places).

Example 1: wrangler.jsonc

{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "my-worker",
  "main": "src/index.ts",
  "compatibility_date": "2026-02-24",
  "assets": {
    "binding": "ASSETS",
    "directory": "./public"
  }
}

Example 2: Minimal Worker

export default {
  async fetch(request, env, ctx) {
    return env.ASSETS.fetch(request);
  },
};

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at f36e8eb. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 7 months ago
globs
src/**/*.ts
alwaysApply
false

README badge

README badge for theprimeagen/skills/cloudflare-assets