home / skills / jeremylongshore / claude-code-plugins-plus-skills / supabase-webhooks-events
/plugins/saas-packs/supabase-pack/skills/supabase-webhooks-events
This skill helps you secure and process Supabase webhooks by implementing signature verification, event handlers, and idempotency for reliable notifications.
npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill supabase-webhooks-eventsReview the files below or copy the command above to add this skill to your agents.
---
name: supabase-webhooks-events
description: |
Implement Supabase webhook signature validation and event handling.
Use when setting up webhook endpoints, implementing signature verification,
or handling Supabase event notifications securely.
Trigger with phrases like "supabase webhook", "supabase events",
"supabase webhook signature", "handle supabase events", "supabase notifications".
allowed-tools: Read, Write, Edit, Bash(curl:*)
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---
# Supabase Webhooks Events
## Prerequisites
- Supabase webhook secret configured
- HTTPS endpoint accessible from internet
- Understanding of cryptographic signatures
- Redis or database for idempotency (optional)
## Instructions
### Step 1: Register Webhook Endpoint
Configure your webhook URL in the Supabase dashboard.
### Step 2: Implement Signature Verification
Use the signature verification code to validate incoming webhooks.
### Step 3: Handle Events
Implement handlers for each event type your application needs.
### Step 4: Add Idempotency
Prevent duplicate processing with event ID tracking.
## Output
- Secure webhook endpoint
- Signature validation enabled
- Event handlers implemented
- Replay attack protection active
## Error Handling
See `{baseDir}/references/errors.md` for comprehensive error handling.
## Examples
See `{baseDir}/references/examples.md` for detailed examples.
## Resources
- [Supabase Webhooks Guide](https://supabase.com/docs/webhooks)
- [Webhook Security Best Practices](https://supabase.com/docs/webhooks/security)
This skill implements Supabase webhook signature validation and secure event handling for Python services. It provides a clear pattern for validating incoming requests, wiring event handlers, and preventing replay or duplicate processing. Use it to harden webhook endpoints and reliably process Supabase event notifications.
The skill verifies the HMAC signature attached to each incoming Supabase webhook request against a configured webhook secret. After validation, it parses the event payload and dispatches to typed handlers for each event name. Optional idempotency tracking (Redis or database) ensures the same event ID is not processed more than once.
What if an event arrives without a signature?
Reject the request with an HTTP 400/401 and log the attempt. Treat unsigned requests as malicious.
How do I prevent duplicate processing?
Store the Supabase-provided event ID in Redis or your database with a TTL. Skip processing when the ID already exists.