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.
npx skills add PostHog/posthog-foss --skill adding-inbound-webhooksgit clone --depth 1 https://github.com/PostHog/posthog-fossWrote 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.
[](https://agentmods.dev/skills/posthog/posthog-foss/adding-inbound-webhooks)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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:
nameis 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.providerandappmust match aProviderSpecsome incarnation declares, andevent_typesmust be a subset of what that app declares. Anything else raisesRegistryErrorwhen the registry is built, rather than sitting there looking registered and never running.handlertakes oneWebhookDeliveryand 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 setsretry_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: PLC0415with 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=...)fromposthog.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-facaderule 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 awebhook_consumers.py, including relative imports. - A consumer whose resources are split across regions declares
ownership=, pointing at a facade function that returns aDeliveryOwnership. Ingress forwards the signed request when the answer isELSEWHERE, and dispatches locally either way. The lookup runs inside the request, so bound it withbounded_statement_timeout(ms, models=...). Let a transient error out of the lookup rather than answeringLOCALorUNDECIDEDthrough it: a lookup that raises asks a provider withretry_statusfor 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.
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.
- 3d ago Changed 54b7f303831a
- 9d ago Changed · -1 lines 95fc36226f9e
- 1mo ago Changed · +1 lines dd5dc2b0552d
- 2mo ago Changed c39dcf36563e
- 2mo ago Changed · +1 lines 56ca6bbb1002
- 2mo ago Changed · +6 lines 1cceebbab2ee
- 2mo ago Changed · +10 lines 6ed0f312dc3d
- 2mo ago Changed · +4 lines c9883bae08dd
- 2mo ago First seen · 93 lines · 178 tokens per session scan A 811320503a20
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.
adding-inbound-webhooks compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| adding-inbound-webhooksPostHog/posthog-foss | Skill | 736 | today | MIT | A | 178 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 6d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | today | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | today | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 707 | yesterday | MIT | A | 105 | Claude Code, Codex |