Skip to content
Skills Library
Programming · Building & coding

webhooks

/webhooks

Send and receive Standard Webhooks (x-ccm headers): signatures, replay protection, idempotency, rotation. Use for any webhook.

Repository
ccm-stack ↗
Licence
MIT
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

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

  1. The message
  2. Sign (sender)
  3. Verify (receiver)
  4. Rules
Original SKILL.md headings · 59 lines, 346 words
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

RepositoryScoreLicence
This page · ciro-maciel/ccm-stack100MIT
ericrisco/rsc-harness100MIT
vaisala-xweather/xweather-agent-skills100MIT
envigoinnovations/subscriby-agentic-kit100MIT
agile-4/opem-agent-plugin100MIT
nirholas/xactions100Apache-2.0
claude-dev-suite/claude-dev-suite100MIT
G1Joshi/Agent-Skills100MIT
nahid-sparktales/agent-dispatcher90MIT

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.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.