memos-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Memos (usememos.com) webhooks, which follow the Standard Webhooks specification when the webhook has a whsec_ signing secret. Use when…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Memos Webhooks
Memos is an open-source, self-hosted note-taking app. Each user can add webhooks in Settings, and Memos POSTs a JSON event to the URL when a memo is created, updated, deleted or commented on. Since v0.30.0 deliveries are signed in the Standard Webhooks format (webhook-id, webhook-timestamp, webhook-signature) whenever the webhook has a signing secret.
When to Use This Skill
- How do I receive Memos webhooks?
- How do I verify a Memos webhook signature (
webhook-signature)? - Where do I find my Memos webhook secret (
whsec_...)? - Why does Memos report my webhook as failed when I return
200 OK? - How do I handle
memos.memo.created,memos.memo.updated,memos.memo.deletedormemos.memo.comment.createdevents? - Why is my Memos webhook arriving unsigned, or failing verification only on retries and replays?
Required Response and Configuration Alert
Memos treats any response that is not 2xx with a JSON body whose code is 0 as a failed delivery. A plain 200 OK with an empty body fails. Every accepted delivery must be answered with HTTP 200 and {"code":0} (the examples do this). The Hookdeck configuration alert for this source reads:
"Generate a signing secret in the Memos webhook edit dialog. Older webhooks are unsigned until you do. Memos treats any response without JSON {"code":0} as failed, so set a custom response with body {"code":0} on this source."
So if you receive through Hookdeck, set a custom response with body {"code":0} on the source. Signing is conditional: Memos only signs when the webhook has a secret. New webhooks get one; older webhooks are unsigned until you generate a secret in the edit dialog. Fail closed in your handler when MEMOS_WEBHOOK_SECRET is not set.
Verification (core)
| Header | Value |
|---|---|
webhook-id |
Unique message ID beginning with msg_. Your idempotency key (the body has no event id) |
webhook-timestamp |
Unix seconds |
webhook-signature |
One or more space-separated v1,<base64> entries |
Signed content is {webhook-id}.{webhook-timestamp}.{raw body}, HMAC-SHA256, base64 output. For a whsec_... secret the key is the base64-decoded part after the prefix; Memos uses any other secret value as its raw bytes. Compare against every v1, entry and ignore other versions. If webhook-id is absent, read svix-id, svix-timestamp and svix-signature instead. The examples use the standardwebhooks library (npm and PyPI):
const { Webhook } = require('standardwebhooks');
// rawBody: exact request body (Buffer or string), NOT re-serialised JSON
function verifyMemos(rawBody, headers, secret = process.env.MEMOS_WEBHOOK_SECRET) {
const p = headers['webhook-id'] ? 'webhook' : 'svix'; // fall back to the svix-* names
const wh = secret.startsWith('whsec_')
? new Webhook(secret)
: new Webhook(Buffer.from(secret, 'utf8'), { format: 'raw' }); // non-whsec_ secret = raw bytes
wh.verify(rawBody, {
'webhook-id': headers[`${p}-id`],
'webhook-timestamp': headers[`${p}-timestamp`],
'webhook-signature': headers[`${p}-signature`],
}, { jsonParse: false }); // throws on a bad signature or stale timestamp → respond 401
}
The library always enforces a fixed 5-minute timestamp window. Hookdeck retries and replays resend the original webhook-timestamp, so the library rejects them once they are more than 5 minutes old. If you receive through Hookdeck and need late retries to pass, use the manual verifier in references/verification.md, which can drop or widen the window. In Express, read the body with express.raw({ type: '*/*' }) so any content type verifies, and parse JSON only after the check.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Event Type and Payload
Memos sends Content-Type: application/json with a JSON object of four fields, and the event name is the top-level activityType:
| Field | Meaning |
|---|---|
url |
The destination URL the webhook was sent to |
activityType |
The event name. Route on this |
creator |
The memo creator's resource name, users/{user} |
memo |
The affected memo, in the API's Memo shape. On comment-created events this is the comment; from 26.11.2 read memo.parent for the memo it replies to (earlier releases put it in memo.relations) |
The docs name activityType, creator and the affected memo; url and the users/{user} format come from Memos's source. Memos publishes no example body and the docs don't list the fields inside memo, so the examples read only activityType and creator. The activityType values below are the strings the 26.11.2 dispatchers pass (unchanged since v0.31.0).
Common Event Typ
Установить memos-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл memos-webhooks?
Receive and verify Memos (usememos.com) webhooks, which follow the Standard Webhooks specification when the webhook has a whsec_ signing secret. Use when setting up a Memos webhook endpoint, debugging webhook-id / webhook-timestamp / webhook-signature verification, replying with the required {"code":0} body, or handling memos.memo.created, memos.memo.updated, memos.memo.deleted and memos.memo.comment.created events.
Как установить скилл memos-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл memos-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic