cloudflare-bundler-apps

cloudflare-bundler-apps is a skill for Claude Code, Codex from cloudflare/vibesdk. It costs 105 tokens per session (5,763 once invoked), scanned A, original, MIT.

A build guide for Cloudflare Worker applications that need to run correctly in a Space preview and deployment pipeline.

In plain words
What is it for?
Use it when creating, changing, or deploying projects built with Cloudflare’s Worker Bundler, including projects with static files or server code.
Why use it?
It helps prevent blank pages, server errors, and failed builds caused by incorrect project layouts or Cloudflare configuration.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/cloudflare/vibesdk/app-file-structure
Any agent
npx skills add cloudflare/vibesdk --skill app-file-structure
Clone the repo
git clone --depth 1 https://github.com/cloudflare/vibesdk

Made for: Claude Code, Codex.

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 cloudflare-bundler-apps

README.md
[![agentmods](https://agentmods.dev/badge/skills/cloudflare/vibesdk/app-file-structure.svg)](https://agentmods.dev/skills/cloudflare/vibesdk/app-file-structure)
Your own site
<a href="https://agentmods.dev/skills/cloudflare/vibesdk/app-file-structure"><img src="https://agentmods.dev/badge/skills/cloudflare/vibesdk/app-file-structure.svg" alt="Measured on agentmods" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found 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 $0.00105 $0.05763
Opus 5 $0.00053 $0.02882
Sonnet 5 $0.00021 $0.01153
Haiku 4.5 $0.00011 $0.00576

Measured 4d ago against content hash 671c46dc33a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-bundler-apps scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

WebSocket upgrades — to your `App.fetch(request)`.
worker/agents/think/skills/app-file-structure/SKILL.md · 486 lines

How it starts

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

This skill teaches how to build apps that deploy cleanly through the space deploy pipeline. Every project committed to a space is built by @cloudflare/worker-bundler (createApp when there are static assets, createWorker when there are none) and served on a Dynamic Worker via WorkerLoader. Get the conventions right and the preview "just works". Get them wrong and you get a blank page, a 500, or a Build failed error.

How the pipeline works

When deploy_space(branch) is called, the space DO:

  1. Reads every file from the branch's working tree (skipping .git/).
  2. Parses wrangler.json / wrangler.jsonc / wrangler.toml for main, compatibility_date, compatibility_flags, and [assets].
  3. If [assets].directory is set, files under that directory become static assets served host-side by handleAssetRequest. Everything else is built into a Worker via createApp (with server: <main>).
  4. If no assets directory is configured, only createWorker({ entryPoint: <main> }) is run. The output is loaded as a Dynamic Worker; all requests go to the Worker.
  5. Previews are served at /space/:name/preview/:branch/*. Responses with content-type: text/html are run through HTMLRewriter, which prefixes root-relative src / href / action attributes with the preview base path. JS-side fetches and dynamic imports are NOT rewritten.

Practical consequences:

  • You can rely on root-relative src="/foo.js" and href="/style.css" in HTML. They will be rewritten to the preview path automatically.
  • You cannot rely on root-relative paths inside JS strings: fetch("/api/x"), new URL("/foo", location.origin), dynamic import("/lib.js"). These hit the wrong path under the preview prefix. Use relative paths (./api/x, import.meta.url) or read the base path from <base href> / a meta tag injected at build time.
  • The <base href> tag is also rewritten if present — using it lets all relative URLs resolve against the preview path.

Project layout

Read the full file on GitHub · 486 lines

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. 4d ago First seen · 486 lines · 105 tokens per session scan A 671c46dc33a7

Subscribe to this mod's changes

cloudflare-bundler-apps is a skill published in the GitHub repository cloudflare/vibesdk (5,346 stars, last pushed yesterday), licensed MIT. It adds 105 tokens to every session and 5,763 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.