Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

wordpress-com-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive WordPress.com webhooks (Settings -> Webhooks, the native /wp-admin/options-general.php?page=webhooks feature). Use when building a WordPress.com…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

WordPress.com Webhooks

WordPress.com (Automattic's hosted WordPress service) has a native webhooks feature under Settings → Webhooks, documented at wordpress.com/support/webhooks/. An admin picks an action (the hook), ticks the fields to include, and enters a URL. When the action fires, WordPress.com POSTs the selected fields to that URL.

Three things make this unlike most providers in this repo:

  1. The deliveries are UNSIGNED. No HMAC, no signature header, no secret, no timestamp, no token, no custom headers, no handshake. The docs describe only three inputs — action, fields, URL — and nothing to verify.
  2. The body is a flat form-encoded key/value set, not a JSON envelope. No type, no data object, no event id. The discriminator is the hook field, whose value is the action name.
  3. Only the fields the admin ticked are sent. Every field is optional except hook — never assume a field is present, and every value arrives as a string.

Not to be confused with

This skill Something else
WordPress.com Settings → Webhooks (this skill) WooCommerce — different product, signed with X-WC-Webhook-Signature (HMAC-SHA256, base64). Use woocommerce-webhooks. Never borrow its header or verifier.
WordPress.org plugins (WP Webhooks, HookPress, …) — separate software, separate formats. The docs say: "The Webhook settings mentioned on this page do not apply to plugin-enabled sites. Various plugins offer similar functionality."
The WordPress.com REST API (public-api.wordpress.com) — an API you call, not webhooks you receive. Useful here only for re-fetching authoritative data.
Jetpack Forms webhooks — a separate per-form feature, also unsigned. See references/overview.md.

When to Use This Skill

  • How do I receive WordPress.com webhooks?
  • How do I verify a WordPress.com webhook signature? (You cannot — there is none.)
  • Why is req.body / await request.json() empty for my WordPress.com webhook? (It is application/x-www-form-urlencoded, not JSON.)
  • How do I handle publish_post, publish_page, and comment_post?
  • How do I secure an unsigned WordPress.com webhook endpoint?
  • Why does publish_post fire repeatedly for the same post ID?
  • Is X-WC-Webhook-Signature a WordPress.com header? (No — that is WooCommerce.)

Verification (core): there is none — use a URL token

WordPress.com signs nothing, so do not write an HMAC verifier and do not check for an invented header such as X-WordPress-Signature, X-WP-Signature or X-WPCOM-Signature. None of those exist, and WordPress.com publishes no source-IP allowlist for this feature.

The real control is channel-level: register the endpoint with a long random secret in the query string and compare it in constant time, failing closed when it is not configured.

const crypto = require('crypto');

// NOT a WordPress.com signature — a token YOU put in the registered URL
// (https://example.com/webhooks/wordpress-com?token=<random>) and compare on
// the way back in. Throws when unset so the endpoint fails CLOSED (500), never
// open. The docs neither mention nor forbid query strings in the webhook URL.
function verifyUrlToken(provided) {
  const expected = process.env.WORDPRESS_COM_WEBHOOK_TOKEN;
  if (!expected) throw new Error('WORDPRESS_COM_WEBHOOK_TOKEN is not set');
  if (typeof provided !== 'string') return false;
  const a = Buffer.from(provided);
  const b = Buffer.from(expected);
  // Length-guard first: timingSafeEqual throws on a length mismatch.
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

The token is visible to every site admin and may appear in proxy logs — rotate it if exposed. Pair it with HTTPS, and treat the payload as an untrusted hint: re-fetch authoritative data before doing anything consequential.

curl https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.com/posts/123

With Hookdeck, the Hookdeck Source URL is the secret endpoint; WordPress.com sends no signature, so there is nothing for Hookdeck to check. Verify Hookdeck's own x-hookdeck-signature (HMAC-SHA256, base64, over the raw forwarded body) on the request Hookdeck delivers to your app — that signature is Hookdeck's, not WordPress.com's. See references/verification.md.

The Payload: flat, form-encoded, all strings

POST /webhooks/wordpress-com?token=<random> HTTP/1.1
Content-Type: application/x-www-form-urlencoded

hook=publish_post&ID=42&post_title=Hello+world&post_status=publish&post_url=https%3A%2F%2Fexample.wordpress.com%2F
Полный SKILL.md на GitHub

Установить wordpress-com-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/wordpress-com/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл wordpress-com-webhooks?

Receive WordPress.com webhooks (Settings -> Webhooks, the native /wp-admin/options-general.php?page=webhooks feature). Use when building a WordPress.com webhook receiver, because these deliveries are UNSIGNED: there is no HMAC, no signature header, no secret, no timestamp and no handshake, and the body is a FLAT application/x-www-form-urlencoded set of key/value pairs whose only discriminator is the `hook` field (`publish_post`, `publish_page`, `comment_post`). Use when wiring express.urlencoded / request.formData() / await request.form(), protecting an unsigned endpoint with a query-string token, or deduping repeated publish_post deliveries. NOT WooCommerce (X-WC-Webhook-Signature) and not a WordPress.org plugin.

Как установить скилл wordpress-com-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл wordpress-com-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить wordpress-com-webhooks с