analyzing-insights-across-teams

Query cross-team PostHog insights and dashboards via synced Postgres warehouse replicas.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill analyzing-insights-across-teams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyzing-insights-across-teams
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/analyzing-insights-across-teams
Command: npx skills add https://github.com/PostHog/posthog-foss --skill analyzing-insights-across-teams

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostHog's system.insights table only returns rows for the current project, so agents analyzing insights across teams or fleet-wide dashboard usage would incorrectly report the data as inaccessible. This Skill documents the synced production Postgres replicas in the dogfood data warehouse that make cross-team entity metadata queryable.

Core Features & Use Cases

  • Synced table reference: Maps insights, dashboards, and teams to their US (postgres.posthog_dashboarditem, etc.) and EU (eu_postgres_*) warehouse table names.
  • Column-verification workflow: Guides checking system.information_schema.columns before querying, since synced schemas drift with the Django models.
  • Data handling rules: Enforces that customer team names and insight titles never appear on public surfaces like PRs, commits, or issues.
  • Use Case: An engineer asks which teams created the most insights in the last 30 days; the agent queries postgres.posthog_dashboarditem grouped by team_id instead of stopping at the project-scoped system.insights.

Quick Start

Ask the agent to analyze insight usage across all PostHog teams using the synced Postgres warehouse tables in the dogfood project.

Frequently Asked Questions about analyzing-insights-across-teams

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query PostHog insights across all teams?

Query the synced warehouse table postgres.posthog_dashboarditem with posthog:execute-sql, filtering or grouping by team_id. The project-scoped system.insights table only returns current-project rows, while the synced replica spans every team.

Why does system.insights only show my current project's data?

system.* entity tables are scoped to the current project by design. For the dogfood project (US project 2), production Postgres tables are replicated into the data warehouse, so cross-team entity metadata is queryable through tables like postgres.posthog_dashboarditem.

What are the synced Postgres table names for US and EU PostHog data?

US tables use names like postgres.posthog_dashboarditem, postgres.posthog_dashboard, and postgres.posthog_team. EU equivalents are prefixed, e.g. eu_postgres_posthog_dashboarditem. Underscore aliases point at the same synced data.

Can I use synced PostHog replica data for real-time analysis?

No, these are periodic replicas with sync lag, not live reads. They are suitable for trend and usage analysis but not for queries requiring right-now state of insights or dashboards.

What should I do if a cross-team query fails with a permissions error?

Report the permissions error and stop. Access is gated by membership in the internal dogfood project, and you should not look for alternative routes to cross-team data.