Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add martineserios/thebrana --skill webhook-handler-patternsgit clone --depth 1 https://github.com/martineserios/thebranaWrote 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.
[](https://agentmods.dev/skills/martineserios/thebrana/webhook-handler-patterns)<a href="https://agentmods.dev/skills/martineserios/thebrana/webhook-handler-patterns"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/webhook-handler-patterns/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.
<a href="https://agentmods.dev/skills/martineserios/thebrana/webhook-handler-patterns"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/webhook-handler-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.00677 |
| Opus 5.5 | $0.00021 | $0.00271 |
| Sonnet 5.5 | $0.00010 | $0.00135 |
| Haiku 4.5 | $0.00005 | $0.00068 |
Grade A, and why
webhook-handler-patterns scanned grade A with 0 findings 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Webhook Handler Patterns
When to Use This Skill
- Following the correct webhook handler order (verify → parse → handle idempotently)
- Implementing idempotent webhook handlers
- Handling errors and configuring retry behavior
- Understanding framework-specific gotchas (raw body, middleware order)
- Building production-ready webhook infrastructure
Resources
Handler Sequence
- references/handler-sequence.md (upstream
references/handler-sequence.md, not installed locally) - Verify first, parse second, handle idempotently third
Best Practices
- references/idempotency.md (upstream
references/idempotency.md, not installed locally) - Prevent duplicate processing - references/error-handling.md (upstream
references/error-handling.md, not installed locally) - Return codes, logging, dead letter queues - references/retry-logic.md (upstream
references/retry-logic.md, not installed locally) - Provider retry schedules, backoff patterns
Framework Guides
- references/frameworks/express.md (upstream
references/frameworks/express.md, not installed locally) - Express.js patterns and gotchas - references/frameworks/nextjs.md (upstream
references/frameworks/nextjs.md, not installed locally) - Next.js App Router patterns - references/frameworks/fastapi.md (upstream
references/frameworks/fastapi.md, not installed locally) - FastAPI/Python patterns
Quick Reference
Handler Sequence
- Verify signature first — Use raw body; reject invalid requests with 4xx.
- Parse payload second — After verification, parse or construct the event.
- Handle idempotently third — Check event ID, then process; return 2xx for duplicates.
Response Codes
| Code | Meaning | Provider Behavior |
|---|---|---|
2xx |
Success | No retry |
4xx |
Client error | Usually no retry (except 429) |
5xx |
Server error | Retry with backoff |
429 |
Rate limited | Retry after delay |
Idempotency Checklist
- Extract unique event ID from payload
- Check if event was already processed
- Process event within transaction
- Store event ID after successful processing
- Return success for duplicate events
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.
- 1mo ago First seen · 69 lines · 52 tokens per session scan A 07eb771a3753
webhook-handler-patterns is a skill published in the GitHub repository martineserios/thebrana (3 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 677 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
webhook-subscriptions
Design, implement, and debug webhook integrations with security and reliability.
webhook
Webhook receiver patterns — HMAC signature verification, idempotency, retry handling, delivery guarantees, dead-letter logging, and local testing with ngrok or smee.
background-task
Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.
channel-bot
Work with messaging-channel bots (Telegram / Slack) — register a bot, route inbound messages through the AI agent, handle webhooks vs polling, or add a new channel adapter. Use when wiring chat into a messaging platform or debugging bot delivery.
express
Build Express.js routers and middleware with request validation, async error handling, and clear application structure.
axum-docs
Axum 0.8.9 — Rust web framework. Routing, extractors, middleware (Tower), state, WebSocket, SSE, testing.