Netlify/netlify-edge-functions — Agent Skills | officialskills.sh
Back to skills

netlify-edge-functions

Netlify Edge Functions run on a globally distributed Deno runtime, executing code at the network edge closest to each user.

Setup & Installation

npx skills add https://github.com/netlify/context-and-tools --skill netlify-edge-functions
or paste the link and ask your coding assistant to install it
https://github.com/netlify/context-and-tools/tree/main/skills/netlify-edge-functions
View on GitHub

What This Skill Does

Netlify Edge Functions run on a globally distributed Deno runtime, executing code at the network edge closest to each user. The skill covers the middleware pattern using context.next(), geolocation access, request/response manipulation, and when to use edge compute over standard serverless functions.

Edge functions run in Deno with sub-50ms CPU budgets at global PoPs, so geolocation redirects and auth checks happen before the request ever reaches your origin, unlike a serverless function that runs in a single region.

When to use it

  • Redirecting users to localized pages based on country code from context.geo
  • Adding authentication checks before requests reach the origin server
  • Running A/B tests by rewriting URLs at the edge without client-side flicker
  • Injecting custom response headers for every route matching a URL pattern
  • Bypassing the origin entirely for cached or static responses on high-traffic paths