Netlify Edge Functions
Edge-runtime handlers for Deno, with routing, rewrites, middleware, caching, and geolocation guidance.
- CCM score
- 75 of 100
- skills.sh installs
- 3.5K
- GitHub stars
- 57
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the Deno handler shape, route config,
context.next()middleware, and rewrites, redirects, and Netlify user gating - Includes conditional-request, body-read,
waitUntil, and streaming SSR patterns, plus a list of footguns that silently break routing or caching - Enforces that caching needs both
cache: "manual"in config and cache headers on the response, and warns that cached functions shadow static files - Designed for developers who need auth gates, geolocation logic, or low-latency request handling before static files or serverless functions run
Install
$ npx -y skills add netlify/context-and-tools --skill netlify-edge-functions -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Netlify Edge Functions
Use this form
// netlify/edge-functions/hello.ts
import type { Config, Context } from "@netlify/edge-functions";
export default async (request: Request, context: Context) => {
return new Response(`Hello from ${context.geo.country?.name ?? "somewhere"}`);
};
export const config: Config = { path: "/hello" };
Details
- Repository
- github.com/netlify/context-and-tools
- Categories
- Backend & APIs, Frontend & UI Code, DevOps & Cloud
- First seen
- Jun 3, 2026
Questions
What is the netlify-edge-functions skill for?
It guides agents in writing Netlify Edge Functions, Deno-based TypeScript or JavaScript handlers that run at the network edge in front of static files and serverless functions. It covers middleware, geolocation-based logic, redirects and rewrites, authentication checks, A/B testing, and caching.
How do I install the netlify-edge-functions skill?
Run npx -y skills add netlify/context-and-tools --skill netlify-edge-functions -y in your project. The skill then lets the agent write, route, cache, and debug edge functions in the netlify/edge-functions directory.
Which skills are the main alternatives in Backend & APIs?
Other skills in the Backend & APIs category include entra-app-registration, neon, firebase-basics, firebase-auth-basics, and workers-best-practices. This skill is the one for Netlify edge compute, with a Deno runtime and the context.next() middleware pattern.
Do I need a Netlify account or special runtime to use it?
The skill assumes a Netlify project, since edge functions deploy to Netlify and run on its Deno runtime. Environment variables are read with Netlify.env.get(), and edge functions cannot see variables set in netlify.toml.
When should I pick an edge function over a serverless function?
The skill covers when to choose edge versus serverless, aimed at low-latency work such as middleware, geolocation, request and response changes, and A/B tests. Edge functions run under a 50 ms CPU limit per request, so heavier work belongs in serverless functions.
More from netlify/context-and-tools
All 12Similar to Netlify Edge Functions
More Backend & APIsnetlify-functionsnetlify/context-and-tools3.7K installsWrite and deploy Netlify serverless functions in TypeScript, JavaScript, or Go, with path routing and config options.
netlify-cachingnetlify/context-and-tools3.5K installsNetlify CDN caching controls for function and edge responses, including headers, purges, and the Cache API.
routing-middlewarevercel/vercel-plugin338 installsVercel-platform request interception layer for rewrites, redirects, geo routing, and A/B tests across frameworks.
netlify-developmentmindrally/skills711 installsNetlify development guidance covering serverless, edge, background, and scheduled functions, plus Blobs and build config.