webhook-verifier

webhook-verifier is a skill for Claude Code from Hainrixz/agente-pagokit. It costs 95 tokens per session (1,631 once invoked), scanned A, original, MIT.

A reference guide for checking that payment webhooks are genuine and have not been reused. It documents provider-specific signatures, time limits, replay protection, raw request handling, and required event routing.

In plain words
What is it for?
It is for implementing webhook handlers across supported payment providers and programming frameworks. The documented flow checks the raw request, verifies its signature, blocks replays, routes the event, and returns the appropriate HTTP response.
Why use it?
It helps prevent forged payment notifications, replayed messages, oversized requests, and accidental logging of sensitive payment data. It gives the code-generating tool a consistent verification contract.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/sign-event.js --provider <id> --curl # must return 2xx.

Part of the pagokit plugin — 8 skills, 8 commands, 1 agent, 5 hooks shipped together

Good fit It is for implementing webhook handlers across supported payment providers and programming frameworks. The documented flow checks the raw request, verifies its signature, blocks replays, routes the event, and returns the appropriate HTTP response.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Hainrixz/agente-pagokit
agentmods
npx agentmods add skills/hainrixz/agente-pagokit/webhook-verifier

Made for: Claude Code.

Or install pagokit, the plugin that ships this one along with the rest of its 8 skills, 8 commands, 1 agent, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for webhook-verifier

README.md
[![agentmods](https://agentmods.dev/badge/skills/hainrixz/agente-pagokit/webhook-verifier/github.svg)](https://agentmods.dev/skills/hainrixz/agente-pagokit/webhook-verifier)
Your own site
<a href="https://agentmods.dev/skills/hainrixz/agente-pagokit/webhook-verifier"><img src="https://agentmods.dev/badge/skills/hainrixz/agente-pagokit/webhook-verifier/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for webhook-verifier

Your own site · 80×15
<a href="https://agentmods.dev/skills/hainrixz/agente-pagokit/webhook-verifier"><img src="https://agentmods.dev/badge/skills/hainrixz/agente-pagokit/webhook-verifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,631 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 143
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.01631
Opus 5 $0.00048 $0.00816
Sonnet 5 $0.00019 $0.00326
Haiku 4.5 $0.00010 $0.00163

Measured 6d ago against content hash 9d55f3c35b90, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

webhook-verifier scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

node scripts/sign-event.js --provider <id> --curl # must return 2xx
skills/webhook-verifier/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

webhook-verifier

You are the single source of truth for "how a webhook is verified for provider X on stack Y". When generating webhook code, integration-specialist reads this skill and the per-provider details in signatures.md, and produces a handler that:

  1. Captures the raw request body (NOT parsed).
  2. Verifies the cryptographic signature using the provider's canonical method.
  3. Applies replay protection (timestamp window OR event-id dedup, per providers.json).
  4. Routes the verified event to the appropriate handler.
  5. Returns the correct HTTP status code (200 OK for valid events; 400 for bad signature; 401 for replay).
  6. Caps the body at 256 KB before reading.
  7. Logs only event.id, event.type, event.created — never the full payload.

The verification contract

A correct webhook handler has this shape (language-neutral):

1. Read Content-Length header → if > 256 KB, return 413.
2. Read raw body (bytes, NOT parsed JSON).
3. Read signature header (provider-specific).
4. Verify signature → if invalid, return 400 with no leak about why.
5. Parse JSON from raw body now that signature is verified.
6. Apply replay protection:
   a. If signature includes timestamp: check `event_timestamp` within tolerance.
   b. Otherwise: check event.id against webhook_events_processed table.
7. If duplicate (already processed): return 200 OK (idempotent), do nothing.
8. Dispatch to handler by event.type.
9. Mark event as processed.
10. Return 200 OK.

Raw-body capture per stack (Rule 5)

Next.js App Router — the most common mistake:

// app/api/webhook/<provider>/route.ts
export const runtime = 'nodejs'; // NOT 'edge'

export async function POST(request: Request) {
  const rawBody = await request.text(); // raw string
  const signature = request.headers.get('<signature-header>');
  // pass rawBody (string) to provider's verifier
}

Next.js Pages Router:

// pages/api/webhook/<provider>.ts
export const config = { api: { bodyParser: false } };

import { buffer } from 'micro';

export default async function handler(req, res) {
  const rawBody = await buffer(req); // Buffer
  // pass rawBody.toString() to verifier
}

Read the full file on GitHub · 161 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +14 lines · +12 tokens per session 9d55f3c35b90
  2. 10d ago First seen · 147 lines · 83 tokens per session scan A 2d3b6a580e76

Subscribe to this mod's changes

webhook-verifier is a skill published in the GitHub repository Hainrixz/agente-pagokit (48 stars, last pushed 10d ago), licensed MIT. It adds 95 tokens to every session and 1,631 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories