cloudflare-worker-base

Set up a Cloudflare Workers project with Hono routing, Vite, and static assets.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-worker-base-jackspace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cloudflare-worker-base
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/cloudflare-worker-base
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-worker-base-jackspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a production-ready Cloudflare Workers base stack with Hono routing, Vite development tooling, and static assets support, designed to accelerate modern edge apps and prevent common deployment pitfalls.

Core Features & Use Cases

  • Hono + ES Module pattern: Clean, future-proof Worker routing and exports.
  • Vite plugin for development: Fast HMR and local testing with Miniflare.
  • Static assets integration: Serve frontend assets from the Worker.
  • Wrangler.jsonc templates: Simple, predictable deployment config.
  • Production-tested baseline: Validated design used in real projects.

Quick Start

Create a new project with: npm create cloudflare@latest my-worker --
--type hello-world
--ts
--git
--deploy false
--framework none Then install dependencies, configure Wrangler, and start the dev server.

Frequently Asked Questions about cloudflare-worker-base

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

FAQPage Schema
How do I set up a production-ready Cloudflare Worker with Hono routing?▼

Set up a production-ready Cloudflare Worker by scaffolding with `npm create cloudflare`, installing dependencies, configuring wrangler.jsonc with ES Module exports (export default app), and enabling Vite plugin for local development. This prevents export syntax errors and routing conflicts in production deployments.

Can I serve static assets from a Cloudflare Worker?▼

Yes, static assets integrate with Cloudflare Workers through Vite and wrangler.jsonc configuration. Configure the assets directory and `run_worker_first` setting in wrangler.jsonc to serve frontend files alongside your Worker routing logic.

What's the best way to handle SPA fallback routing in Cloudflare Workers?▼

Implement SPA fallback handling in your Hono routing to gracefully serve index.html for client-side navigation requests. Proper SPA fallback configuration prevents routing conflicts between API endpoints and static asset requests.

Why does my Cloudflare Worker deployment fail with export syntax errors?▼

Cloudflare Workers requires ES Module export patterns—specifically `export default app`—rather than CommonJS. This Skill's scaffolded structure enforces correct export syntax and prevents six documented deployment failures including upload races and legacy Service Worker format issues.

Do I need Vite for local development with Wrangler and Miniflare?▼

The Vite plugin enables fast HMR and local testing with Miniflare, improving development iteration speed. While optional, it's included in this production-ready baseline to prevent scheduled task failures and HMR-related issues during development.

How do I configure wrangler.jsonc for reliable Cloudflare Worker deployments?▼

Use a wrangler.jsonc template with explicit assets configuration and `run_worker_first` flag to ensure static assets load correctly and Worker logic executes predictably. This configuration prevents common deployment pitfalls documented in this Skill.