cloudflare

Builds and reviews Cloudflare Workers, Durable Objects, storage bindings, and Wrangler configurations.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill cloudflare-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/cloudflare
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill cloudflare-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Cloudflare's platform changes weekly and its limits, version gates, and consistency models are easy to get wrong from memory. This Skill grounds Workers development in verified quotas, current Wrangler behavior, and documented failure modes so agents stop shipping stale limits, cross-request leaks, and destructive Durable Object migrations. ## Core Features & Use Cases - Production code review: Catches module-scope state leaks, destructured ctx, floating promises, secrets in vars, and buffering against the 128 MB isolate limit, with findings ordered by blast radius. - Storage selection: Chooses between KV, R2, D1, Durable Objects, Queues, and Hyperdrive based on documented consistency guarantees, per-key write rates, and size ceilings. - Durable Object lifecycle: Guides safe class creation, three-deploy renames, transfers, and the declarative exports map (Wrangler 4.107+) that replaces legacy migrations. - Use Case: Migrating a Pages project to Workers static assets — the Skill walks through assets.directory, run_worker_first, not_found_handling, _headers/_redirects re-application, and per-environment binding redeclaration so auth checks and security headers survive the move. ## Quick Start Ask the agent to review your worker.ts and wrangler.toml for production-readiness before your next Cloudflare deploy.

Frequently Asked Questions about cloudflare

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

FAQPage Schema
How do I choose between KV, D1, R2, and Durable Objects on Cloudflare?

Choose by consistency requirement first: read-modify-write, counters, locks, and ordering require a Durable Object because KV and R2 allow only 1 write per second per key with no atomicity. Then eliminate on quota: KV values cap at 25 MiB, D1 at 10 GB, and R2 objects at 5 TiB.

How do I rename a Durable Object class without losing data?

Use the declarative exports map (Wrangler 4.107+) with a state of renamed and renamed_to pointing at the new class. Deploy in three steps: alias the old name to the new class, apply the rename while the alias is live, then remove the alias. Delete-plus-create destroys all stored data permanently.

Why does my Cloudflare Worker leak data between requests?

Isolates are reused across requests from different users, so any module-scope variable assigned inside a handler leaks one user's data to the next. Move all request-scoped state inside the fetch handler; this bug is invisible in single-user local development.

Does wrangler dev reproduce production consistency bugs?

No. Local KV under wrangler dev is read-after-write consistent and local D1 and Durable Objects are single-process, so eventual-consistency, contention, and quota failures cannot reproduce locally. Diagnose production-only failures from Workers Logs, invocation outcomes, and wrangler tail.

What are the CPU and memory limits for Cloudflare Workers?

Workers Free is fixed at 10 ms CPU; Workers Paid defaults to 30,000 ms and can be raised to 300,000 ms with limits.cpu_ms. Memory is 128 MB per isolate, not per request, so buffering large bodies with response.text() causes out-of-memory failures.

How do I migrate a Cloudflare Pages project to Workers static assets?

Replace pages_build_output_dir with assets.directory, add a compatibility_date, and set not_found_handling explicitly since Workers infers nothing from index.html. Set run_worker_first if middleware must run before assets, and re-apply _headers and _redirects inside the Worker for Worker-generated responses.