mindrally avatar

Cloudflare Development

This is a comprehensive reference for building on Cloudflare's edge platform, covering Workers, Pages, KV, D1, R2, and Durable Objects with TypeScript examples throughout. You get concrete patterns for everything from basic Worker setup and wrangler.toml configuration to KV caching strategies, D1 query parameterization, R2 object handling, and Durable Objects for stateful WebSocket coordination. The security section includes practical request validation, auth checks, and rate limiting implementations. It's opinionated in the right ways, like always using parameterized queries and leveraging ctx.waitUntil() for background tasks. If you're doing anything beyond a hello world on Cloudflare's infrastructure, this gives you the patterns you'll actually need instead of making you dig through their docs.

skills.sh installs
718
GitHub stars
302
last updated
Aug 21, 2026

Install

$ npx -y skills add mindrally/skills --skill cloudflare-development --agent claude-code

Installs into .claude/skills of the current project.

Files

Cloudflare Development Best Practices

Overview

This skill provides comprehensive guidelines for developing applications on Cloudflare's edge platform, including Workers, Pages, KV storage, D1 databases, R2 object storage, and Durable Objects.

Core Principles

  • Write lightweight, fast code optimized for edge execution
  • Minimize cold start times and execution duration
  • Use appropriate storage solutions for each use case
  • Follow security best practices for edge computing
  • Leverage Cloudflare's global network for performance

Cloudflare Workers Guidelines

Basic Worker Structure

export default {
  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
    try {
      const url = new URL(request.url);

      // Route handling
      if (url.pathname === '/api/data') {
        return handleApiRequest(request, env);
      }

      return new Response('Not Found', { status: 404 });
    } catch (error) {
      console.error('Worker error:', error);
      return new Response('Internal Server Error', { status: 500 });
    }
  },
} satisfies ExportedHandler<Env>;

Sponsors

Details

Repository
github.com/mindrally/skills
Categories
Backend & APIs, Cloud & Infrastructure
First seen
Jun 3, 2026

More from mindrally/skills

All 240
1browser-use avatarcdpbrowser-use/browser-harness-jsDrive Chrome via the DevTools Protocol from JavaScript. Run JS snippets through the `browser-harness-js` CLI — it auto-spawns a long-lived bun HTTP server holdi716skills.sh installs
2everyinc avatardhh-rails-styleeveryinc/compound-engineering-pluginThis skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating716skills.sh installs
3machina-sports avatarcbb-datamachina-sports/sports-skillsCollege Basketball (CBB) data via ESPN public endpoints and the NCAA's official endpoints — scores, standings, rosters, schedules, game summaries, play-by-play,705skills.sh installs
4syncfusion avatarsyncfusion-react-data-managersyncfusion/react-ui-components-skillsImplements Syncfusion DataManager for local/remote binding, CRUD, querying, caching, and middleware. Supports JsonAdaptor, ODataAdaptor, ODataV4Adaptor, UrlAdap702skills.sh installs
5mindrally avatarmonorepo-tamaguimindrally/skillsMonorepo development guidelines using Tamagui, Turbo, Next.js, Expo, Supabase, and cross-platform best practices.701skills.sh installs
6machina-sports avatarwnba-datamachina-sports/sports-skillsWNBA data via ESPN public endpoints — scores, standings, rosters, schedules, game summaries, play-by-play, win probability, injuries, transactions, futures, tea699skills.sh installs