mcpbeat Sign in

Analyzing Insights Across Teams Agent Skill

> Analyze PostHog insights, dashboards, or teams beyond the current project by querying the prod Postgres replicas synced into the dogfood data warehouse (US project 2, "PostHog App + Website"). Use when asked to analyze insights across all teams or projects, another team's insights, or fleet-wide insight/dashboard usage — cases where `system.insights` only returns the current project's rows and the agent would otherwise report the data as inaccessible. Covers the synced table names for US and EU and the column-verification workflow.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
690
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/PostHog/posthog --skill analyzing-insights-across-teams

The instruction itself

5 sections, as written by the author

Analyzing insights across teams

system.* entity tables (e.g. system.insights) are scoped to the current project,

and the generic execute-sql guidance says other teams' data is inaccessible.

For the dogfood project (US project 2) that is not the whole story:

production Postgres tables are replicated into the project's data warehouse,

so cross-team entity metadata is queryable with posthog:execute-sql.

Do not stop at system.insights when the question spans teams.

This skill is deliberately repo-local (.agents/skills/): it documents PostHog's internal dogfood setup,

applies only to agents working in this repo, and must not move into the packaged products/*/skills/ bundle that ships to every team.

Synced tables

| Entity | US (prod-us) | EU (prod-eu) |

| ---------------- | -------------------------------- | ----------------------------------- |

| Insights | postgres.posthog_dashboarditem | eu_postgres_posthog_dashboarditem |

| Dashboards | postgres.posthog_dashboard | eu_postgres_posthog_dashboard |

| Teams / projects | postgres.posthog_team | eu_postgres_posthog_team |

  • Underscore aliases (e.g. postgres_posthog_dashboarditem) point at the same synced data.
  • These are replicas of the Django tables in this repo (posthog_dashboarditem backs the Insight model), so rows span every team; team_id is the scoping column.
  • More prod tables than these are synced. Before concluding cross-team data is inaccessible, check the catalog:
  SELECT table_name, description
  FROM system.information_schema.tables
  WHERE table_type = 'data_warehouse' AND table_name ILIKE '%postgres%'

Workflow

  • Confirm columns before projecting — synced schemas drift with the Django models:
   SELECT column_name, data_type
   FROM system.information_schema.columns
   WHERE table_name = 'postgres.posthog_dashboarditem'
  • Query with posthog:execute-sql, filtering or grouping by team_id. Example — most active teams by insights created in the last 30 days:
   SELECT team_id, count() AS insights_created
   FROM postgres.posthog_dashboarditem
   WHERE NOT deleted AND saved AND created_at >= now() - INTERVAL 30 DAY
   GROUP BY team_id
   ORDER BY insights_created DESC
   LIMIT 20

Join postgres.posthog_team on id = team_id for team names only when the output stays on an internal surface (see below).

  • Remember the sync lag: these are periodic replicas, not live reads — fine for analysis, not for "right now" state.

Output handling (required)

Rows in these tables are customer data: team names, insight names, descriptions, and queries.

  • Never put customer team names, insight titles, or other row-level metadata on public surfaces — PR titles/descriptions, commit messages, issues, code comments, or uploaded screenshots. Aggregates and team_id-level figures without names are the ceiling for public copy.
  • Keep named results in the private conversation, internal docs, or auth-gated links.
  • Access is gated by membership in the internal dogfood project. If a query fails with a permissions error, report it and stop — do not look for another route to cross-team data.
  • For cross-team event/analytics data (not entity metadata), see the query-clickhouse-via-metabase skill instead.

Other skills for the same job

different authors, same section of the catalogue
Fda Database
by christophacham
×4

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

32k tokens scripts
Alphafold Database
by christophacham
×3

Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

7k tokens
Alphafold Database
by ComeOnOliver
×2

Access AlphaFold's 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

9k tokens
Data Context Extractor
by anthropics
vendor ×1

> Generate or improve a company-specific data analysis skill by extracting tribal knowledge from analysts. "Help me create a skill for our database", "Generate a data skill for [company]" → Discovers schemas, asks key questions, generates initial skill with reference files "Update the data skill with [metrics/tables/terminology]", "Improve the [domain] reference" → Loads existing skill, asks targeted questions, appends/updates reference files Use when data analysts want Claude to understand their company's specific data warehouse, terminology, metrics definitions, and common query patterns.

7k tokens scripts
AgentDB Advanced Features
by Microck
×1

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.

3k tokens
Geo Database
by BioTender-max
×1

NCBI GEO access via GEOparse and E-utilities. Search by keyword/organism/platform, download GSE series matrices, parse GPL annotations, extract GSM metadata, load expression matrices into pandas. For single-cell use cellxgene-census; for multi-DB access use gget-genomic-databases.

4k tokens
Advanced Agentdb Vector Search Implementation
by ComeOnOliver
×1

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, and hybrid search for distributed AI systems.

29k tokens
Agentdb Advanced Features
by ComeOnOliver
×1

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.

6k tokens

How to use it

Copy the folder

Take posthog/analyzing-insights-across-teams from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.