cloudflare
Cloudflare
Overview
Cloudflare Workers is a serverless edge compute platform that runs JavaScript, TypeScript, and WebAssembly on Cloudflare's global network. Workers use the ES modules format with fetch, scheduled, and queue event handlers, and access platform services (KV, D1, R2, Durable Objects) through environment bindings.
When to use: Edge-first APIs, low-latency global apps, serverless functions, static site hosting with Pages, key-value caching, relational data at the edge, object storage without egress fees.
When NOT to use: Long-running compute exceeding CPU time limits, workloads requiring persistent TCP connections, applications needing full Node.js API compatibility, large monolithic applications better suited to containers.
Quick Reference
| Pattern | API / Config | Key Points |
|---|---|---|
| Fetch handler | export default { fetch(request, env, ctx) } |
Entry point for HTTP requests |
| Scheduled handler | export default { scheduled(controller, env, ctx) } |
Cron triggers via [triggers] in config |
| Environment variables | env.VAR_NAME |
Set in wrangler.toml or dashboard |
| KV read/write | env.KV.get(key) / env.KV.put(key, value) |
Eventually consistent, 25 MiB max value |
| D1 query | env.DB.prepare(sql).bind(...params).all() |
SQLite at the edge, prepared statements |
More from oakoss/agent-skills
playwright
|
200ui-ux-polish
Iterative UI/UX polishing workflow for web applications. Use when improving visual polish, refining desktop and mobile UX separately, running iterative enhancement cycles, applying design patterns like glassmorphism or bento grids, or auditing accessibility and WCAG compliance. Use for Stripe-level visual quality, responsive optimization, and design system alignment.
153find-skills
|
119knowledge-graph-builder
>
101tailwind
Tailwind CSS v4 patterns and design systems. Use when configuring Tailwind themes, building components, implementing dark mode, using container queries, migrating from v3, integrating shadcn/ui, or fixing build errors. Use for tailwind, css, styling, theme, design-tokens.
85pnpm-workspace
pnpm workspace monorepo management with filtering, catalogs, and shared configs. Use when setting up monorepos, managing workspace dependencies, filtering package commands, or sharing configuration across packages.
78