adding-inbound-webhooks

adding-inbound-webhooks is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 178 tokens per session (2,803 once invoked), scanned A, original, MIT.

A development guide for receiving third-party webhook events in PostHog, including verifying incoming requests and routing events to consumers.

In plain words
What is it for?
It helps add webhook consumers, create provider endpoints when needed, follow the ingress transport contract, and replace hand-written signature checks flagged by static analysis.
Why use it?
It separates adding a consumer for an existing endpoint from adding a new provider endpoint, reducing the risk of using the wrong integration path.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit It helps add webhook consumers, create provider endpoints when needed, follow the ingress transport contract, and replace hand-written signature checks flagged by static analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/adding-inbound-webhooks
Install

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.

Any agent
npx skills add PostHog/posthog-foss --skill adding-inbound-webhooks
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adding-inbound-webhooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/adding-inbound-webhooks/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/adding-inbound-webhooks)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/adding-inbound-webhooks"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/adding-inbound-webhooks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adding-inbound-webhooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/adding-inbound-webhooks"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/adding-inbound-webhooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 178 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00178 $0.02803
Opus 5.5 $0.00071 $0.01121
Sonnet 5.5 $0.00036 $0.00561
Haiku 4.5 $0.00018 $0.00280

Measured 3d ago against content hash 54b7f303831a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adding-inbound-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 3d 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.

.agents/skills/adding-inbound-webhooks/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adding an inbound webhook

Every webhook a third party sends to PostHog goes through posthog/ingress/. Read posthog/ingress/README.md for the transport contract and the package reference. This skill is the decision tree and the checklists.

Which job are you doing?

  • The provider already has an endpoint (see the Endpoints table in posthog/ingress/README.md) and you want to react to its events: add a consumer.
  • No endpoint exists for this third party, or the semgrep rule flagged a hand-rolled verifier: add a provider, then add its consumer.
  • Outbound call to a vendor API, which is the other direction: /routing-outbound-api-calls.

Before you migrate a verifier, read what the existing code verifies with. A verifier the vendor ships in its SDK, or one from a maintained library, stays as it is: it is written by the people who define the scheme, and a reimplementation only adds bugs. Ingress wraps such a verifier at most. Only a hand-rolled hmac check is a migration.

Add a consumer

A product declares its consumers in products/<product>/backend/webhook_consumers.py, in a WEBHOOK_CONSUMERS sequence of WebhookConsumer values from posthog.ingress.contracts. products/stamphog/backend/webhook_consumers.py is the smallest complete example.

WEBHOOK_CONSUMERS = (
    WebhookConsumer(
        name="stamphog_review",
        provider="github",
        app="stamphog",
        event_types=frozenset({"pull_request"}),
        handler=_run_review,
    ),
)

Rules that decide whether this works:

  • name is unique per provider and is part of the dedup cache key. Treat it as fixed once it ships: renaming one lets a redelivery run the consumer a second time.
  • provider and app must match a ProviderSpec some incarnation declares, and event_types must be a subset of what that app declares. Anything else raises RegistryError when the registry is built, rather than sitting there looking registered and never running.
  • handler takes one WebhookDelivery and returns nothing. Its return value is ignored and never decides the HTTP status. A handler that raises does cost the request its receipt when the provider sets retry_status, which is how a consumer whose durable record is written inside the handler gets the delivery again.
  • Keep the module cheap to import. The registry imports it on the first delivery through load_product_modules("webhook_consumers"), so defer heavy imports into the handler behind # noqa: PLC0415 with a reason.
  • The handler runs synchronously inside the request. Enqueue a task for real work, the way stamphog and conversations do.
  • A handler that reads the database wraps the read in bounded_statement_timeout(ms, models=...) from posthog.ingress.dispatch.database, passing only the models the read actually uses. Opening an alias is itself unbounded, so naming one the read never touches can stall the delivery on connection setup.
  • Hoglint's webhook-consumers-use-facade rule lets the module import product backend code only through a facade, its own or another product's. Reach product internals through the facade. The rule covers every product that has a webhook_consumers.py, including relative imports.
  • A consumer whose resources are split across regions declares ownership=, pointing at a facade function that returns a DeliveryOwnership. Ingress forwards the signed request when the answer is ELSEWHERE, and dispatches locally either way. The lookup runs inside the request, so bound it with bounded_statement_timeout(ms, models=...). Let a transient error out of the lookup rather than answering LOCAL or UNDECIDED through it: a lookup that raises asks a provider with retry_status for the delivery again, and a guessed answer receipts a delivery the other region never sees.
  • A GitHub consumer cannot get its project from installation.id, because one installation can link to several projects. Read Picking the project for the two allowed shapes.

Read the full file on GitHub · 114 lines

Changes

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.

  1. 3d ago Changed 54b7f303831a
  2. 9d ago Changed · -1 lines 95fc36226f9e
  3. 1mo ago Changed · +1 lines dd5dc2b0552d
  4. 2mo ago Changed c39dcf36563e
  5. 2mo ago Changed · +1 lines 56ca6bbb1002
  6. 2mo ago Changed · +6 lines 1cceebbab2ee
  7. 2mo ago Changed · +10 lines 6ed0f312dc3d
  8. 2mo ago Changed · +4 lines c9883bae08dd
  9. 2mo ago First seen · 93 lines · 178 tokens per session scan A 811320503a20

Subscribe to this mod's changes

adding-inbound-webhooks is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 178 tokens to every session and 2,803 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-16.

Related

adding-inbound-webhooks compared with skills from other repositories

adding-inbound-webhooks next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
adding-inbound-webhooksPostHog/posthog-fossSkill736todayMITA178Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70k6d agoApache-2.0A217Claude Code, Codex
tao-run-inference-serviceNVIDIA/skillsSkill4.3ktodayApache-2.0A92Claude Code
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.3ktodayMITA78Claude Code
fastapi-router-pymicrosoft/skillsSkill3.3ktodayMITA46Claude Code
dev-runtimelangwatch/langwatchSkill5.1ktodayApache-2.0A172Claude Code
api-designericrisco/rsc-harnessSkill707yesterdayMITA105Claude Code, Codex