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 agentmods add skills/hookdeck/webhook-skills/cursor-webhooksnpx skills add hookdeck/webhook-skills --skill cursor-webhooksgit clone --depth 1 https://github.com/hookdeck/webhook-skillsWhat 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 | $0.00038 | $0.01435 |
| Opus 5 | $0.00019 | $0.00718 |
| Sonnet 5 | $0.00008 | $0.00287 |
| Haiku 4.5 | $0.00004 | $0.00144 |
Grade A, and why
cursor-webhooks 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 2d 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.
This is a copy
84% identical to adyen-webhooks — 243 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Webhooks
When to Use This Skill
- Setting up Cursor Cloud Agent webhook handlers
- Debugging signature verification failures
- Understanding Cursor webhook event types and payloads
- Handling Cloud Agent status change events (ERROR, FINISHED)
Essential Code (USE THIS)
Cursor Signature Verification (JavaScript)
const crypto = require('crypto');
function verifyCursorWebhook(rawBody, signatureHeader, secret) {
if (!signatureHeader || !secret) return false;
// Cursor sends: sha256=xxxx
const [algorithm, signature] = signatureHeader.split('=');
if (algorithm !== 'sha256') return false;
const expected = crypto
.createHmac('sha256', secret)
.update(rawBody)
.digest('hex');
try {
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
} catch {
return false;
}
}
Express Webhook Handler
const express = require('express');
const app = express();
// CRITICAL: Use express.raw() - Cursor requires raw body for signature verification
app.post('/webhooks/cursor',
express.raw({ type: 'application/json' }),
(req, res) => {
const signature = req.headers['x-webhook-signature'];
const webhookId = req.headers['x-webhook-id'];
const event = req.headers['x-webhook-event'];
// Verify signature
if (!verifyCursorWebhook(req.body, signature, process.env.CURSOR_WEBHOOK_SECRET)) {
console.error('Cursor signature verification failed');
return res.status(401).send('Invalid signature');
}
// Parse payload after verification
const payload = JSON.parse(req.body.toString());
console.log(`Received ${event} (id: ${webhookId})`);
// Handle status changes
if (event === 'statusChange') {
console.log(`Agent ${payload.id} status: ${payload.status}`);
if (payload.status === 'FINISHED') {
console.log(`Summary: ${payload.summary}`);
} else if (payload.status === 'ERROR') {
console.error(`Agent error for ${payload.id}`);
}
}
res.json({ received: true });
}
);
What ships with it
19 files 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.
- examples/express/.env.example 114 B
- examples/express/package.json 435 B
- examples/express/README.md 808 B
- examples/express/src/index.js 3.4 KB runs code
- examples/express/test/webhook.test.js 4.5 KB runs code
- examples/fastapi/.env.example 136 B
- examples/fastapi/main.py 4.0 KB runs code
- examples/fastapi/README.md 1.0 KB
- examples/fastapi/requirements.txt 91 B
- examples/fastapi/test_webhook.py 6.2 KB runs code
- examples/nextjs/.env.example 78 B
- examples/nextjs/app/webhooks/cursor/route.ts 3.2 KB runs code
- examples/nextjs/package.json 523 B
- examples/nextjs/README.md 877 B
- examples/nextjs/test/webhook.test.ts 5.2 KB runs code
- examples/nextjs/vitest.config.ts 137 B runs code
- references/overview.md 1.8 KB
- references/setup.md 1.4 KB
- references/verification.md 3.9 KB
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.
- 2d ago First seen · 190 lines · 38 tokens per session scan A e836c28de743
cursor-webhooks is a skill published in the GitHub repository hookdeck/webhook-skills (84 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 1,435 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to adyen-webhooks, differing in 243 lines, and is treated as a copy.
Other skills, from other repositories
domain-hunter
Search domains, compare prices, find promo codes, get purchase recommendations. Use when user wants to buy a domain, check domain prices, find domain deals, compare registrars, or search for .ai/.com domains.
memstack-content-product-description
Use this skill when the user says 'product description', 'product listing', 'product copy', 'Amazon listing', 'Shopify listing', 'e-commerce copy', or needs conversion-optimized product descriptions with benefit-driven headlines and platform-specific SEO. Do NOT use for pricing strategy or sales funnels.
intuitive-port-worktree
Port changes from one git worktree or checkout into the default repository folder's current branch, then by default sync the result to the remote default branch when everything is clean. Use when the user asks to move, copy, transfer, transplant, cherry-pick, apply a patch, or port worktree changes into the…
form-cro
When the user wants to optimize any form that is NOT signup/registration — lead capture, contact, demo request, application, survey, or checkout forms; "form friction," "form completion rate," "form abandonment," "too many fields," "nobody fills out our form." For signup/registration forms, see signup-flow-cro. For…
git-workflow
Using git without hanging, clobbering, or over-committing. Use before any git command that changes state (commit, push, checkout, rebase, reset) and when inspecting repo history or status.
frappe-payments
Frappe Payments and ERPNext payment workflow guidance for payment gateways, payment requests, subscriptions, invoices, reconciliation, webhooks, and secure checkout flows. Use when work touches payments in Frappe or ERPNext.