bun-cloudflare-workers

bun-cloudflare-workers is a skill for Claude Code from secondsky/claude-skills. It costs 58 tokens per session (2,337 once invoked), scanned A, original, MIT.

A guide to developing and deploying Bun applications as Cloudflare Workers. Workers are small programs that run on Cloudflare's network instead of one traditional server.

In plain words
What is it for?
Use it to create Worker projects, run them locally with Wrangler, build browser-targeted code, and deploy it.
Why use it?
It removes uncertainty around setting up, testing, building, and deploying Bun code to Cloudflare's edge platform.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the bun plugin — 27 skills, 6 commands, 3 agents, 2 hooks shipped together

Good fit Use it to create Worker projects, run them locally with Wrangler, build browser-targeted code, and deploy it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/secondsky/claude-skills/bun-cloudflare-workers
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.

Any agent
npx skills add secondsky/claude-skills --skill bun-cloudflare-workers
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install bun, the plugin that ships this one along with the rest of its 27 skills, 6 commands, 3 agents, 2 hooks.

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 bun-cloudflare-workers

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-cloudflare-workers/github.svg)](https://agentmods.dev/skills/secondsky/claude-skills/bun-cloudflare-workers)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/bun-cloudflare-workers"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-cloudflare-workers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bun-cloudflare-workers

Your own site · 80×15
<a href="https://agentmods.dev/skills/secondsky/claude-skills/bun-cloudflare-workers"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-cloudflare-workers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,337 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 May 2026
  • Snyk pass 14 May 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Server-Side Request Forgery · line 307
    Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
    Fix: Avoid requests to loopback/link-local/private hosts from skill code. If internal access is intended, document it and validate the target against an allowlist.
How audits are shown
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.1 $0.00058 $0.02337
Opus 5 $0.00029 $0.01169
Sonnet 5 $0.00012 $0.00467
Haiku 4.5 $0.00006 $0.00234

Measured 5d ago against content hash db2ced612aeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

bun-cloudflare-workers scanned grade A with 2 findings 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 5d 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.

async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| TextEncoder | child_process |
plugins/bun/skills/bun-cloudflare-workers/SKILL.md · 411 lines

How it starts

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

Bun Cloudflare Workers

Build and deploy Cloudflare Workers using Bun for development.

Quick Start

# Create new Workers project
bunx create-cloudflare my-worker
cd my-worker

# Install dependencies
bun install

# Development
bun run dev

# Deploy
bun run deploy

Secure Installation

Scaffolding tools like bunx create-cloudflare download and execute remote code. Before running, follow supply chain security best practices:

  • Block post-install scripts — Bun disables them by default; allow specific packages via trustedDependencies in package.json
  • Cooldown period — Configure minimumReleaseAge in bunfig.toml to wait 7 days for new versions
  • Audit before installing — Run socket package score npm <pkg> or use socket npm install <pkg> to check packages

Load the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.

Project Setup

package.json

{
  "scripts": {
    "dev": "wrangler dev",
    "deploy": "wrangler deploy",
    "build": "bun build src/index.ts --outdir=dist --target=browser"
  },
  "devDependencies": {
    "@cloudflare/workers-types": "^4.20260408.0",
    "wrangler": "^4.81.0"
  }
}

wrangler.toml

name = "my-worker"
main = "src/index.ts"
compatibility_date = "2024-01-01"

# Use Bun for local dev
[dev]
local_protocol = "http"

# Bindings
[[kv_namespaces]]
binding = "KV"
id = "xxx"

[[d1_databases]]
binding = "DB"
database_name = "my-db"
database_id = "xxx"

Basic Worker

// src/index.ts
export default {
  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
    const url = new URL(request.url);

    if (url.pathname === "/") {
      return new Response("Hello from Cloudflare Workers!");
    }

    if (url.pathname === "/api/data") {
      return Response.json({ message: "Hello" });
    }

    return new Response("Not Found", { status: 404 });
  },
};

interface Env {
  KV: KVNamespace;
  DB: D1Database;
}

Read the full file on GitHub · 411 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. 5d ago First seen · 411 lines · 58 tokens per session scan A db2ced612aeb

Subscribe to this mod's changes

bun-cloudflare-workers is a skill published in the GitHub repository secondsky/claude-skills (216 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 2,337 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.