agentleFS
TheBeardedBearSASTheBeardedBearSAS/claude-craft/.claude/skills/edge-computing/SKILL.md

edge-computing

Skill108 starsChanged 16 days agoMITView on GitHub

Cloudflare Workers, Deno Deploy, Vercel Edge Functions, edge patterns (geo-routing, caching). Use when implementing edge compute, CDN logic, or global low-latency APIs.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Edge Computing — Cloudflare Workers, Deno Deploy

Compute global faible latence, proche utilisateur.

Platforms

Cloudflare Workers — V8, 300+ POPs, KV/Durable
Deno Deploy — Deno, 30+ POPs, TypeScript
Vercel Edge — V8, 20+ POPs, Next.js
Fastly Compute@Edge — WASM, 70+ POPs

Geo-Routing

export default {
  async fetch(req) {
    const api = req.cf.country === 'US' ? 'us-api' : 'eu-api';
    return fetch(`https://${api}.example.com${req.url}`);
  }
};

Edge Caching (KV)

const key = new URL(req.url).pathname;
let cached = await env.KV.get(key);
if (cached) return new Response(cached, { headers: { 'X-Cache': 'HIT' } });
const resp = await fetch('https://origin.com' + key);
const body = await resp.text();
await env.KV.put(key, body, { expirationTtl: 3600 });
return new Response(body, { headers: { 'X-Cache': 'MISS' } });

A/B Testing

const variant = Math.random() < 0.5 ? 'A' : 'B';
resp.cookies.set('ab_test', variant);

Bot Detection

if (/bot|crawler/i.test(req.headers.get('User-Agent'))) {
  return new Response('Forbidden', { status: 403 });
}

Durable Objects (Stateful)

export class ChatRoom {
  async fetch(req) {
    const [client, server] = Object.values(new WebSocketPair());
    this.sessions.push(server); server.accept();
    server.on('message', e => this.broadcast(e.data));
    return new Response(null, { status: 101, webSocket: client });
  }
}

Constraints

CPU 10-50ms → offload heavy
Memory 128MB → streaming
No FS → KV/R2


Voir @.claude/skills/wasm/SKILL.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.