/supabase-pack:supabase-webhooks-eventsfrom supabase-pack
Implements Supabase database webhooks, pg_net async HTTP, LISTEN/NOTIFY, and Edge Function event handlers with signature verification. Use for event-driven architectures with Supabase.
Ships in supabase-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Choose Database Webhooks/pg_net for configured outbound HTTP, LISTEN/NOTIFY for lightweight database notifications, or Realtime Postgres Changes for UI updates. These mechanisms have different durability, authentication, replay and failure contracts. This skill's concrete signed receiver illustrates accepted inbox INGESTION, not complete business processing or exactly-once delivery.
Native Database Webhooks send the HTTP headers you configure. They do not implicitly generate the custom HMAC protocol below. Do not send a project service-role key to an arbitrary outbound URL as a generic webhook secret. Use a receiver-specific credential or the documented intended gateway identity, kept in an appropriate secret store, with minimal capability and rotation scope.
For the application-owned HMAC example, the sender and receiver BOTH implement the exact raw-byte and timestamp contract. Missing receiver configuration, invalid signature, stale/future timestamp or malformed input is rejected before inbox insertion. Timestamp freshness alone is not durable replay prevention.
The gateway and handler must agree: a JWT-protected Edge Function needs the actual supported gateway authentication identity; an HMAC-only endpoint requires a consciously configured dedicated route that permits that sender and enforces HMAC inside the handler. Do not blindly disable JWT checks on other functions or claim that HMAC headers satisfy JWT verification. A receiver's server-only database key is not an outbound sender credential and must never appear in delivery headers.
Inventory the event source, authorized endpoint, payload fields, producer identity,
retries, timeout, dead-letter path and protected evidence. Review any trigger SQL
before applying it. A Database Webhook payload (type, table, record,
old_record) is not automatically the custom signed inbox envelope. The legacy
Database Webhook reference describes transport
mechanics; its SQL alone does not provide this custom signature/outbox guarantee.
Do not connect an unsigned trigger to the signed receiver and weaken verification
to make it pass.
Use the bounded receiver and explicit inbox schema with the matching sender/verifier. The producer supplies a unique event ID for each distinct event and retains it across retries. The receiver authenticates raw bytes before strict JSON/schema validation, then attempts one unique-key insert. No SELECT-then-side-effect-INSERT sequence and no row-ID/type-derived deduplication key is used.
202 means accepted into the inbox, with processingComplete: false. 409 means the
ID already exists and requires producer-receipt reconciliation, not proof of
completed effects or identical payload. A lost response after commit requires
reconciliation of that SAME ID. Build a separate authorized worker with durable
lease/retry/dead-letter and effect-idempotency semantics before enabling business
actions. No executable business stub is supplied here.
LISTEN/NOTIFY is not a persistent queue. Its payload size has a strict byte limit; oversized payloads fail rather than being safely truncated. Send minimal IDs and re-read authorized state. Realtime subscriptions similarly need correct user/RLS and publication setup plus reconciliation after reconnect. Do not log changed rows or infer guaranteed event recovery from a successful subscription.
See notification and Realtime mechanics, reviewing authentication, lifecycle cleanup and evidence boundaries for the actual application before adopting any example.
| Observation | Required check |
|---|---|
| HTTP 401/403 | Match actual gateway and handler authentication; never bypass verification to resolve it |
| Missing HMAC configuration | Fail closed; do not insert or acknowledge acceptance |
| Duplicate event ID | Reconcile durable producer/inbox receipts; do not invent a new ID for the retry |
| Inbox error/timeout | No completed-effects claim; reconcile possible commit before retry |
| Realtime silence | Check identity, policies, publication, connectivity and reconciliation |
| NOTIFY oversize | Reduce to IDs; no truncation guarantee |
Review worker authorization, durable delivery/processing receipts, replay horizons and failure recovery before enabling side effects or claiming production readiness.
references/database-webhooks.md (opens in a new tab)references/edge-function-receivers.md (opens in a new tab)references/errors.md (opens in a new tab)references/event-handler-pattern.md (opens in a new tab)references/examples.md (opens in a new tab)references/listen-notify-realtime.md (opens in a new tab)references/signature-verification.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
30 skills in this plugin
/supabase-advanced-troubleshootingDeep Supabase diagnostics: pg_stat_statements for slow queries, lock debugging
with pg_locks, connection leak detection, RLS policy conflicts, Edge Function
cold starts, and Realtime connection drop analysis.
Use when standard troubleshooting fails, when investigating performance
regressions, when debugging race conditions, or when building evidence for a
Supabase support escalation.
Trigger with "supabase deep debug", "supabase slow query", "supabase lock
contention", "supabase connection leak", "supabase RLS conflict", "supabase
cold start".
/supabase-architecture-variantsUse when choosing how to integrate Supabase into a specific stack — setting up
Next.js SSR auth flows, wiring an SPA or React Native client, configuring mobile
deep links, or designing multi-tenant data isolation. Covers where the client runs
(browser vs server) and which key it uses (anon respects RLS, service_role bypasses it).
Trigger with phrases like "supabase next.js", "supabase SSR", "supabase react native",
"supabase SPA", "supabase serverless", "supabase multi-tenant", "supabase server component",
"supabase architecture", "supabase service_role server".
/supabase-auth-storage-realtime-coreImplement Supabase Auth (signUp, signIn, OAuth, session management), Storage (upload, download, signed URLs, bucket policies), and Realtime (Postgres changes, broadcast, presence). Use when building user auth flows, file upload features, or live-updating UIs with Supabase. Trigger with phrases like "supabase auth", "supabase storage upload", "supabase realtime subscribe", "supabase oauth", "supabase file upload", "supabase presence", "supabase rls storage". /supabase-ci-integrationConfigure Supabase continuous-integration and deployment pipelines with
GitHub Actions: link projects, push migrations, deploy Edge Functions,
generate types, and run tests against local Supabase instances.
Use when setting up CI pipelines for Supabase, automating database
migrations, deploying Edge Functions in CI, or running integration tests.
Trigger with phrases like "supabase CI", "supabase GitHub Actions",
"supabase deploy pipeline", "CI supabase migrations", "supabase preview branches".
/supabase-common-errorsDiagnose and fix Supabase errors across PostgREST, PostgreSQL, Auth, Storage, and Realtime.
Use when encountering error codes like PGRST301, 42501, 23505, or auth failures.
Use when debugging failed queries, RLS policy violations, or HTTP 4xx/5xx responses.
Trigger with "supabase error", "fix supabase", "PGRST", "supabase 403", "RLS not working",
"supabase auth error", "unique constraint", "foreign key violation".
/supabase-cost-tuningOptimize Supabase costs through plan selection, database tuning, storage cleanup,
connection pooling, and Edge Function optimization.
Use when analyzing Supabase billing, reducing costs, right-sizing compute,
or implementing usage tracking and budget alerts.
Trigger with phrases like "supabase cost", "supabase billing",
"reduce supabase costs", "supabase pricing", "supabase expensive", "supabase budget".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin supabase-packOther plugins' skills for the same job