routing-outbound-api-calls

routing-outbound-api-calls is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 180 tokens per session (3,084 once invoked), scanned A, original, MIT.

A set of rules for routing Python code that calls third-party web APIs. It covers shared request budgets, credentials, rate limits, and request tracking in PostHog.

In plain words
What is it for?
Use it before adding or changing vendor HTTP or SDK calls, scraping or enrichment services, or domains under PostHog's outbound-call directory.
Why use it?
It prevents duplicate API clients and helps keep external calls within their ownership, rate, and monitoring rules.

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 Use it before adding or changing vendor HTTP or SDK calls, scraping or enrichment services, or domains under PostHog's outbound-call directory.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/routing-outbound-api-calls
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 routing-outbound-api-calls
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 routing-outbound-api-calls

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/routing-outbound-api-calls/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/routing-outbound-api-calls)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/routing-outbound-api-calls"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/routing-outbound-api-calls/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 routing-outbound-api-calls

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/routing-outbound-api-calls"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/routing-outbound-api-calls.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 180 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,084 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.00180 $0.03084
Opus 5.5 $0.00072 $0.01234
Sonnet 5.5 $0.00036 $0.00617
Haiku 4.5 $0.00018 $0.00308

Measured today against content hash bc6f670b09f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

routing-outbound-api-calls 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 today.

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/routing-outbound-api-calls/SKILL.md · 120 lines

How it starts

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

Routing outbound API calls

posthog/egress/ owns every outbound third-party API call outside the data warehouse sources, whoever owns the credential, and the shared budgets those sources draw on. posthog/egress/README.md is the reference for the mechanisms, and each domain's own README.md holds the facts about that API. This skill holds the procedure and the traps.

Route first

Situation Route
A vendor calls PostHog (an inbound webhook) /adding-inbound-webhooks
A secret-URL webhook (a Slack incoming webhook, an interactivity response_url) Out of scope. The URL is the credential, so it must never become a metric label.
Throttling requests that reach PostHog's own API posthog/rate_limit.py, not egress
A budget that needs burst capacity, refunds, or a real per-caller Retry-After /using-redis-token-buckets
A data warehouse source under products/warehouse_sources/sources/<vendor>/ Keep the client in the vendor folder, built on the sources SDK, so the PR stays vendor-only. Use egress only when PostHog owns the credential or several PostHog jobs share the quota. Then the vendor imports the domain's helper from the SDK, as slack_request is imported. The domain or the SDK re-export lands first in its own PR, and the data warehouse team decides. See /implementing-warehouse-sources.
A warehouse source outside the vendor folders calls an API that has a domain Call <domain>_request with a tracked session whose adapter retries are off (make_tracked_session(retry=Retry(total=0))), as the GitHub source does, and retry above that call. Adapter retries would resend after admission, outside the budget and the metrics.
A domain for the API exists. Check ls posthog/egress/*/README.md, and search for the API's host Call its <domain>_request helper or typed client. Read its README for identity and lanes. Never add a second client.
Any other new third-party API. Pick the base with the rows below New domain under posthog/egress/, from the first call
PostHog owns the credential, and the vendor publishes a request limit or bills per call Gated domain: EgressClient, or AsyncEgressClient for an aiohttp client
PostHog owns the credential, and the vendor publishes no request limit that a rate budget can model Record-only domain: RecordedEgressClient
The customer owns the credential, and other PostHog work can draw on the same vendor quota at the same time, a second job of the same feature included Gated domain. Every attempt goes through the gate, because pacing inside one caller cannot see the others. See Identity below for the scope.
The customer owns the credential, and no other PostHog work draws on the same quota Record-only domain. The caller honors 429 and Retry-After.

Read the full file on GitHub · 120 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. today Changed · +4 lines bc6f670b09f2
  2. yesterday Changed · +10 lines · +17 tokens per session 2961a0370ddb
  3. 22d ago Changed e8a6f16e0a9f
  4. 2mo ago Changed d36b7848fb54
  5. 2mo ago Changed · +1 lines ea58d596a4fd
  6. 2mo ago First seen · 105 lines · 163 tokens per session scan A fec7190a6f4c

Subscribe to this mod's changes

routing-outbound-api-calls is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 180 tokens to every session and 3,084 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

routing-outbound-api-calls compared with skills from other repositories

routing-outbound-api-calls next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
routing-outbound-api-callsPostHog/posthog-fossSkill736todayMITA180Claude 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