Writing Supabase Edge Functions
Created by CodeCraft LLCBuild, advise on, and review Supabase Edge Functions
Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.
by Jace (@jamick)v1.7.2 · updated 2026-12-01Report copyright infringement
Description
Build, advise on, and review Supabase Edge Functions — Deno runtime and imports (npm and jsr specifiers, per-function deno.json), Deno.serve handlers, JWT verification (platform verify_jwt vs verifying claims in code), creating Supabase clients with the caller's token so RLS applies, secrets management, CORS and preflight, webhooks with signature verification and no-JWT mode, background work (EdgeRuntime.waitUntil), timeouts and resource limits, local serve/test, deploy, logging, and keeping Deno code separate from the Node app's tooling. Use whenever supabase/functions exists, the user writes or debugs an Edge Function, receives a webhook in Supabase, sees CORS or 401 errors calling a function, or deploys functions.
Included with all-access
$9.00 one-time, permanent access
or
Buy 2 or more together for up to 40% off · View cart
You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms
Official and free skills are included with the all-access subscription
Changelog
Subscribers also see which files changed in each version.
v1.7.2Dec 1, 2026Latest
Changed
- README **Sources**: links now point at the publisher's openly licensed GitHub copy of the same docs (CC BY 4.0, Apache 2.0, MIT or the W3C Software and Document License), so the skill rests on the open license rather than the website's terms of use.
v1.7.1Dec 1, 2026
Added
- README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.7.0Nov 30, 2026
Fixed
- Legacy
anon/service_rolekeys: Supabase's migration guide now says they are deprecated in early 2027, not by the end of 2026. - Logs through the MCP server use
query_logs; there is noget_logstool (Supabase MCP docs).
Added
- A new key that passes
verify_jwtas Bearer is still unauthenticated; authorize in code. - Supabase CLI 3:
functions deployandsecrets set/unsetneed--yeswhen unattended, added only for a command the user approved; checklist item for CI deploy steps. - Framework bridges: requirements (
@supabase/server1.6.0+, Node 22+),withRequiredClaims()forauth: 'user'and notwithClaims().
v1.6.0Nov 22, 2026
Fixed
- Platform env vars:
SUPABASE_PUBLISHABLE_KEYS/SUPABASE_SECRET_KEYSare JSON objects keyed by key name (['default']); the single-keySUPABASE_PUBLISHABLE_KEY/SUPABASE_SECRET_KEYvariables this skill listed don't exist (Supabase environment variables docs).
Added
- The platform's
verify_jwtonly understands legacy JWTs: functions called with the new keys setverify_jwt = falseand authorize in code; callers send keys inapikey. - Calls from the database (
pg_net, Database Webhooks): key or shared secret in a header, read from Vault. - Commit each function's
verify_jwtinsupabase/config.toml, not only as a deploy flag. - Supabase MCP server for checking deployed functions and logs (offered read-only, scoped).
- Checklist items for the above; pitfalls for an empty key and
Invalid JWTafter the switch.
v1.5.0Nov 20, 2026
Added
- Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.4.0Nov 6, 2026
Changed
- Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.3.0Nov 4, 2026
Changed
- Review report rule at the top of the skill, loaded before any review: one entry per finding as
Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.2.1Oct 31, 2026
Changed
- References updated for renamed skills:
supabaseis nowsupabase-platform,eas-workflowsis noweas-workflows-ci,skill-creatoris nowskill-creator-aiskillz.
v1.2.0Oct 30, 2026
Added
@supabase/middleware1.0: composing functions withpipeline([...]),withSupabase(config)as a pipeline entry, built-inwithCors, and the@supabase/server/middleware/*pieces (stable from@supabase/server1.9.0).- Pitfall and checklist item: the Hono, H3, Elysia and NestJS adapters in
@supabase/serverare deprecated and removed on 2026-12-01; use framework bridges.
Changed
authmodes: named publishable keys ('publishable:<name>'), the'secret:*'wildcard, and first-match-wins ordering for arrays withctx.authMode; checklist item added.
Fixed
- CORS rule and checklist item accept
withCors(preferred) or hand-written headers, matching the middleware guidance. - Version pinning stated once: docs import
@1;deno.jsonpins an exact version, at least 1.9.0 for@supabase/server/middleware/*. - Removed the duplicate
authModemention. - Adapter-removal pitfall notes that framework bridges change the
ctxshape (userClaims.idbecomesjwtClaims.sub).
v1.1.0Oct 3, 2026
Changed
- Checked against the official documentation (October 2026).
- Added the
@supabase/serverwithSupabasewrapper with itsauthmodes and caller-scoped clients. - Added the new platform environment variables (
SUPABASE_PUBLISHABLE_KEYS,SUPABASE_SECRET_KEYS,SUPABASE_JWKS) and the legacy key retirement. - Added 2 pitfalls and 4 review checklist items.
v1.0.1Oct 3, 2026
Changed
- Renamed the title to describe what the skill does with the product, so it doesn't read as an official or endorsed edition.
- Added a trademark notice to the README.
v1.0.0Oct 2, 2026
Added
- First release.