netlify-edge-functions
Skill by fanfan-de
Guides an AI assistant in writing Netlify Edge Functions that run on Netlify's edge network with the Deno runtime. It suits developers building middleware, geolocation logic, request and response changes, or low-latency edge compute.
Install netlify-edge-functions
Built from the published package, never by AI.
git clone --depth 1 https://github.com/fanfan-de/anybox /tmp/anybox && mkdir -p ~/.claude/skills && cp -r /tmp/anybox/plugins/Anybox-Plugins/netlify/skills/netlify-edge-functions ~/.claude/skills/netlify-edge-functionsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/fanfan-de/anybox /tmp/anybox && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/anybox/plugins/Anybox-Plugins/netlify/skills/netlify-edge-functions ~/.gemini/antigravity-cli/skills/netlify-edge-functionsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install netlify-edge-functions in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a guide for writing Netlify Edge Functions. Edge functions run on Netlify's globally distributed edge network using the Deno runtime, so they can respond with low latency close to users. The guide covers the function syntax, the config object with path, excludedPath, method, onError and cache options, and the context.next() middleware pattern for changing requests and responses.
The guide also explains how to read geolocation and IP data from the context, how to use Netlify.env for environment variables, and which module types are supported, including Node.js builtins, npm packages and Deno URL imports. It includes a table for choosing edge functions or serverless functions, and it lists edge runtime limits. It is aimed at developers who build middleware, authentication checks, A/B tests or geolocation-based routing on Netlify.
Written from the project's SKILL.md and checked against it.
What it can do
- Edge function syntaxWrites a default export handler that takes a Request and Context and returns a Response.
- Function configSets path, excludedPath, method, onError and cache options for an edge function.
- Middleware patternUses context.next() to modify a response or short-circuit a request before the origin.
- Geolocation and IPReads city, country, subdivision, timezone and IP data from the context object.
- Environment variablesReads secrets through Netlify.env.get instead of process.env or Deno.env.
- Module importsExplains using Node.js builtins, npm packages and Deno URL imports with an import map.
- Edge or serverless choiceCompares edge functions and serverless functions for latency, memory and task length.
What you need
- Netlify project with edge functions in netlify/edge-functions/
- Deno runtime for edge function code
- Netlify CLI for local development with netlify dev
Try asking
- Write a Netlify edge function that redirects visitors from Germany to /de
- Create edge middleware that returns 401 when a request is not authenticated
- Help me decide if this task should be an edge function or a serverless function
Good to know
- Edge functions have a 50 ms CPU time limit per request
- Memory is limited to 512 MB per deployed set
- Response header timeout is 40 seconds and code size is 20 MB compressed
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/Anybox-Plugins/netlify/skills/netlify-edge-functions/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
LICENSE.txt11 KB -
SKILL.md3 KB -
agents/openai.yaml352 B -
assets/netlify-small.svg1 KB -
assets/netlify.png3 KB
Alternatives to netlify-edge-functions
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
netlify-edge-functions: common questions
What is the difference between Netlify Edge Functions and serverless functions?
The guide says edge functions suit low-latency responses, request manipulation and geolocation logic. Serverless functions suit long-running tasks up to 15 minutes, complex Node.js dependencies and tasks needing more than 512 MB of memory.
How do I test geolocation logic locally?
The guide says to run netlify dev with the --geo=mock and --country flags, for example netlify dev --geo=mock --country=US.
Which runtime do Netlify Edge Functions use?
The source states that edge functions run on the Deno runtime. It also says Node.js builtins and npm packages can be imported.
How do I install netlify-edge-functions?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is netlify-edge-functions free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is netlify-edge-functions safe to use?
It scores 70 of 100. Grades: maintenance B, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to netlify-edge-functions?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
