
Analyzing Insights Across Teams
FreeGain cross-team insights from PostHog's data warehouse.
Free · Opens the source repo
What Analyzing Insights Across Teams does
The Analyzing Insights Across Teams skill enables users to access and analyze insights from multiple teams within PostHog. By leveraging the production Postgres replicas synced into the dogfood data warehouse, this skill allows for querying data that is otherwise restricted to the current project. This is particularly useful when users need to analyze insights across various teams or projects, as well as gain a broader understanding of dashboard usage across the organization.
This skill is specifically designed for agents operating within the PostHog repository and is not intended for general use outside of this context. It provides a clear workflow for querying cross-team insights, ensuring that users can extract valuable data without running into the limitations of the system.insights entity tables. The skill outlines how to verify column names and data types before making queries, which is essential for maintaining accuracy in analysis as schemas may change over time.
In addition to providing access to insights and dashboards, the skill emphasizes the importance of handling sensitive customer data responsibly. It includes guidelines for ensuring that team names and insight titles are not exposed in public-facing materials, which is crucial for maintaining confidentiality. The skill also reminds users of the sync lag associated with the data, clarifying that while the insights are useful for analysis, they may not reflect real-time data.
Overall, this skill is an essential tool for PostHog developers and analysts who need to perform comprehensive analyses across teams, enabling them to make data-driven decisions based on a wider range of insights.
When to use it
Use this skill when you need to analyze insights or dashboards that span multiple teams or projects in PostHog.
When not to use it
This skill is not suitable for real-time data analysis due to the sync lag of the data warehouse.
What you can build with it
Team Performance Analysis
Analyze the performance of different teams by querying insights created over a specific time period.
Dashboard Usage Review
Review how different teams utilize dashboards to identify trends and areas for improvement.
Cross-Team Insight Comparison
Compare insights from various teams to understand best practices and share learnings across the organization.
How to install Analyzing Insights Across Teams
View source1. Install with the skills CLI
npx skills add posthog/posthog/analyzing-insights-across-teams --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by posthogAnalyzing 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_dashboarditembacks theInsightmodel), so rows span every team;team_idis 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 byteam_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 20Join
postgres.posthog_teamonid = team_idfor 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.
Related
- For cross-team event/analytics data (not entity metadata), see the
query-clickhouse-via-metabaseskill instead.
Frequently asked questions about Analyzing Insights Across Teams
Similar skills
Power BI Semantic Modeling
Optimize your Power BI data models with best practices.
Data Context Extractor
Tailor data analysis skills to your company's needs.
Power BI Performance Troubleshooting
Systematic guidance for optimizing Power BI performance.
Power BI Model Design Review
Optimize your Power BI data models with expert reviews.
Power BI DAX Formula Optimizer
Optimize your DAX formulas for better performance and clarity.
Fabric Lakehouse
Optimize your data solutions with Lakehouse best practices.
