Back to list
littlebearapps

architect

by littlebearapps

Claude Code plugin: Senior Cloudflare Systems Engineer capabilities for architecture, cost optimization, security, and implementation

0🍴 0📅 Jan 25, 2026

SKILL.md


name: architect description: This skill designs industry-grade Cloudflare architectures with wrangler.toml generation, Mermaid diagrams, and Edge-Native Constraint validation. Use this skill when the user asks about "designing new systems", "planning migrations", "evaluating architecture options", or mentions "Node.js libraries" that may not work on Workers.

Cloudflare Architect Skill

Design production-ready Cloudflare architectures with proper service selection, wrangler configuration generation, visual diagrams, and Edge-Native Constraint enforcement.

Core Capabilities

  1. Architecture Design - Service selection, data flow, scalability/cost trade-offs
  2. Configuration Generation - Complete wrangler.toml/jsonc with all bindings
  3. Visual Documentation - Mermaid diagrams for architecture and data flow
  4. Edge-Native Validation - Cross-reference code against Workers runtime compatibility
  5. Workers + Assets - Unified Worker with [assets] block for frontend + API

Service Selection Matrix

Storage Selection

NeedServiceLimitsCost
Relational queriesD110GB, 128MB memory$0.25/B reads, $1/M writes
Key-value lookupsKV25MB/value, 1 write/sec/key$0.50/M reads, $5/M writes
Large files/blobsR25TB/object$0.36/M reads, $4.50/M writes
Coordination/locksDurable ObjectsPer-object isolationCPU time based
Time-series metricsAnalytics EngineAdaptive samplingFREE
Vector similarityVectorize1536 dims, 5M vectors$0.01/M queries

Compute Selection

NeedServiceLimitsBest For
HTTP handlersWorkers (Isolates)128MB, 30s/reqAPI endpoints
Background jobsQueues128KB/msg, batches ≤100Async processing
Long-running tasksWorkflows1024 steps, 1GB stateMulti-step pipelines
Stateful coordinationDurable ObjectsPer-objectSessions, locks
Scheduled jobsCron Triggers1-minute minimumPeriodic tasks
OS-level dependenciesContainers (Beta)Full LinuxFFmpeg, headless browsers

AI/ML Selection

NeedServiceCostBest For
LLM inferenceWorkers AI$0.011/1K neuronsServerless AI
LLM caching/loggingAI GatewayFree tier + $0.10/MProduction AI
Embeddings + searchVectorizePer-dimensionRAG, semantic search

Workload Router

Select the right compute model:

  • Workers (Isolates): Standard APIs, database CRUD, AI inference via Workers AI
  • Python Workers: Pure Python scripts, AI SDKs (limited packages)
  • Containers (Beta): FFmpeg, Puppeteer, numpy/pandas, long-running processes

See: references/workload-router.md for decision trees and compatibility tables.

Edge-Native Constraints

Workers use V8 isolates, NOT Node.js. Key incompatibilities:

Can't UseAlternative
expressHono, itty-router
fsR2
pg, mysql2Hyperdrive
sharpCloudflare Images
puppeteerBrowser Rendering API
redisKV, Durable Objects

See: references/edge-constraints.md for full compatibility tables.

Workers + Assets (Replaces Pages)

For fullstack apps, use unified Worker with [assets] block:

{
  "name": "fullstack-app",
  "main": "src/worker.ts",
  "assets": {
    "directory": "./dist",
    "not_found_handling": "single-page-application"
  }
}

See: references/workers-assets.md for migration from legacy [site] and Pages.

Wrangler Health Check

Before designing, verify wrangler version:

npx wrangler --version
VersionStatusAction
3.100+CurrentGood to go
3.80-3.99AcceptableUpdate when convenient
<3.80Outdatednpm install -g wrangler@latest

Design Workflow

Step 1: Requirements Gathering

Ask about:

  1. Traffic patterns: Requests/second, geographic distribution
  2. Data characteristics: Size, structure, access patterns
  3. Processing needs: Sync vs async, latency requirements
  4. Budget constraints: Target monthly cost
  5. Compliance: Data residency, encryption requirements

Step 2: Service Selection

For each requirement, select appropriate service using the matrices above.

Step 3: Architecture Draft

Create Mermaid diagram showing:

  • All Workers and their responsibilities
  • Storage bindings and data flow
  • Queue topology (if async processing)
  • External service integrations

See: references/architecture-templates.md for pre-built templates.

Step 4: Configuration Generation

Generate wrangler.jsonc with:

  • All bindings properly named
  • Environment-specific overrides
  • Proper placement mode
  • Observability enabled
  • Queue DLQs configured

Step 5: Cost Estimation

Calculate monthly costs using service rates from the selection matrices.

Step 6: Review Checklist

Before finalizing:

  • All queues have DLQs
  • D1 has appropriate indexes planned
  • Smart placement enabled for latency-sensitive
  • Observability configured
  • Secrets use wrangler secret (not vars)
  • Rate limiting for public APIs
  • limits.cpu_ms set appropriately

Billing Safety Limits

CRITICAL: Set CPU limits to prevent runaway loops:

{
  "limits": {
    "cpu_ms": 100  // Kill execution if CPU churns >100ms
  }
}
Use Casecpu_ms
Simple API50-100
Database CRUD100-200
AI inference500-1000
Heavy processing5000

See: references/billing-safety.md for anti-patterns and protection strategies.

Output Format

When designing an architecture, provide:

  1. Requirements Summary - Confirmed requirements
  2. Architecture Diagram - Mermaid visualization
  3. Service Justification - Why each service was chosen
  4. Wrangler Configuration - Complete, deployable config
  5. Cost Estimate - Monthly projection with breakdown
  6. Migration Path - If replacing existing system
  7. Next Steps - Implementation order

Quick Reference Diagrams

Basic API

graph LR
    Client --> W[Worker]
    W --> D1[(D1)]
    W --> KV[(KV Cache)]

Event Pipeline

graph LR
    I[Ingest] --> Q[Queue] --> P[Processor]
    P --> D1[(Storage)]
    P -.->|failed| DLQ[Dead Letter]

Fullstack App

graph LR
    Client -->|/*| Assets
    Client -->|/api/*| API[Worker]
    API --> D1[(D1)]
  • implement: Scaffold code with Hono, Drizzle patterns
  • loop-breaker: Recursion guards for Worker-to-Worker calls
  • guardian: Security and budget auditing
  • patterns: Detailed architecture patterns (service-bindings, circuit-breaker, d1-batching)

Reference Files

  • references/edge-constraints.md - Node.js API and library compatibility
  • references/workload-router.md - Isolates vs Containers vs Python decision trees
  • references/workers-assets.md - Pages migration and unified Worker patterns
  • references/architecture-templates.md - Pre-built architecture configs
  • references/billing-safety.md - Loop protection and anti-patterns

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon