Cloudflare Free Tier Guard
Overview
Apply a free-tier-first design review before making Cloudflare changes.
Favor architectures that keep Workers thin, avoid unnecessary paid products, and make request, storage, and egress costs explicit.
Quick Start
- Read references/free-tier-checklist.md.
- If working in this repository's
server/ directory, read references/launcherg-server-stack.md.
- Identify which Cloudflare primitives are involved: Workers, D1, R2, KV, Assets, Queues, Durable Objects, Cron, or custom domains.
- State the expected hot path in one sentence: request source, Worker logic, storage access, response path.
- Prefer the cheapest primitive that satisfies the requirement, then explain why.
Workflow
1. Inventory the cost surface
- Count likely request paths.
- Separate metadata reads/writes from binary transfer.
- Note whether traffic is public, authenticated, bursty, or background.
- Call out which operations hit D1, R2, or Worker CPU.
2. Choose the lowest-cost architecture
- Prefer: static assets via Assets/Pages, metadata in D1, blobs in R2, direct upload/download where possible.
- Avoid adding Durable Objects, Queues, Cron, or extra Workers unless the requirement needs coordination, background execution, or fan-out.
- Keep auth stateless when possible. Signed cookies or signed tokens are cheaper than session tables.
- Keep the Worker off the binary data path unless authorization or transformation is required.
3. Apply free-tier techniques
- Deduplicate uploads before generating storage writes.
- Batch D1 writes and chunk large lookups.
- Return only required columns.
- Put TTLs on signed URLs and session cookies.
- Cache safe reads aggressively.
- Move heavy transforms to the client or build step.
- Avoid polling loops and worker-to-worker hops.
4. Explicitly review risk before coding
Before finalizing a design or patch, answer these questions:
- Does this increase request count on every user action?
- Does this push binary payloads through the Worker unnecessarily?
- Does this add a paid Cloudflare product without proving it is needed?
- Can the same behavior be achieved with Assets, D1, R2, cache headers, or client-side work?
- What is the likely free-tier bottleneck first: request count, CPU, D1 operations, R2 storage, or egress?
If the change is likely to exceed free-tier comfort, say so plainly and propose a cheaper alternative.
Output Requirements
When this skill is used, include a short cost note in the answer:
- Architecture choice
- Main free-tier pressure points
- Concrete mitigations applied
- Any remaining unknowns that need measurement
References
Source: ryoha000/launcherg — distributed by TomeVault.
1---2name: cloudflare-free-tier-guard3description: Cost-aware Cloudflare implementation and review guidance for Workers, D1, R2, KV, Pages, Wrangler, and edge-hosted APIs. Use when Codex designs, edits, reviews, debugs, or deploys Cloudflare-related code or config, especially `wrangler.toml`, Worker entrypoints, storage bindings, upload flows, caching, or infrastructure choices where staying inside free-tier or low-cost limits matters. Use when this capability is needed.4---56# Cloudflare Free Tier Guard78## Overview910Apply a free-tier-first design review before making Cloudflare changes.11Favor architectures that keep Workers thin, avoid unnecessary paid products, and make request, storage, and egress costs explicit.1213## Quick Start14151. Read [references/free-tier-checklist.md](./references/free-tier-checklist.md).162. If working in this repository's `server/` directory, read [references/launcherg-server-stack.md](./references/launcherg-server-stack.md).173. Identify which Cloudflare primitives are involved: Workers, D1, R2, KV, Assets, Queues, Durable Objects, Cron, or custom domains.184. State the expected hot path in one sentence: request source, Worker logic, storage access, response path.195. Prefer the cheapest primitive that satisfies the requirement, then explain why.2021## Workflow2223### 1. Inventory the cost surface2425- Count likely request paths.26- Separate metadata reads/writes from binary transfer.27- Note whether traffic is public, authenticated, bursty, or background.28- Call out which operations hit D1, R2, or Worker CPU.2930### 2. Choose the lowest-cost architecture3132- Prefer: static assets via Assets/Pages, metadata in D1, blobs in R2, direct upload/download where possible.33- Avoid adding Durable Objects, Queues, Cron, or extra Workers unless the requirement needs coordination, background execution, or fan-out.34- Keep auth stateless when possible. Signed cookies or signed tokens are cheaper than session tables.35- Keep the Worker off the binary data path unless authorization or transformation is required.3637### 3. Apply free-tier techniques3839- Deduplicate uploads before generating storage writes.40- Batch D1 writes and chunk large lookups.41- Return only required columns.42- Put TTLs on signed URLs and session cookies.43- Cache safe reads aggressively.44- Move heavy transforms to the client or build step.45- Avoid polling loops and worker-to-worker hops.4647### 4. Explicitly review risk before coding4849Before finalizing a design or patch, answer these questions:5051- Does this increase request count on every user action?52- Does this push binary payloads through the Worker unnecessarily?53- Does this add a paid Cloudflare product without proving it is needed?54- Can the same behavior be achieved with Assets, D1, R2, cache headers, or client-side work?55- What is the likely free-tier bottleneck first: request count, CPU, D1 operations, R2 storage, or egress?5657If the change is likely to exceed free-tier comfort, say so plainly and propose a cheaper alternative.5859## Output Requirements6061When this skill is used, include a short cost note in the answer:6263- Architecture choice64- Main free-tier pressure points65- Concrete mitigations applied66- Any remaining unknowns that need measurement6768## References6970- [references/free-tier-checklist.md](./references/free-tier-checklist.md)71- [references/launcherg-server-stack.md](./references/launcherg-server-stack.md)7273---74> Source: [ryoha000/launcherg](https://github.com/ryoha000/launcherg) — distributed by [TomeVault](https://tomevault.io).75<!-- tomevault:4.0:skill_md:2026-06-23 -->