Skip to content
Back to skills

Cloudflare Edge Architect

ASecurity

Advanced architecture skill for Cloudflare. Covers Workers, Durable Objects, R2, D1, and Edge-first data strategies.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
developmenttypescriptapibackend

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill cloudflare-edge-architect --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloudflare Edge Architect?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cloudflare Edge Architect
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-cloudflare-edge-architect/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-cloudflare-edge-architect)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cloudflare-edge-architect
description: Advanced architecture skill for Cloudflare. Covers Workers, Durable Objects, R2, D1, and Edge-first data strategies.
version: 2.0.0
author: multi-game-engines contributors
---

# Cloudflare Edge Architect Skill

This skill (formerly `cloudflare-workers-ops`) focuses on building scalable, stateful, and performant architectures on the Cloudflare global network.

## Core Pillars

1.  **Stateful Coordination (Durable Objects)**: Use Durable Objects for real-time multiplayer coordination, game engines state synchronization, and WebSockets.
2.  **Edge Data (D1 & KV)**: Strategy for distributing relational data (D1) and low-latency configuration (KV).
3.  **Object Storage (R2)**: Serve game assets and large binaries efficiently without egress fees.
4.  **Compute-at-Edge (Workers)**: Offload API logic and game logic to the edge to minimize latency.
5.  **AI-at-Edge (Workers AI)**: Integrate on-device inference for features like move suggestions or content moderation.

## Architecture Patterns

### Real-time Multiplayer with Durable Objects

```typescript
// Durable Object implementation for Game Session
export class GameSession {
  state: DurableObjectState;
  constructor(state: DurableObjectState) {
    this.state = state;
  }
  async fetch(request: Request) {
    // Handle game state updates and WebSocket connections
  }
}
```

## Best Practices Checklist

- [ ] **Cross-Origin Isolation**: Set `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` to enable `SharedArrayBuffer` for Wasm threads.
- [ ] **Smart Placement**: Enable Cloudflare Smart Placement to minimize latency between Workers and backends.
- [ ] **Bundling**: Use `esbuild` or `wrangler`'s built-in bundling to optimize script size.
- [ ] **Environment Secrets**: Securely manage keys for external APIs using `wrangler secret`.

## Advanced Commands

- `pnpm wrangler d1 migrations create <db_name> <description>`
- `pnpm wrangler r2 bucket create <bucket_name>`
- `pnpm wrangler dev --remote`: Test with real Cloudflare resources.

## Troubleshooting

- **"Durable Object not found"**: Ensure the namespace is correctly defined in `wrangler.toml`.
- **"Exceeded CPU limits"**: Optimize tight loops or offload heavy processing to asynchronous tasks.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.