원클릭으로
edge
Edge computing and serverless. Deno Deploy, distributed state, Cloudflare Workers, Vercel Edge, AWS Lambda.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Edge computing and serverless. Deno Deploy, distributed state, Cloudflare Workers, Vercel Edge, AWS Lambda.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Turn on Godmode. 134 skills, 7 subagents, zero configuration. Routes to the right skill automatically.
Accessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse.
Cache. Redis, Memcached, Varnish, CDN, cache invalidation, TTL, write-through, cache stampede, thundering herd.
Config. dev/staging/prod, feature flags, A/B test rollout, config validation, env parity, secret safety, drift detection.
Crypto. encryption, hashing, Argon2, bcrypt, key management, JWT signing, TLS hardening, digital signatures, sensitive data.
Docs. OpenAPI/Swagger, JSDoc, docstrings, README, runbook, API docs, stale docs audit, missing coverage.
| name | edge |
| description | Edge computing and serverless. Deno Deploy, distributed state, Cloudflare Workers, Vercel Edge, AWS Lambda. |
/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