edge-runtime-handbook
Installation
SKILL.md
Instructions
When to Use
- Use when deciding Edge vs Node for a Route Handler or middleware.
- Prefer
next-server-patternsfor general App Router placement. - Prefer
auth-handbookif Edge auth APIs are the blocker.
Explain Edge vs Node runtimes in Next.js for the user’s code. Always verify against the installed Next version.
Decision matrix
| Workload | Prefer | Why |
|---|---|---|
| Middleware auth gate (coarse) | Edge | Default; keep tiny |
Prisma / native addons / fs |
Node | Typical Edge blockers |
| Long-lived WS/SSE fan-out | Node (realtime-handbook) |
Connection lifespan |
| Geo/header rewrite only | Edge | Low I/O |
| Heavy crypto / PDF / image ops | Node | CPU + APIs |