better-webhook-skill/SKILL.md
Type-safe webhook handler SDK for Node.js. Provides typed events, automatic signature verification, replay protection, and framework adapters for Next.js, Express, Hono, NestJS, and GCP Cloud Functions. Supports GitHub, Ragie, Recall.ai, Stripe, and Resend providers with Zod schema validation. Use when building webhook endpoints, handling provider webhooks, adding webhook signature verification, creating webhook route handlers, or building custom webhook providers.
npx skillsauth add endalk200/better-webhook better-webhookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Type-safe webhook handlers for Node.js with automatic signature verification.
npm install @better-webhook/github @better-webhook/nextjs
// app/api/webhooks/github/route.ts
import { github } from "@better-webhook/github";
import { push, pull_request } from "@better-webhook/github/events";
import { toNextJS } from "@better-webhook/nextjs";
const webhook = github({ secret: process.env.GITHUB_WEBHOOK_SECRET })
.event(push, async (payload) => {
console.log(
`Push to ${payload.repository.full_name}: ${payload.commits.length} commits`,
);
})
.event(pull_request, async (payload) => {
console.log(
`PR #${payload.number} ${payload.action}: ${payload.pull_request.title}`,
);
})
.onError((error, context) => console.error("Webhook error:", error));
export const POST = toNextJS(webhook);
WebhookBuilder registers event handlers, error handlers, instrumentation, replay protection (immutable — each method returns a new instance)| Framework | Adapter Package | Adapter Function |
| ------------------- | ------------------------------- | ----------------------------------------- |
| Next.js 13-16 | @better-webhook/nextjs | toNextJS(webhook) |
| Express 4-5 | @better-webhook/express | toExpress(webhook) |
| Hono 4 | @better-webhook/hono | toHono(webhook) / toHonoNode(webhook) |
| NestJS 9-11 | @better-webhook/nestjs | toNestJS(webhook) |
| GCP Cloud Functions | @better-webhook/gcp-functions | toGCPFunction(webhook) |
| Webhook Source | Provider Package | Factory Function |
| -------------- | ------------------------ | ----------------------- |
| GitHub | @better-webhook/github | github(options?) |
| Ragie | @better-webhook/ragie | ragie(options?) |
| Recall.ai | @better-webhook/recall | recall(options?) |
| Stripe | @better-webhook/stripe | stripe(options?) |
| Resend | @better-webhook/resend | resend(options?) |
| Custom | @better-webhook/core | customWebhook(config) |
Secrets are resolved in this order (first non-empty wins):
toNextJS(webhook, { secret: "..." })github({ secret: "..." })GITHUB_WEBHOOK_SECRET (pattern: {PROVIDER}_WEBHOOK_SECRET)WEBHOOK_SECRET (generic fallback)@better-webhook/core when you need custom providers, replay store types, helper utilities, or custom instrumentation types@better-webhook/{provider}/events for tree-shakingexpress.raw({ type: 'application/json' }) middleware on the webhook routerawBody: true in NestFactory.create options.instrument(...), not on adapters.event(), .onError(), .instrument(), .withReplayProtection(), and .maxBodyBytes() all return new instances@better-webhook/otel for OpenTelemetry traces and metricsonSuccesscreateOpenTelemetryInstrumentation() emits one processing span per request by defaulteventType, deliveryId, and replayKey attributes are opt-in because they can raise cardinalityimport { github } from "@better-webhook/github";
import { push } from "@better-webhook/github/events";
import { createOpenTelemetryInstrumentation } from "@better-webhook/otel";
const webhook = github()
.instrument(
createOpenTelemetryInstrumentation({
includeEventTypeAttribute: true,
}),
)
.event(push, handler);
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.