webhooks
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Webhooks architecture assistance covering HMAC signature verification, idempotent delivery, exponential backoff retries, and ingestion queues. Use when building webhook consumers, sending webhook notifications to third parties, or processing asynchronous event callbacks.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- Leostruka/devin-bundletheir own version, first seen Nov 1, 2026
- oidsdev/honeypottheir own version, first seen Oct 15, 2026
- editframe/skillstheir own version, first seen Oct 13, 2026
- ayrshare/ayrshare-social-media-api-claude-plugintheir own version, first seen Oct 13, 2026
- oa2p-solutions/ecommerce-foundationstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use data-pipelines, incident-response and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
YepAPISkilldata-pipelines
ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 3 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- nirholas/XActions★ 648same name
- kid-sid/claude-spellbook★ 190same name
- joelhooks/joelclaw★ 65same name
- nahid-sparktales/agent-dispatcher★ 59same name
- suhailkakar/the-skills★ 26same name
- ayrshare/ayrshare-social-media-api-claude-plugin★ 19same name
- editframe/skills★ 19same name
- khadinakbarlabs/shopify-app-builder★ 2same name
- zedarvates/frugal-skills★ 1same name
- Abdox-menara/guard-skills★ 0same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 119
Check incoming delivery event IDs against a fast cache or database before executing business logic:
- Distinctive: line 145
Verify Signatures Using Raw Unparsed Request Bodies: Never verify HMAC signatures on parsed JSON objects.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Webhooks
Webhooks are "user-defined HTTP callbacks". They are triggered by some event in a source system (e.g., Stripe, GitHub) and sent to a destination system (Your API) to notify it.
When to Use
- Third-Party Event Notification: Consuming real-time notifications from payment providers (Stripe), Git hosts (GitHub), and SaaS platforms.
- Asynchronous System Integration: Triggering external partner workflows when business events occur in your application.
- Decoupled API Callback Architecture: Notifying long-running asynchronous clients when requested tasks finish without polling.
- Event-Driven Microservice Ingestion: Ingesting incoming webhook events into queue buffers for asynchronous worker processing.
Quick Start
// Your Webhook Handler (Receiver)
app.post(
"/webhooks/stripe",
express.raw({ type: "application/json" }),
(req, res) => {
const signature = req.headers["stripe-signature"];
try {
// Verify the event came from Stripe and hasn't been tampered
const event = stripe.webhooks.constructEvent(
req.body,
signature,
START_SECRET,
);
if (event.type === "payment_intent.succeeded") {
fulfillOrder(event.data.object);
}
res.json({ received: true });
} catch (err) {
res.status(400).send(`Webhook Error: ${err.message}`);
}
},
);Core Concepts
Cryptographic Signature Verification (HMAC-SHA256)
Validates that webhook payloads originate from authentic senders and were not tampered with in transit:
import crypto from "crypto";
export function verifyWebhookSignature(
payload: string,
signatureHeader: string,
secret: string,
): boolean {
const expectedSignature = crypto
.createHmac("sha256", secret)
.update(payload)
.digest("hex");
// Constant-time comparison prevents timing attacks
return crypto.timingSafeEqual(
Buffer.from(signatureHeader),
Buffer.from(expectedSignature),
);
}Instant 200 OK Acknowledgment with Ingestion Queues
Acknowledge incoming webhooks immediately (< 500ms) and offload heavy processing to background queues:
app.post(
"/webhooks/stripe",
express.raw({ type: "application/json" }),
async (req, res) => {
const signature = req.headers["stripe-signature"] as string;
if (
!verifyWebhookSignature(req.body.toString(), signature, WEBHOOK_SECRET)
) {
return res.status(400).send("Invalid signature");
}
// Push to Redis queue immediately
await webhookQueue.add(
"process-stripe-event",
JSON.parse(req.body.toString()),
);
res.status(200).send("Received");
},
);Exponential Backoff Retry Strategy
Senders automatically retry failed delivery attempts with exponential delay:
Attempt 1: Immediately
Attempt 2: 15 seconds later
Attempt 3: 1 minute later
Attempt 4: 15 minutes later
Attempt 5: 1 hour later -> DLQCommon Patterns
Idempotent Webhook Processing with Deduping
Problem: Webhook providers retry delivery on timeout, causing duplicate state changes or double processing.
Solution: Check incoming delivery event IDs against a fast cache or database before executing business logic:
import { Request, Response } from "express";
export async function handleWebhook(req: Request, res: Response) {
const eventId = req.headers["x-webhook-id"] as string;
const isDuplicate = await redisClient.set(`webhook:${eventId}`, "1", {
NX: true,
EX: 86400, // 24-hour expiration
});
if (!isDuplicate) {
return res.status(200).json({ status: "already_processed" });
}
// Enqueue for asynchronous background worker processing
await taskQueue.add("process-event", req.body);
return res.status(202).json({ status: "accepted" });
}Best Practices
Do:
- Verify Signatures Using Raw Unparsed Request Bodies: Never verify HMAC signatures on parsed JSON objects; whitespace discrepancies break hashes.
- Implement Idempotency Handling: Record incoming webhook event IDs in Redis or database unique indexes to discard duplicates.
- Respond with 200 OK Immediately: Queue the event for background processing; third parties time out after 5-10 seconds.
- Expose Webhook Delivery Logs: Provide dashboard interfaces where customers can view delivery status, response codes, and manual retries.
Don't:
- Perform heavy business logic in the HTTP handler: Long processing times cause webhook timeouts and unnecessary retries.
- Accept webhooks over insecure HTTP: Enforce TLS (HTTPS) on all webhook ingestion endpoints.
- Trust unverified webhook headers: Always use cryptographic signatures rather than relying on IP whitelists alone.
Troubleshooting
| Error | Cause | Solution |
Signature Verification Failed | Body parsing issue. | Ensure you verify the Raw Body, not the parsed JSON object. |
Timeout | Processing taking too long. | Move logic to a background job; return 200 immediately. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

