cloudflare-edge-architect

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

16 stars

Best use case

cloudflare-edge-architect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using cloudflare-edge-architect should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cloudflare-edge-architect/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/devops/cloudflare-edge-architect/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cloudflare-edge-architect/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cloudflare-edge-architect Compares

Feature / Agentcloudflare-edge-architectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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.

Related Skills

codebase-architecture-analysis

16
from diegosouzapw/awesome-omni-skill

Analyze a GitHub codebase to create comprehensive architecture documentation including ASCII diagrams, component relationships, data flow, hosting infrastructure, and file structure assessment.

cloudflare-workers

16
from diegosouzapw/awesome-omni-skill

Auto-activates when user mentions Cloudflare Workers, edge functions, or serverless deployment. Expert in Cloudflare Workers including deployment, KV storage, and Durable Objects.

cloudflare

16
from diegosouzapw/awesome-omni-skill

Deploy and manage Cloudflare services including Workers, Pages, R2, D1, and KV. Configure DNS, CDN, security rules, and edge computing. Use for edge deployments, CDN, and Cloudflare infrastructure.

cloudflare-deploy

16
from diegosouzapw/awesome-omni-skill

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

cloudflare-d1-migrations-and-production-seeding

16
from diegosouzapw/awesome-omni-skill

Use this skill whenever the user wants to design, run, or refine Cloudflare D1 schema management, migrations, and data seeding for dev/staging/production environments, especially in conjunction with Hono/Workers apps.

cloudflare-browser-rendering-automation

16
from diegosouzapw/awesome-omni-skill

Automate Cloudflare Browser Rendering tasks via Rube MCP (Composio). Always search tools first for current schemas.

cloudflare-automation

16
from diegosouzapw/awesome-omni-skill

Automate Cloudflare tasks via Rube MCP (Composio). Always search tools first for current schemas.

cloud-architect

16
from diegosouzapw/awesome-omni-skill

Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns.

aws-solution-architect

16
from diegosouzapw/awesome-omni-skill

Design AWS architectures for startups using serverless patterns and IaC templates. Use when asked to design serverless architecture, create CloudFormation templates, optimize AWS costs, set up CI/CD pipelines, or migrate to AWS. Covers Lambda, API Gateway, DynamoDB, ECS, Aurora, and cost optimization.

architecture-specialist

16
from diegosouzapw/awesome-omni-skill

提供系统架构设计、技术选型、架构审查和组件设计能力。当需要设计新系统、重构现有架构或进行架构审查时使用。

architecture-decision-records

16
from diegosouzapw/awesome-omni-skill

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

architecture-decision-record

16
from diegosouzapw/awesome-omni-skill

ADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences. Use when making or documenting architectural decisions.