Write Edge Functions: run code at the edge for A/B testing, authentication, geolocation-based routing, and request transformation with minimal latency.
When to use this skill
- Creating an edge function
- Implementing A/B testing at the edge
- Using geolocation in edge functions
Core concepts
This skill provides guidance on netlify edge functions best practices, patterns, and common pitfalls. It is designed to be loaded on demand when a relevant task is detected.
Installation
curl -LO https://opencode-skills.example/downloads/cloud/netlify-edge.zip
unzip netlify-edge.zip -d ~/.config/opencode/skills/
Restart OpenCode — the skill loads automatically.
When it triggers
- creating an edge function
- implementing A/B testing at the edge
- using geolocation in edge functions