cloudflare-to-bun

cloudflare-to-bun is a skill for Claude Code from DaleSeo/bun-skills. It costs 39 tokens per session (2,913 once invoked), scanned A, original, MIT.

A migration guide for moving Cloudflare Workers, edge-hosted JavaScript services, to Bun, a runtime commonly used on servers and local machines.

In plain words
What is it for?
Use it to review Worker types, replace KV, R2, D1, or Durable Objects bindings, adapt runtime APIs, and plan deployment on Bun.
Why use it?
It helps account for differences between Cloudflare's edge environment and server deployment, including platform-specific storage and state features.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to review Worker types, replace KV, R2, D1, or Durable Objects bindings, adapt runtime APIs, and plan deployment on Bun.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/daleseo/bun-skills/cloudflare-to-bun
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 DaleSeo/bun-skills --skill cloudflare-to-bun
Clone the repo
git clone --depth 1 https://github.com/DaleSeo/bun-skills

Made for: Claude Code.

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-to-bun

README.md
[![agentmods](https://agentmods.dev/badge/skills/daleseo/bun-skills/cloudflare-to-bun/github.svg)](https://agentmods.dev/skills/daleseo/bun-skills/cloudflare-to-bun)
Your own site
<a href="https://agentmods.dev/skills/daleseo/bun-skills/cloudflare-to-bun"><img src="https://agentmods.dev/badge/skills/daleseo/bun-skills/cloudflare-to-bun/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 cloudflare-to-bun

Your own site · 80×15
<a href="https://agentmods.dev/skills/daleseo/bun-skills/cloudflare-to-bun"><img src="https://agentmods.dev/badge/skills/daleseo/bun-skills/cloudflare-to-bun.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,913 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00039 $0.02913
Opus 5 $0.00019 $0.01456
Sonnet 5 $0.00008 $0.00583
Haiku 4.5 $0.00004 $0.00291

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

Security

Grade A, and why

cloudflare-to-bun 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 11d 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> {
skills/cloudflare-to-bun/SKILL.md · 506 lines

How it starts

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

Cloudflare Workers to Bun Migration

You are assisting with migrating Cloudflare Workers applications to Bun. This involves converting edge runtime APIs, replacing Cloudflare bindings, and adapting from edge to server deployment.

Quick Reference

For detailed patterns, see:

  • Runtime APIs: runtime-apis.md - Cloudflare to Bun API mapping
  • Bindings Migration: bindings.md - KV, R2, D1, Durable Objects replacements
  • Deployment: deployment.md - Edge to server deployment strategies

Migration Workflow

1. Pre-Migration Analysis

Check current setup:

# Check Cloudflare CLI
wrangler --version

# Check Bun installation
bun --version

# Analyze wrangler.toml
cat wrangler.toml

Review worker configuration:

# Check compatibility flags
grep compatibility_flags wrangler.toml

# Check bindings
grep -E "kv_namespaces|r2_buckets|d1_databases|durable_objects" wrangler.toml

2. Worker Types Analysis

Determine what type of Worker you're migrating:

  • Service Worker: Traditional addEventListener('fetch') format
  • Module Worker: Modern export default { fetch() } format
  • Scheduled Worker: Cron triggers
  • Durable Objects: Stateful objects
  • Pages Functions: Next.js-like file-based routing

3. Runtime API Conversion

Basic Fetch Handler

Cloudflare Worker (Module format):

export default {
  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
    return new Response('Hello World');
  },
};

Bun Server:

Bun.serve({
  port: 3000,
  fetch(request: Request): Response | Promise<Response> {
    return new Response('Hello World');
  },
});

console.log('Server running on http://localhost:3000');
Request/Response Handling

Cloudflare Worker:

export default {
  async fetch(request: Request): Promise<Response> {
    const url = new URL(request.url);

    if (url.pathname === '/api/data') {
      return Response.json({ data: 'value' });
    }

    return new Response('Not found', { status: 404 });
  },
};

Read the full file on GitHub · 506 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 506 lines · 39 tokens per session scan A ff5021ade4c6

Subscribe to this mod's changes

cloudflare-to-bun is a skill published in the GitHub repository DaleSeo/bun-skills (4 stars, last pushed 7mo ago), licensed MIT. It adds 39 tokens to every session and 2,913 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

hf-cloud-python-env-setup

Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3. Use this skill whenever Python code will be executed for a SageMaker deployment, training job, or any AWS automation — including when about to run pip install, when about to invoke boto3, when creating or…

huggingface/skills · 128 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

sickn33/agentic-awesome-skills · 26 tokens

azure-storage-blob-rust

Azure Blob Storage library for Rust. Upload, download, and manage blobs and containers. Triggers: "blob storage rust", "BlobClient rust", "upload blob rust", "download blob rust", "storage container rust", "BlobServiceClient rust".

microsoft/skills · 57 tokens

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…

synthetic-sciences/openscience · 76 tokens

dnanexus-integration

DNAnexus cloud genomics platform. Build apps/applets, manage data (upload/download), dxpy Python SDK, run workflows, FASTQ/BAM/VCF, for genomics pipeline development and execution.

synthetic-sciences/openscience · 49 tokens

latchbio-integration

Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.

synthetic-sciences/openscience · 45 tokens