secondsky avatar

Bun Cloudflare Workers

This walks you through building and deploying Cloudflare Workers using Bun as your runtime and development tool. You get the full stack: routing with Hono, KV and D1 database bindings, Durable Objects for stateful coordination, R2 for object storage, and scheduled cron jobs. The guide opens with solid security practices around scaffolding tools, which is refreshing to see upfront. Testing examples use both Bun's native test runner and Miniflare for local simulation. If you're already using Bun and want to deploy edge functions without switching contexts, this covers the wrangler workflow and all the Cloudflare primitives you'll actually reach for in production.

skills.sh installs
338
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill bun-cloudflare-workers --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Backend & APIs, Cloud & Infrastructure
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1topviewai avatartopview-skilltopviewai/skillOfficial Topview AI client. Generate videos, images, avatars, and TTS audio via the Topview API. All network calls go to *.topview.ai only.334skills.sh installs
2geeksfino avatarfindata-toolkit-cngeeksfino/finskillsA股金融数据工具包。提供脚本获取A股实时行情、财务指标、董监高增减持、北向资金、宏观经济数据(LPR、CPI/PPI、PMI、社融、M2)。用于需要实时A股市场数据支撑投资分析时。所有数据源免费,无需API密钥。333skills.sh installs
3bobmatnyc avatarvalidated-handlerbobmatnyc/claude-mpm-skillsType-safe API route handler with automatic Zod validation for Next.js App Router...332skills.sh installs
4jezweb avatarcloudflare-durable-objectsjezweb/claude-skillsBuild stateful Durable Objects for real-time apps, WebSocket servers, coordination, and persistent state. Prevents 20 documented errors. Use when: implementing 332skills.sh installs
5patricio0312rev avatarrate-limiting-abuse-protectionpatricio0312rev/skillsImplements rate limiting and abuse prevention with per-route policies, IP/user-based limits, sliding windows, safe error responses, and observability. Use when 329skills.sh installs
6secondsky avatarbun-tanstack-startsecondsky/claude-skillsTanStack Start full-stack React framework with Bun runtime. Use for TanStack Router, server functions, vinxi, or encountering SSR, build, preset errors.329skills.sh installs