/godmode:edgefrom godmode
Guides edge computing and serverless development across Cloudflare Workers, Vercel Edge, Deno Deploy, and AWS Lambda. Covers cold start optimization, caching strategies, and platform-specific constraints.
Ships in godmode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/godmode:edge# Detect platform config
ls wrangler.toml vercel.json serverless.yml \
template.yaml deno.json 2>/dev/null
# Check bundle size (warn if > 1MB)
du -sh dist/ build/ .output/ 2>/dev/null
# Check for platform CLIs
which wrangler vercel serverless sam 2>/dev/null
EDGE DISCOVERY:
Platform: Cloudflare | Vercel | Deno Deploy |
AWS Lambda | GCP Cloud Functions | Azure Functions
Runtime: V8 isolates (edge) | Node.js | Deno | WASM
Latency target: <ms — e.g., p99 < 50ms>
State needs: stateless | KV | durable objects | DB
Budget: <cost ceiling per million requests>
IF platform not specified: ask user
IF bundle > 1MB: flag cold start risk
IF latency target < 50ms: recommend edge runtime
ARCHITECTURE:
Client → Edge PoP (~300 locations) → Origin
Edge function constraints:
CPU time limit: 10-50ms (platform dependent)
Bundle size limit: 1MB (CF Workers), 4MB (Vercel)
No Node.js globals in edge (Buffer, fs, process)
WHEN to use edge vs serverless:
Edge: latency-critical, geolocation, auth, A/B test
Serverless: CPU-heavy, long-running, DB-intensive
COLD START BENCHMARKS:
| Runtime | Typical Cold Start |
|--------------|-------------------|
| V8 isolate | < 5ms |
| Node.js 20 | 100-300ms |
| Python 3.12 | 150-400ms |
| Java 21 | 500-3000ms |
| .NET 8 | 200-500ms |
OPTIMIZATION CHECKLIST:
- Bundle size < 1MB (tree-shake, remove unused deps)
- Lazy-initialize DB connections and heavy modules
- Use ESM imports (faster parse than CJS)
- Provisioned concurrency for p99 < 100ms targets
- IF cold start > 200ms: profile with --cpu-prof
- IF bundle > 5MB: audit deps with bundlephobia
THRESHOLDS:
Target cold start: < 200ms
Target bundle: < 1MB (edge), < 5MB (Lambda)
Target p99 latency: < 100ms (edge), < 500ms (Lambda)
CACHING STRATEGIES:
| Strategy | TTL | Use Case |
|-----------------------|-----------|----------------|
| Cache-Control | 60-3600s | Static assets |
| stale-while-revalidate| 60s+300s | Dynamic lists |
| KV cache | 30-300s | API responses |
| Cache API (CF) | Custom | Computed output|
RULES:
- IF response is per-user: Cache-Control: private
- IF response is public: s-maxage + revalidate
- IF hit rate < 80%: audit cache keys
- Target CDN hit rate: > 80%
EDGE STATE SOLUTIONS:
| Solution | Consistency | Latency |
|-------------|----------------|-----------|
| KV Store | Eventually | <10ms read|
| Durable Obj | Strongly | Varies |
| D1/Turso | Strongly | <10ms read|
| R2/S3 | Eventually | Varies |
IF need strong consistency: use Durable Objects
IF need global reads: use KV with write-behind
IF need SQL at edge: use D1 or Turso replicas
# wrangler.toml (Cloudflare Workers)
name = "my-worker"
main = "src/index.ts"
compatibility_date = "2024-01-01"
[vars]
ENVIRONMENT = "production"
Structured JSON logs shipped to centralized service. Metrics: cold start duration, p99 latency, error rate.
# Local testing with platform emulator
npx wrangler dev # Cloudflare
npx vercel dev # Vercel
sam local start-api # AWS SAM
# Run tests against local emulator
npx vitest run tests/edge/
TESTING MATRIX:
| Layer | Tool |
|-------------|-------------------------|
| Unit | Vitest / Jest (mocked) |
| Integration | Miniflare / SAM local |
| E2E | Playwright (deployed) |
| Performance | k6 / wrk |
EDGE/SERVERLESS COMPLETE:
Platform: <platform>
Functions: <N>, Cold start: <X>ms, Bundle: <N>KB
Caching: <strategy>, Regions: <global | specific>
Commit: "edge: <service> — <N> functions, p99 <X>ms"
Never ask to continue. Loop autonomously until done.
latest tag or unbounded dependencies.1. Platform: wrangler.toml, vercel.json, serverless.yml
2. Runtime: V8 isolate, Node.js, Deno, WASM
3. Functions: src/functions/, api/, workers/
4. Bundle size: warn if > 5MB
FOR each function in queue:
1. Analyze: bundle size, cold start, CPU, cache
2. Implement or optimize
3. Test locally with emulator
4. MEASURE: cold start ms, p99, bundle KB
5. IF cold start > 200ms: tree-shake, lazy init
6. IF bundle > 1MB: audit deps, split function
Print: Edge: {platform}, {N} functions, p99 {X}ms, bundle {N}KB, cache hit {X}%. Verdict: {verdict}.
Log to .godmode/edge-results.tsv:
timestamp platform functions cold_start_ms bundle_kb status
KEEP if: tests pass AND cold start < 200ms
AND bundle within limit
DISCARD if: tests fail OR cold start regressed
OR new errors
STOP when ANY of:
- All functions deployed and validated
- Cold start < 200ms for all functions
- User requests stop
- Max iterations reached
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
135 skills in this plugin
/a11yAccessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse./agentAI agent development. ReAct/plan-and-execute/multi-agent architectures, tool design, memory systems, guardrails, orchestration (LangChain, LlamaIndex, CrewAI, AutoGen)./analyticsProduct analytics implementation — event tracking, funnel analysis, A/B testing, Segment/Amplitude/Mixpanel/PostHog, privacy-compliant instrumentation./angularAngular architecture. NgRx, Signals, RxJS, standalone components, lazy loading, dependency injection, Jasmine, Jest.Other plugins' skills for the same job