cloudflare-to-bun

Map Cloudflare Workers runtime APIs to Bun equivalents for migration.

4|1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/DaleSeo/bun-skills --skill cloudflare-to-bun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-to-bun
Source: https://github.com/DaleSeo/bun-skills/tree/main/skills/cloudflare-to-bun
Command: npx skills add https://github.com/DaleSeo/bun-skills --skill cloudflare-to-bun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cloudflare Workers often require code and deployment changes to run on Bun, including API mappings and bindings replacements. This Skill provides structured guidance for converting edge functions to Bun-compatible server code and updating bindings, enabling a smoother migration.

Core Features & Use Cases

  • API Mapping: Translate Cloudflare Worker runtime APIs to Bun equivalents to preserve functionality.
  • Bindings Migration: Replace KV, R2, D1, and Durable Objects with standard storage/backends.
  • Deployment Guidance: Plan edge-to-server deployment and modernization strategies for Bun servers.
  • Use Case: Migrate a module worker that uses fetch, KV, and durable objects to a Bun server with equivalent patterns.

Quick Start

Start by reviewing references and migrating a simple module worker to Bun, focusing on fetch API, KV -> Redis mapping, and replacing Durable Objects with Redis-backed state.

Frequently Asked Questions about cloudflare-to-bun

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Cloudflare Workers to Bun?

Migrating Cloudflare Workers to Bun involves mapping runtime APIs to Bun equivalents, replacing storage bindings like KV and D1 with standard backends such as Redis, and adapting deployment architecture for Bun servers.

What is the best way to replace Cloudflare KV and Durable Objects when moving to Bun?

Replacing Cloudflare KV and Durable Objects when moving to Bun involves mapping these bindings to standard storage backends like Redis, translating edge state patterns into Redis-backed equivalents for the Bun server.

Can I use my existing module worker fetch API code with Bun?

Yes, you can use existing module worker fetch API code with Bun by mapping Cloudflare Worker runtime APIs to Bun equivalents, preserving functionality while converting edge functions to Bun-compatible server code.

What are the steps to convert edge functions to Bun server code?

Converting edge functions to Bun server code requires mapping runtime APIs, migrating storage bindings to standard backends, and planning edge-to-server deployment strategies to modernize your architecture for the Bun runtime.

Does Bun support Cloudflare Workers bindings like R2 and D1?

Bun does not natively support Cloudflare Workers bindings like R2 and D1, so you must migrate them to standard storage backends or equivalent patterns to preserve functionality during edge-to-server migration.