edge-computing-patterns

edge-computing-patterns is a skill for Claude Code, Codex from ArieGoldkin/ai-agent-hub. It costs 53 tokens per session (1,485 once invoked), scanned A, original, MIT.

A guide to running application code near users around the world on Cloudflare Workers, Vercel Edge Functions, and Deno Deploy. It covers edge middleware, streaming responses, and the limits of these runtimes.

In plain words
What is it for?
Use it to build globally distributed APIs and web applications, route users by country, run authentication or authorization at the edge, test features for different groups, limit API traffic, and rewrite or optimize responses.
Why use it?
It helps when a central server is too far from some users or when requests need to be handled close to where they originate. It also addresses common edge tasks such as location-based routing, access checks, rate limits, and response changes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ariegoldkin/ai-agent-hub/edge-computing-patterns
Any agent
npx skills add ArieGoldkin/ai-agent-hub --skill edge-computing-patterns
Clone the repo
git clone --depth 1 https://github.com/ArieGoldkin/ai-agent-hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for edge-computing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/ariegoldkin/ai-agent-hub/edge-computing-patterns.svg)](https://agentmods.dev/skills/ariegoldkin/ai-agent-hub/edge-computing-patterns)
Your own site
<a href="https://agentmods.dev/skills/ariegoldkin/ai-agent-hub/edge-computing-patterns"><img src="https://agentmods.dev/badge/skills/ariegoldkin/ai-agent-hub/edge-computing-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.01485
Opus 5 $0.00026 $0.00743
Sonnet 5 $0.00011 $0.00297
Haiku 4.5 $0.00005 $0.00148

Measured 5d ago against content hash 529709d35ecb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

edge-computing-patterns scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request, env: Env): Promise<Response> {

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Node.js APIs (`fs`, `path`, `child_process`)
skills/edge-computing-patterns/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Edge Computing Patterns

Overview

Edge computing runs code closer to users worldwide, reducing latency from seconds to milliseconds. This skill covers Cloudflare Workers, Vercel Edge Functions, and Deno Deploy patterns for building globally distributed applications.

When to use this skill:

  • Global applications requiring <50ms latency
  • Authentication/authorization at the edge
  • A/B testing and feature flags
  • Geo-routing and localization
  • API rate limiting and DDoS protection
  • Transforming responses (image optimization, HTML rewriting)

Platform Comparison

Feature Cloudflare Workers Vercel Edge Deno Deploy
Cold Start <1ms <10ms <10ms
Locations 300+ 100+ 35+
Runtime V8 Isolates V8 Isolates Deno
Max Duration 30s (paid: unlimited) 25s 50ms-5min
Free Tier 100k req/day 100k req/month 100k req/month

Cloudflare Workers

// worker.ts
export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const url = new URL(request.url)

    // Geo-routing
    const country = request.cf?.country || 'US'

    if (url.pathname === '/api/hello') {
      return new Response(JSON.stringify({
        message: `Hello from ${country}!`
      }), {
        headers: { 'Content-Type': 'application/json' }
      })
    }

    // Cache API
    const cache = caches.default
    let response = await cache.match(request)

    if (!response) {
      response = await fetch(request)
      // Cache for 1 hour
      response = new Response(response.body, response)
      response.headers.set('Cache-Control', 'max-age=3600')
      await cache.put(request, response.clone())
    }

    return response
  }
}

// Durable Objects for stateful edge
export class Counter {
  private state: DurableObjectState
  private count = 0

  constructor(state: DurableObjectState) {
    this.state = state
  }

  async fetch(request: Request) {
    const url = new URL(request.url)

    if (url.pathname === '/increment') {
      this.count++
      await this.state.storage.put('count', this.count)
    }

    return new Response(JSON.stringify({ count: this.count }))
  }
}

Read the full file on GitHub · 234 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 234 lines · 53 tokens per session scan A 529709d35ecb

Subscribe to this mod's changes

edge-computing-patterns is a skill published in the GitHub repository ArieGoldkin/ai-agent-hub (11 stars, last pushed 9mo ago), licensed MIT. It adds 53 tokens to every session and 1,485 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cloudflare

Use when working on Cloudflare's edge platform — wrangler.jsonc bindings, choosing between D1/KV/R2/Durable Objects/Queues, deploying a Worker or SPA via Static Assets, or designing around a Workers runtime limit. NOT generic CI/release (that is deployment), NOT Next.js framework wiring (that is nextjs), NOT DNS…

ericrisco/rsc-harness · 86 tokens

deploy-microfeed

Deploy and administer microfeed through the source-code-free @microfeed/cli launcher or the project-owned yarn manage CLI. Use when a user asks a coding agent to operate a local or Cloudflare instance, including accounts, initialization, connection, development, deployment, themes, snapshots, status, destruction…

microfeed/microfeed · 82 tokens

frontmcp-deployment

Use when deploying, building for production, packaging, or shipping a FrontMCP server. Covers build targets (node, cli SEA binary, browser, embeddable SDK, mcpb archive for Claude Desktop, serverless) and deploying to Vercel (with Vercel KV), AWS Lambda (API Gateway, SAM, CDK), Cloudflare Workers (KV, D1, Durable…

agentfront/frontmcp · 210 tokens

hono-cloudflare

Hono on Cloudflare Workers - bindings, KV, D1, R2, Durable Objects, and edge deployment patterns.

bobmatnyc/claude-mpm-skills · 29 tokens

cloud-platforms

AWS, GCP, Azure services and cloud-native development.

miles990/claude-software-skills · 15 tokens

cloudflare-worker-dev

Cloudflare Workers, KV, Durable Objects, and edge computing development. Use for serverless APIs, caching, rate limiting, real-time features. Activate on "Workers", "KV", "Durable Objects", "wrangler", "edge function", "Cloudflare". NOT for Cloudflare Pages configuration (use deployment docs), DNS management, or…

curiositech/windags-skills · 78 tokens