# Supabase Edge Function Builder

> Use when building or planning a Supabase Edge Function for authenticated server logic, webhooks, background triggers, third-party integrations, or privileged operations. Trigger on requests to create or review edge functions in a Supabase system.

- Skill: `saranskumar/supabase-edge-function-builder` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add saranskumar/supabase-edge-function-builder`
- Raw SKILL.md: https://api.skillmd.com/api/skills/saranskumar/supabase-edge-function-builder/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: saranskumar (https://skillmd.com/u/saranskumar)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/saranskumar/supabase-edge-function-builder

---


# Goal
Create Edge Functions that handle trusted backend work safely and cleanly.

# When to Use
- The logic should not run in the client.
- A webhook, privileged API call, or server-side integration is needed.
- Supabase Edge Functions are the chosen execution layer.

# Instructions
1. Define the function trigger, caller, auth expectations, and side effects.
2. Separate request validation, auth checks, business logic, and response shape.
3. Handle secrets only in server-side environment configuration.
4. Design retry, idempotency, and logging strategy for external calls.
5. Consult `references/edge-function-checklist.md` when integration risk is non-trivial.

# Constraints
- Never expose service-role credentials to the client.
- Do not put RLS-sensitive writes in the client if privileged logic is required.
- Keep each function focused on one job.

# Output Format
- Function purpose
- Input/output contract
- Security notes
- Execution flow
- Implementation scaffold

# Examples
- "Build a Supabase Edge Function for Stripe webhook handling."
- "Plan an edge function to generate AI reports."

