webhooks
/webhooks
Send and receive Standard Webhooks (x-ccm headers): signatures, replay protection, idempotency, rotation. Use for any webhook.
- Author
- ciro-maciel ↗
- Repository
- ccm-stack ↗
- Licence
- MIT
- Last repository change
- 10.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Send and receive Standard Webhooks (x-ccm headers): signatures, replay protection, idempotency, rotation. Use for any webhook.
Original author description
Send and receive Standard Webhooks (x-ccm headers): signatures, replay protection, idempotency, rotation. Use for any webhook.
How it works
- The message
- Sign (sender)
- Verify (receiver)
- Rules
SKILL.md preview
---
name: webhooks
description: Send and receive Standard Webhooks (x-ccm headers): signatures, replay protection, idempotency, rotation. Use for any webhook.
---
# Webhooks the standard way
Follow [Standard Webhooks](https://www.standardwebhooks.com), the same scheme large API providers use. Anyone who has integrated one of them can integrate yours without reading a special guide.
## The message
Three headers and a JSON body. CCM Stack projects use the `x-ccm` prefix; the spec's default is `webhook-`. Pick one prefix and keep it everywhere.
| Header | Value |
|---|---|
| `x-ccm-id` | Unique event id. The receiver's key against duplicates. |
| `x-ccm-timestamp` | Unix seconds when it was sent. |
| `x-ccm-signature` | `v1,<base64 HMAC-SHA256 of "{id}.{timestamp}.{body}">`. Several values separated by spaces during a secret rotation. |
Body: `{ "type": "post.published", "timestamp": "2026-11-09T12:00:00Z", "data": { ... } }`.
The secret is shown once, starts with `whsec_`, and the part after the prefix is base64.
## Sign (sender)
```js
import { createHmac } from 'node:crypto'
export function sign(secret, id, timestamp, body) {
const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64')
const mac = createHmac('sha256', key).update(`${id}.${timestamp}.${body}`).digest('base64')
return `v1,${mac}`
}
```
## Verify (receiver)
```js
import { createHmac, timingSafeEqual } from 'node:crypto'
export function verify(secret, headers, rawBody, toleranceSeconds = 300) {
const id = headers['x-ccm-id']
const timestamp = Number(headers['x-ccm-timestamp'])
if (!id || Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false
const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64')
const expected = createHmac('sha256', key).update(`${id}.${timestamp}.${rawBody}`).digest()
return (headers['x-ccm-signature'] || '').split(' ').some((part) => {
const [version, value] = part.split(',')
const given = Buffer.from(value || '', 'base64')
return version === 'v1' && given.length === expected.length && timingSafeEqual(given, expected)
})
}
```
## Rules
- **Verify the raw body**, byte for byte, before parsing JSON. Re-serialized JSON breaks the signature.
- **Refuse anything older than 5 minutes** (replay protection), and compare signatures in constant time.
- **Handle each id once.** Store processed ids; a retried event must not charge, send or create twice.
- **Answer 2xx fast** and do the work afterwards. Senders retry on timeouts, with growing delays.
- **Rotate without downtime:** sign with both secrets for a while, then drop the old one.
- **Say what each event type means** in your docs, with one real example body per type.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · ciro-maciel/ccm-stack | 100 | MIT |
| ericrisco/rsc-harness | 100 | MIT |
| vaisala-xweather/xweather-agent-skills | 100 | MIT |
| envigoinnovations/subscriby-agentic-kit | 100 | MIT |
| agile-4/opem-agent-plugin | 100 | MIT |
| nirholas/xactions | 100 | Apache-2.0 |
| claude-dev-suite/claude-dev-suite | 100 | MIT |
| G1Joshi/Agent-Skills | 100 | MIT |
| nahid-sparktales/agent-dispatcher | 90 | MIT |
Database snapshot: 13.11.2026 · package version 1a63abdcc7c7 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100prividium-webhooks
Receive and verify Prividium (ZKsync) webhooks, which follow the Standard Webhooks specification. Use when setting up a Prividium event webhook or address webhook endpoint, storing the whsec_ signing key, debugging webhook-id / webhook-timestamp / webhook-signature verification,… - 100argil-webhooks
Receive and verify Argil (argil.ai) AI avatar video webhooks, signed per Standard Webhooks. Use when setting up an Argil webhook endpoint, getting the whsec_ signing secret from POST /webhooks, debugging webhook-id / webhook-timestamp / webhook-signature verification, or… - 90Linear Webhooks (Verify, Replay, DLQ)
This skill should be used when registering, verifying, or processing Linear webhooks — HMAC signatures, replay protection, idempotency, dead-letter queues. Activates on "linear webhook", "webhook signature", "Linear-Signature", "webhook secret". - 100webhook-handling-verification
Use this skill when receiving, verifying HMAC signatures, and processing third-party webhooks with replay attack prevention. - 100receiving-webhooks
General guidelines for building a robust webhook receiver/handler: verifying signatures, raw-body access, replay protection, async processing, retries and endpoint auto-disabling. Use whenever you write, review, or debug a handler that consumes incoming webhooks from any provider.