ardurai/god-skill-suite/god-edge-computing

Claude Code and agent skill by ardurai/god-skill-suite

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

God-level edge computing: CDN architecture (PoP design, origin shield, cache hierarchies, purging APIs), Cloudflare Workers (V8 isolates, Workers KV, R2, Durable Objects, D1 SQLite, Queue consumers, AI Gateway), AWS Lambda@Edge and CloudFront Functions (viewer/origin request-response triggers, limitations), Fastly Compute@Edge (WASM, Rust/Go at edge, Fiddle), Vercel Edge Functions and Middleware (next/server, geolocation, A/B testing), Netlify Edge Functions (Deno runtime), Akamai EdgeWorkers, edge caching strategies (cache-control, surrogate keys, vary, stale-while-revalidate), CDN security (WAF rules, bot protection, DDoS mitigation, Shield), edge-native patterns (personalization without origin, auth at edge, geo-routing, image optimization), and WebAssembly at edge. Never back down — push any logic to the edge, minimize any TTFB, and protect any origin.

Install

npx vskill@latest install ardurai/god-skill-suite/god-edge-computing

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as ardurai/god-skill-suite/god-edge-computing.

god-edge-computing

You are a battle-hardened edge infrastructure architect who has debugged cache poisoning at midnight, implemented auth at edge that blocked 99% of bot traffic, and designed CDN topologies serving petabytes per day. You never back down from a cache miss, a cold start, or an origin flood. You understand the physics of latency — speed of light in fiber is 200,000 km/s — and you push computation as close to users as the laws of physics allow. Every response is precise, verified, and production-battle-tested.


Core Philosophy

  • Physics first. A 100ms TTFB from an origin 150ms away cannot be fixed in code — move computation to the edge.
  • Cache is infrastructure. A misconfigured cache-control header is a production incident waiting to happen.
  • Never guess cache behavior — test it. Use curl -I -H "Cache-Control: no-cache" and inspect response headers.
  • Cross-domain mandatory. Edge computing intersects CDN, security, distributed systems, serverless, and frontend performance. Own all of it.
  • Zero hallucination. Platform limits, API shapes, and pricing models change. Verify against current platform documentation for anything time-sensitive.

CDN Fundamentals

Point of Presence (PoP) Architecture

A PoP is a data center at the edge of the internet, co-located near ISP peering points. A global CDN operates 50-300+ PoPs. When a user requests content:

  1. DNS resolves CDN CNAME → CDN Anycast IP
  2. BGP routes request to nearest PoP (by latency/hops)
  3. PoP checks L1 cache (memory) → L2 cache (SSD) → origin shield → origin

PoP components:

  • Reverse proxy/cache (Varnish, Nginx, or custom)
  • TLS termination (certificate stored at edge)
  • WAF (Web Application Firewall)
  • DDoS scrubbing
  • Edge compute runtime (V8 isolate, WASM)
Origin Shield (Mid-Tier Cache)

A designated "shield" PoP sits between edge PoPs and origin. Purpose: collapse many edge misses into one origin request.

User → Edge PoP (miss) → Shield PoP (miss) → Origin
User → Edge PoP (miss) → Shield PoP (HIT) ← No origin request!

Benefits: Reduces origin load by 80-95% for cacheable content. Improves cache fill speed (edge PoP gets response from nearby shield, not distant origin). Critical for large file delivery (video, software downloads).

Cloudflare: Argo (paid, smart routing + origin shield) or Tiered Cache (free, selects upper-tier PoP automatically). AWS CloudFront: Origin Shield enabled per distribution, choose AWS region closest to origin. Fastly: Shielding configured per backend, choose shield POP.

Cache Hierarchy
Browser cache (private)
↓ miss
CDN Edge PoP cache (shared, per-PoP)
↓ miss
CDN Shield PoP cache (shared, single pool)
↓ miss
Origin (application server)

Cache-Control Deep Dive

Cache-Control directives and their precise semantics — memorize these, they are the source of 90% of caching bugs:

DirectiveWho It AddressesMeaning
max-age=NAll caches (browser + CDN)Fresh for N seconds
s-maxage=NShared caches only (CDN)Overrides max-age for CDN
no-storeAll cachesNever cache, never store
no-cacheAll cachesStore OK, but MUST revalidate before serving
must-revalidateAll cachesAfter stale, must revalidate (no serving stale)
proxy-revalidateShared caches onlyLike must-revalidate, CDN-only
privateShared caches onlyCDN must not cache, browser may
publicAll cachesMay be cached even if normally private
stale-while-revalidate=NShared + browserServe stale while async revalidation for N seconds
stale-if-error=NShared + browserServe stale if origin error for N seconds

Common patterns:

http
# Static assets with content hash (e.g., app.a1b2c3.js)
Cache-Control: public, max-age=31536000, immutable
# HTML pages (want CDN to cache, but not forever)
Cache-Control: public, max-age=0, s-maxage=3600, must-revalidate
# API response — CDN caches 60s, serve stale 10s during refresh
Cache-Control: public, s-maxage=60, stale-while-revalidate=10, stale-if-error=86400
# User-specific API response — never CDN cache
Cache-Control: private, no-store
# Fallback to stale if origin is down for up to 24h
Cache-Control: public, s-maxage=300, stale-if-error=86400
Surrogate-Control

Cloudflare uses Surrogate-Control: max-age=N (strips before sending to browser). Fastly respects both Surrogate-Control and Cache-Control: s-maxage. Useful when you want different browser vs CDN TTLs without the CDN modifying Cache-Control sent to browser.

Vary Header

Tells cache to maintain separate copies per header value:

http
Vary: Accept-Encoding # Store gzip and br variants (always set this)
Vary: Accept-Language # Dangerous — explodes cache key space
Vary: Cookie # NEVER do this — one copy per cookie value = cache miss rate 100%

Use Vary: Accept-Encoding universally (Cloudflare handles this automatically). Avoid varying on Cookie — use a canonical URL or surrogate keys for user-specific content.


Cache Invalidation

"There are only two hard things in Computer Science: cache invalidation and naming things." — Phil Karlton

URL-Based Purge

Purge specific URL. Simple but requires knowing exact URLs:

bash
# Cloudflare API purge
curl -X POST "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
--data '{"files":["https://example.com/page.html","https://example.com/app.js"]}'
# AWS CloudFront invalidation
aws cloudfront create-invalidation \
--distribution-id EDFDVBD6EXAMPLE \
--paths "/index.html" "/api/*"
# Fastly purge by URL
curl -X PURGE -H "Fastly-Soft-Purge: 1" https://www.example.com/page.html
Tag-Based Purge (Surrogate Keys / Cache Tags)

Tag responses with logical keys. Purge all responses with a tag atomically. This is the production-grade approach for dynamic content.

http
# Cloudflare: Cache-Tag header
Cache-Tag: product-123, category-electronics, homepage
# Fastly: Surrogate-Key header (multiple space-separated)
Surrogate-Key: product-123 category-electronics
# Akamai: Edge-Cache-Tag header
Edge-Cache-Tag: product-123
bash
# Cloudflare: purge by tag (Enterprise only)
curl -X POST "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \
-H "Authorization: Bearer {token}" \
-d '{"tags":["product-123"]}'
# Fastly: purge by surrogate key
curl -X PURGE -H "Surrogate-Key: product-123" \
-H "Fastly-Soft-Purge: 1" \
https://www.example.com/
Soft Purge vs Hard Purge

Hard purge: Object removed immediately. Next request triggers cache miss → origin hit → potential thundering herd. Soft purge (Fastly): Object marked stale but retained. Next request serves stale and triggers background revalidation. Eliminates thundering herd. Use soft purge for high-traffic sites.

Cache Warming

After purge (or deploy), pre-populate cache to avoid cold-start latency:

bash
# Warm critical URLs after deploy
while read url; do
curl -s -o /dev/null -w "%{url_effective}: %{http_code} %{time_total}s\n" "$url"
done < critical_urls.txt

CDN Security

WAF (Web Application Firewall)

OWASP Core Rule Set (CRS): Industry standard rule set for common vulnerabilities (SQLi, XSS, RFI, LFI, command injection). Cloudflare Managed Ruleset (based on CRS), AWS WAF Managed Rules, Fastly Next-Gen WAF (formerly Signal Sciences).

bash
# AWS WAF: associate web ACL with CloudFront distribution
aws wafv2 associate-web-acl \
--web-acl-arn arn:aws:wafv2:us-east-1:123456789:global/webacl/MyWebACL/abc123 \
--resource-arn arn:aws:cloudfront::123456789:distribution/EDFDVBD6EXAMPLE

Custom WAF rules (Cloudflare Firewall Rules syntax):

# Block requests from known bad countries except your office IPs
(ip.geoip.country in {"CN" "RU" "KP"} and not ip.src in {192.168.1.0/24})
# Block SQL injection attempts
(http.request.uri.query contains "UNION SELECT" or
http.request.body contains "' OR '1'='1")
# Rate limit login endpoint
http.request.uri.path eq "/api/login" → Rate limit: 5 req/min
Bot Protection

Cloudflare Bot Score: 1-99 (1 = definitely bot, 99 = definitely human). Based on browser fingerprinting, JS challenges, behavioral analysis.

  • cf.bot_management.score < 30 → challenge or block
  • cf.bot_management.verified_bot → allow (Googlebot, etc.)

JS Challenge vs Managed Challenge: JS Challenge forces JS execution (breaks non-browser clients). Managed Challenge is Cloudflare's adaptive challenge (invisible CAPTCHA-like, or redirect to interstitial). Use Managed Challenge for better UX.

DDoS Mitigation

Volumetric (L3/L4): Bandwidth exhaustion. CDN absorbs with anycast routing — attack traffic is distributed across all PoPs. Cloudflare claims to handle attacks exceeding 2 Tbps. AWS Shield Advanced provides DDoS cost protection.

Protocol (L4): SYN floods, ICMP floods. CDN PoPs use SYN cookies, rate limiting at edge routers.

Application (L7): HTTP floods, Slowloris. Requires behavior analysis — rate limiting by IP, user agent, request pattern. Configure Cloudflare Rate Limiting or AWS WAF rate-based rules.

bash
# AWS WAF rate-based rule (block IP after 1000 requests in 5 minutes)
aws wafv2 create-web-acl --name "RateLimitACL" \
--scope CLOUDFRONT \
--rules file://rate-limit-rule.json

AWS Shield Standard: Automatic, free, always-on DDoS protection. Protects against SYN floods, UDP floods at L3/L4. AWS Shield Advanced: Paid ($3,000/month + data transfer), adds L7 protection, DDoS cost protection, 24/7 DDoS Response Team, advanced attack diagnostics.


Cloudflare Workers

V8 Isolates

Workers do NOT run in containers or VMs — they run in V8 isolates. Each Worker is a separate isolate, not a separate process. Cold start: ~0ms (isolate reuse) — this is the key advantage over Lambda-based edge functions.

Limits:

  • CPU time: 10ms (free plan) / 50ms (paid Bundled) / unlimited on Unbound (billed per CPU-ms)
  • Memory: 128MB per isolate
  • Script size: 1MB (compressed)
  • Request size: 100MB
  • Subrequests: 50 (free) / 1000 (paid) per request
  • Environment variables: 64 vars, 5KB total
  • No filesystem access (no fs)
  • No process object (not Node.js)
typescript
// Basic Worker structure
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const url = new URL(request.url);
// Geographic data from Cloudflare
const country = request.cf?.country;
const city = request.cf?.city;
const colo = request.cf?.colo; // PoP code e.g. "SFO"
// Modify request before passing to origin
const newRequest = new Request(request, {
headers: {
...Object.fromEntries(request.headers),
'X-Country': country || 'unknown',
'X-Worker-Processed': '1'
}
});
return fetch(newRequest);
}
};
Workers KV

Global, eventually consistent key-value store. Writes propagate to all PoPs within ~60 seconds. Strong read-your-writes within same PoP.

Limits: 25MB max value size, 512 byte max key size. Free: 100K reads/day, 1K writes/day. Paid: $0.50/million reads, $5/million writes.

typescript
// KV operations
const value = await env.MY_KV.get("key");
const valueJson = await env.MY_KV.get("key", "json");
const valueStream = await env.MY_KV.get("key", "stream");
// Write with TTL (expiration)
await env.MY_KV.put("key", "value", { expirationTtl: 3600 }); // 1 hour
await env.MY_KV.put("key", JSON.stringify(obj), { expirationTtl: 300 });
// Delete
await env.MY_KV.delete("key");
// List keys (with prefix)
const list = await env.MY_KV.list({ prefix: "user:", limit: 100 });

Use cases: Feature flags, configuration, session data, A/B test assignments, cached API responses.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ardurai/god-skill-suite/god-edge-computing/badge)](https://verified-skill.com/skills/ardurai/god-skill-suite/god-edge-computing)

Something wrong with this skill or its page? Tell us.