cloudflare-workers-frameworks

cloudflare-workers-frameworks is a skill for Claude Code, Codex from secondsky/claude-skills. It costs 52 tokens per session (1,487 once invoked), scanned A, original, MIT.

A guide to using web frameworks such as Hono, Remix, Next.js, Astro, SvelteKit, Qwik, and Nuxt on Cloudflare Workers, Cloudflare’s platform for running code at the network edge. It covers routes, server-rendered pages, and static files.

In plain words
What is it for?
Use it when building an API, full-stack application, or content site with one of these frameworks and deploying it to Cloudflare Workers.
Why use it?
It helps adapt each framework to Workers’ runtime and avoid common export, CPU-limit, and environment-configuration errors.

Skill for Claude CodeCodex

Part of the cloudflare-workers plugin — 10 skills, 5 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/secondsky/claude-skills/cloudflare-workers-frameworks
Any agent
npx skills add secondsky/claude-skills --skill cloudflare-workers-frameworks
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code, Codex.

Or install cloudflare-workers, the plugin that ships this one along with the rest of its 10 skills, 5 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-workers-frameworks

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-workers-frameworks.svg)](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-workers-frameworks)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-workers-frameworks"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-workers-frameworks.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,487 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.01487
Opus 5 $0.00026 $0.00744
Sonnet 5 $0.00010 $0.00297
Haiku 4.5 $0.00005 $0.00149

Measured yesterday against content hash dfbc808910d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-workers-frameworks scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 4 executable files (templates/hono-app.ts, templates/nextjs-route.ts, templates/nuxt-server.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

return c.env.ASSETS.fetch(c.req.raw);
plugins/cloudflare-workers/skills/cloudflare-workers-frameworks/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workers Frameworks Integration

Build full-stack applications on Cloudflare Workers using modern frameworks.

Quick Start: Choose Your Framework

Framework Best For SSR Static Workers Native
Hono APIs, lightweight apps ✅ Native
Remix Full-stack apps ✅ Adapter
Next.js React apps ⚠️ OpenNext
Astro Content sites ✅ Adapter
SvelteKit Svelte apps ✅ Adapter
Qwik Resumable apps ✅ Adapter
Nuxt Vue apps ✅ Nitro

Framework Decision Tree

Need an API only?
  └─ Yes → Hono (fastest, smallest)
  └─ No → Building a full app?
           └─ React → Next.js (OpenNext) or Remix
           └─ Vue → Nuxt
           └─ Svelte → SvelteKit
           └─ Content-heavy → Astro
           └─ Max performance → Qwik

Top 10 Framework Errors

Error Framework Cause Solution
No matching export "default" All Wrong export format Use export default app not module.exports
Worker exceeded CPU limit Next.js Heavy SSR Use ISR, reduce bundle size
Cannot read properties of undefined (reading 'env') Remix Missing context Pass context to loader/action
globalThis is not defined All Node.js globals Use nodejs_compat flag
Dynamic require not supported All CJS in ESM Convert to ESM imports
Response body is locked All Body already read Clone response before reading
Bindings not available All Missing wrangler config Add bindings to wrangler.jsonc
404 on static assets All Wrong assets config Configure assets in wrangler.jsonc
Hydration mismatch React/Vue Server/client differ Ensure consistent rendering
Maximum call stack exceeded All Circular imports Refactor module structure
// src/index.ts
import { Hono } from 'hono';
import { cors } from 'hono/cors';
import { logger } from 'hono/logger';

interface Env {
  DB: D1Database;
  KV: KVNamespace;
}

const app = new Hono<{ Bindings: Env }>();

// Middleware
app.use('*', logger());
app.use('/api/*', cors());

// Routes
app.get('/', (c) => c.text('Hello Workers!'));

app.get('/api/users', async (c) => {
  const { results } = await c.env.DB.prepare('SELECT * FROM users').all();
  return c.json(results);
});

app.post('/api/users', async (c) => {
  const { name, email } = await c.req.json();
  await c.env.DB.prepare('INSERT INTO users (name, email) VALUES (?, ?)')
    .bind(name, email)
    .run();
  return c.json({ success: true }, 201);
});

export default app;

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 206 lines · 52 tokens per session scan A dfbc808910d1

Subscribe to this mod's changes

cloudflare-workers-frameworks is a skill published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 2d ago), licensed MIT. It adds 52 tokens to every session and 1,487 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.