agentsclimarketplace

Webhooks

Skill G1Joshi/Agent-Skills/skills/architecture/webhooks

Webhooks HTTP callbacks for events. Use for integrations.From its SKILL.md

Install
npx -y skills add G1Joshi/Agent-Skills --skill webhooks

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.6 KB, 547 tokens by cl100k_base, as published. Nobody here has run it

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

  • Payment Confirmations: Stripe notifying you a payment Succeeded.
  • CI/CD: GitHub notifying Jenkins that code was pushed.
  • Async Processing: A 3rd party AI service notifying you that generation is complete.

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

Verification (Security)

Since Webhook endpoints are public, anyone can POST to them. You must verify the Signature (HMAC) usually sent in a header to prove the sender's identity.

Retries

If your server returns an error (500) or times out, the sender usually retries with exponential backoff. Your endpoint must be Idempotent.

Best Practices

Do:

  • Respond Immediately (200 OK). Don't process the business logic in the request. Queue it (SQS/Redis) and process async. If you timeout, the sender will retry.
  • Verify Signatures rigorously.
  • Support Payload Versioning.

Don't:

  • Don't rely on the order of delivery.
  • Don't assume you will receive the event only once (Idempotency is key).

Troubleshooting

ErrorCauseSolution
Signature Verification FailedBody parsing issue.Ensure you verify the Raw Body, not the parsed JSON object.
TimeoutProcessing taking too long.Move logic to a background job; return 200 immediately.

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.