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 querying-production-databasesgit 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/querying-production-databases)<a href="https://agentmods.dev/skills/posthog/posthog-foss/querying-production-databases"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/querying-production-databases/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/querying-production-databases"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/querying-production-databases.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.00175 | $0.03360 |
| Opus 5.5 | $0.00070 | $0.01344 |
| Sonnet 5.5 | $0.00035 | $0.00672 |
| Haiku 4.5 | $0.00017 | $0.00336 |
Grade A, and why
querying-production-databases 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 13d 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 — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Querying production databases
PostHog runs two separate instances: US and EU.
Each one has an internal project that holds direct-connect SQL sources: read-only, live connections to that region's production ClickHouse and Postgres.
execute-sql with a connectionId sends a query to one of these sources and returns the rows.
Staff work from one place, US team 2, through the PostHog MCP:
- US sources are in team 2, so the MCP queries them directly.
- EU sources are in the EU instance, which a US login cannot reach.
A personal PostHog connection links your EU login to US team 2.
posthog-connection-callthen runs the same tools in the EU project, as your EU user.
flowchart LR
agent{{Agent}} --> mcp[PostHog MCP<br/>US team 2]
mcp -->|execute-sql + connectionId| us[(US direct-connect sources<br/>ClickHouse, Postgres)]
mcp -->|posthog-connection-call| eu[EU internal project<br/>as your EU login]
eu -->|execute-sql + connectionId| eus[(EU direct-connect sources<br/>ClickHouse, Postgres)]
classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000;
class agent,mcp,eu phBlue;
class us,eus phGray;
One-time setup
1. Point the MCP at US team 2
Authenticate the PostHog MCP against US cloud.
If the session starts in another project, run switch-project to team 2.
2. Connect your EU login to US team 2
Do this in the US app, while team 2 is the current project. The connection belongs to the project you are in when you create it.
- Open Account settings → Personal integrations → PostHog project (
/settings/user-personal-integrations). The section needs thePOSTHOG_CONNECTfeature flag. - Click Connect a PostHog project.
- Set the region to European Union (EU).
- Select only these scopes:
queryread,external_data_sourceread anduserread. Do not pick a preset.userread lets the connection read your EU user, which is how it finds the EU project. - In a separate tab, open
eu.posthog.comand switch your current project to the EU internal project that holds the direct-connect sources. The connection reads your current EU project to find its name and organization. If your current EU project is a different one, such as a demo project,targetcan fail to read the project you pick in step 6. - Click Connect EU, sign in with your EU login, and choose only that EU internal project on the consent screen. The connection can use only the projects you pick there.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 13d ago Changed cdb0296152d6
- 17d ago Changed · +43 lines 81d5587e0856
- 20d ago Changed · +18 lines 5151195f4626
- 1mo ago First seen · 158 lines · 175 tokens per session scan A aec580edb00b
querying-production-databases is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 175 tokens to every session and 3,360 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-10-28.
querying-production-databases compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| querying-production-databasesPostHog/posthog-foss | Skill | 736 | today | MIT | A | 175 | Claude Code, Codex |
| alloydb-basicsgoogle/skills | Skill | 26k | today | Apache-2.0 | A | 72 | Claude Code, Codex |
| postgresql-table-designwshobson/agents | Skill | 43k | yesterday | MIT | A | 37 | Claude Code |
| db-repairgarrytan/gbrain | Skill | 34k | today | MIT | A | 96 | Claude Code |
| dsqlawslabs/agent-plugins | Skill | 958 | today | Apache-2.0 | A | 247 | Claude Code |
| volcengine-rds-postgresqlbytedance/agentkit-samples | Skill | 496 | yesterday | Apache-2.0 | A | 63 | Claude Code, Codex |
| postgresdbericrisco/rsc-harness | Skill | 707 | yesterday | MIT | A | 91 | Claude Code, Codex |