Any task involving moving computation closer to users at the network edge,
designing edge functions, optimizing latency through geographic distribution,
or evaluating edge vs origin placement decisions.
Mandatory actions when this skill is active
Before writing any code
Identify latency-sensitive paths that benefit from edge execution.
Decide edge vs origin for each operation using the decision matrix:
Keep edge function bundles small (<1MB) to minimize cold starts.
Avoid heavy imports — each dependency adds cold start latency.
Use stale-while-revalidate for cache coordination.
Handle edge-to-origin fallback gracefully.
Never rely on persistent connections at edge (stateless by design).
Implement proper cache-control headers at every layer.
After implementation
Measure actual latency improvement from edge deployment.
Verify data locality compliance (GDPR region constraints).
Test cold start performance under real traffic patterns.
Monitor edge function error rates per region.
Edge vs Origin Decision Framework
Signal
Edge
Origin
Latency-critical (<50ms target)
Yes
No
Heavy computation (>50ms CPU)
No
Yes
Personalization (small state)
Yes
No
Database writes
No
Yes
Static asset serving
Yes
No
Auth token validation
Yes
No
Complex business logic
No
Yes
Platform Patterns
Cloudflare Workers
V8 isolate model (no container cold start).
KV for eventual-consistent edge state.
Durable Objects for strong consistency at edge.
R2 for edge-local object storage.
Vercel Edge Functions
Runs on Cloudflare infrastructure.
Streaming responses supported.
Middleware pattern for auth/redirects.
Deno Deploy
Global V8 isolates with zero cold start.
Built-in KV for edge state.
Native Web APIs (fetch, streams, crypto).
Caching Strategy at Edge
Cache-Control: public, max-age=60, stale-while-revalidate=300 for dynamic content.
Cache-Control: public, max-age=31536000, immutable for hashed static assets.
Purge on deploy for cache invalidation.
Use cache tags for granular invalidation.
Limitations to Always Consider
Time limits (typically 30s-50ms CPU time depending on platform).
Memory limits (128MB typical).
No persistent connections (WebSocket requires special handling).
Bundle size constraints (1-10MB depending on platform).
Limited Node.js API compatibility at edge.
Eventual consistency for distributed edge state.
Self-check
Edge vs origin decision documented for each function.
Cold start measured and acceptable (<50ms target).
Bundle size within platform limits.
Fallback to origin implemented for edge failures.
Data locality compliant with regulatory requirements.
Cache headers set correctly at every layer.
1---2name: edge-computing3description: Skill — Edge Computing4---56# Skill — Edge Computing78## When this skill activates9Any task involving moving computation closer to users at the network edge,10designing edge functions, optimizing latency through geographic distribution,11or evaluating edge vs origin placement decisions.1213## Mandatory actions when this skill is active1415### Before writing any code161. Identify latency-sensitive paths that benefit from edge execution.172. Decide edge vs origin for each operation using the decision matrix:18 - Latency-sensitive reads → edge19 - Data-heavy computation → origin20 - Personalization with small state → edge21 - Writes requiring strong consistency → origin223. Document runtime constraints (time limits, memory, bundle size).2324### During implementation25- Keep edge function bundles small (<1MB) to minimize cold starts.26- Avoid heavy imports — each dependency adds cold start latency.27- Use stale-while-revalidate for cache coordination.28- Handle edge-to-origin fallback gracefully.29- Never rely on persistent connections at edge (stateless by design).30- Implement proper cache-control headers at every layer.3132### After implementation33- Measure actual latency improvement from edge deployment.34- Verify data locality compliance (GDPR region constraints).35- Test cold start performance under real traffic patterns.36- Monitor edge function error rates per region.3738## Edge vs Origin Decision Framework3940| Signal | Edge | Origin |41|--------|------|--------|42| Latency-critical (<50ms target) | Yes | No |43| Heavy computation (>50ms CPU) | No | Yes |44| Personalization (small state) | Yes | No |45| Database writes | No | Yes |46| Static asset serving | Yes | No |47| Auth token validation | Yes | No |48| Complex business logic | No | Yes |4950## Platform Patterns5152### Cloudflare Workers53- V8 isolate model (no container cold start).54- KV for eventual-consistent edge state.55- Durable Objects for strong consistency at edge.56- R2 for edge-local object storage.5758### Vercel Edge Functions59- Runs on Cloudflare infrastructure.60- Streaming responses supported.61- Middleware pattern for auth/redirects.6263### Deno Deploy64- Global V8 isolates with zero cold start.65- Built-in KV for edge state.66- Native Web APIs (fetch, streams, crypto).6768## Caching Strategy at Edge69- `Cache-Control: public, max-age=60, stale-while-revalidate=300` for dynamic content.70- `Cache-Control: public, max-age=31536000, immutable` for hashed static assets.71- Purge on deploy for cache invalidation.72- Use cache tags for granular invalidation.7374## Limitations to Always Consider75- Time limits (typically 30s-50ms CPU time depending on platform).76- Memory limits (128MB typical).77- No persistent connections (WebSocket requires special handling).78- Bundle size constraints (1-10MB depending on platform).79- Limited Node.js API compatibility at edge.80- Eventual consistency for distributed edge state.8182## Self-check83- [ ] Edge vs origin decision documented for each function.84- [ ] Cold start measured and acceptable (<50ms target).85- [ ] Bundle size within platform limits.86- [ ] Fallback to origin implemented for edge failures.87- [ ] Data locality compliant with regulatory requirements.88- [ ] Cache headers set correctly at every layer.
Run npx skillmds@latest add sairam0424/edge-computing in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Skill — Edge Computing It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
sairam0424 (@sairam0424) published this skill. Their other Agent Skills are listed on their SkillMD profile.