cloudflare-worker-base

Configure Cloudflare Workers projects with Hono routing and Static Assets.

961|99|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-worker-base
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-worker-base
Source: https://github.com/jezweb/claude-skills/tree/main/skills/cloudflare-worker-base
Command: npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-worker-base

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hono, @cloudflare/vite-plugin, vite, wrangler, and includes references (resource) components.

What problem does it solve?

This Skill eliminates the 8 most common Cloudflare Workers deployment errors that waste developer time and cause project delays.

Core Features & Use Cases

  • Error Prevention: Automatically prevents export syntax errors, routing conflicts, HMR crashes, and deployment failures.
  • Production Templates: Provides battle-tested configurations for Hono routing, Vite development, and Static Assets.
  • Use Case: Imagine you need to deploy a new API with frontend to Cloudflare's edge network. Use this Skill to get a fully configured Worker with proper ES Module exports, API route protection, and SPA fallback handling.

Quick Start

Use the cloudflare-worker-base skill to create a new Cloudflare Workers project with Hono routing and Static Assets support.

Frequently Asked Questions about cloudflare-worker-base

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

FAQPage Schema
How do I deploy a Cloudflare Worker with Hono routing and static assets?

Deploy a Cloudflare Worker by configuring Hono routes, Vite integration, and static assets through wrangler.jsonc. This Skill provides a production-ready ES Module bootstrap that sets up proper exports, API route protection with run_worker_first, and SPA fallback handling to avoid common deployment errors.

What are the most common Cloudflare Workers deployment errors and how do I prevent them?

Common errors include export syntax failures, routing conflicts, HMR crashes, and 404s on static assets. This Skill prevents these by enforcing correct ES Module export patterns, Module Worker format compatibility, Vite plugin integration, and wrangler.jsonc asset configurations.

Can I use Vite with Cloudflare Workers?

Yes, Vite works with Cloudflare Workers through the @cloudflare/vite-plugin. This Skill configures Vite development and HMR compatibility while preventing crashes and ensuring static assets load correctly in production.

Do I need to configure wrangler.jsonc for static assets on Cloudflare Workers?

Yes, wrangler.jsonc configuration is required to serve static assets without export syntax errors or 404s. This Skill automates that setup alongside Hono routing and SPA fallback rules for single-page applications.

What's the best way to structure an API with frontend on Cloudflare Workers?

Structure your project with Hono for API routing, Vite for frontend bundling, and static asset serving configured in wrangler.jsonc. This Skill provides the complete configuration template including run_worker_first for API-first routing and SPA fallback handling.

Why does my Cloudflare Worker fail with ES Module export errors?

ES Module export errors occur when the Worker doesn't export the app instance correctly or conflicts with static asset exports. This Skill enforces the correct `export default app` pattern and Module Worker format to resolve these conflicts.