skillfed

bun-cloudflare-workers

This skill enables developers to deploy and execute Bun applications directly on Cloudflare Workers, combining the speed of Bun's runtime with Cloudflare's global edge network. It provides production-grade tooling for serverless workloads, including support for modern frameworks and AI service integrations. Ideal for teams building high-performance, distributed applications that need minimal latency and automatic scaling.

bun-cloudflare-workers enables you to deploy Bun applications directly to Cloudflare Workers using Wrangler, Cloudflare's command-line tool. Start by creating a new project with `bunx create-cloudflare`, which scaffolds a Bun-compatible Workers project. Then use `wrangler deploy` to push your Bun application to Cloudflare's global edge network. The skill provides production-grade tooling for serverless workloads, ensuring your code runs with minimal latency across Cloudflare's distributed infrastructure.

AI-generated summary based on this skill's SKILL.md

196 29 MIT updated by secondsky

Install

secondsky/claude-skills/bun-cloudflare-workers · repository language: TypeScript

CLI (skillfed)coming soon
git clone https://github.com/secondsky/claude-skills
cp -r claude-skills/plugins/bun/skills/bun-cloudflare-workers ~/.claude/skills/bun-cloudflare-workers

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I deploy Bun to Cloudflare Workers?

bun-cloudflare-workers enables you to deploy Bun applications directly to Cloudflare Workers using Wrangler, Cloudflare's command-line tool. Start by creating a new project with `bunx create-cloudflare`, which scaffolds a Bun-compatible Workers project. Then use `wrangler deploy` to push your Bun application to Cloudflare's global edge network. The skill provides production-grade tooling for serverless workloads, ensuring your code runs with minimal latency across Cloudflare's distributed infrastructure.

What is the bun-cloudflare-workers setup process for local development?

bun-cloudflare-workers supports setting up a local development environment by installing Bun and Wrangler, then initializing a project with `bunx create-cloudflare`. Use `wrangler dev` to run a local server that mimics the Cloudflare Workers runtime, allowing you to test your application before deployment. This local setup lets you develop and debug TypeScript or JavaScript code with Bun's fast execution, then seamlessly transition to edge deployment when ready.

How can I integrate Cloudflare bindings like KV, D1, R2, and Durable Objects with Bun workers?

bun-cloudflare-workers provides full support for integrating Cloudflare bindings into your Bun applications. Configure bindings in your `wrangler.toml` file to connect to KV storage, D1 databases, R2 object storage, and Durable Objects. Your Bun worker code accesses these resources through the bindings passed in the request context, enabling you to build feature-rich serverless applications with persistent storage, databases, and stateful compute on the edge.

Can I use TypeScript with bun-cloudflare-workers?

Yes, bun-cloudflare-workers fully supports TypeScript development. Bun has native TypeScript support, so you can write your Cloudflare Workers in TypeScript without additional compilation steps. The skill works seamlessly with modern frameworks and allows you to leverage TypeScript's type safety while building high-performance, distributed applications. Simply write your worker code in `.ts` files and deploy with Wrangler.

What testing tools does bun-cloudflare-workers support for edge deployment?

bun-cloudflare-workers integrates with Miniflare for local testing and build optimization. Miniflare simulates the Cloudflare Workers runtime environment locally, allowing you to test your Bun applications thoroughly before production deployment. Combined with Bun's built-in testing capabilities and Wrangler's development server, you can validate your serverless workloads, optimize performance, and ensure automatic scaling works as expected on Cloudflare's edge network.

How do I use Bun on Cloudflare Workers with modern frameworks?

bun-cloudflare-workers works with popular frameworks like Hono, enabling you to build structured, maintainable edge applications. Install your chosen framework via Bun's package manager, configure it in your Wrangler project, and deploy to Cloudflare Workers. The skill combines Bun's runtime speed with framework abstractions, providing production-grade tooling for building high-performance, distributed applications that need minimal latency and automatic scaling across Cloudflare's global infrastructure.

SKILL.md

rendered from the published skill — quoted content, verbatim

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

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
plugins/bun/skills/bun-cloudflare-workers/SKILL.md

Related skills

Tags

edge-computing serverless-deployment runtime-environment infrastructure-as-code supply-chain-security key-value-store relational-database object-storage stateful-computing