building-a-dashboard
它能做什么
本技能通过选择合适的洞察、复用现有洞察并添加缺失的图表,来创建或更新仪表盘。适合希望围绕留存或收入等主题快速获得整洁仪表盘、而无需手动制作每张图表的人。
适用场景
- ✓当你想围绕激活、留存或收入等主题创建新仪表盘时。
- ✓当你想在已有的仪表盘上添加、删除或替换洞察的时候。
- ✓当你希望团队在一页上查看多项指标时。
技能链接
https://github.com/PostHog/posthog/blob/master/products/dashboards/skills/building-a-dashboard/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我们的激活漏斗构建一个仪表盘,包含关键指标和一张留存图表。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会先查找合适的现有仪表盘、模板和洞察,然后创建缺失的图表。它会将它们排列成易于阅读的版面,并在修改现有仪表盘之前检查其内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Building a dashboard
A dashboard is a collection of insight tiles on one page. Your job is to figure out which insights belong on it, reuse what already exists, create what's missing, and lay them out sensibly — not to blindly generate charts.
When the dashboard needs explanatory text, keep user copy and agent context separate. Use the
writing-user-facing-copy skill for text that people read. Use agent_context for information that an agent needs to
maintain the dashboard.
PostHog's Data Catalog is the semantic layer. Store canonical metric definitions there. Never use agent_context as
a substitute for a Data Catalog metric.
Create vs update
First work out whether you're creating a new dashboard or changing an existing one.
- Search existing dashboards with
dashboards-get-all(itssearchparam does fuzzy name/description matching). If the user is clearly describing something that already exists, they probably want an update. - Read a candidate with
dashboard-getto see its current tiles before you change anything. - If the request is ambiguous — "get my financial metrics together" could mean build new or add to an existing one — ask a short clarifying question rather than guessing.
Use templates as reference
PostHog ships vetted dashboard templates for common topics, and orgs can share their own. Consult them before you build — they're a strong signal of which insights pair well on a topic.
dashboard-templates-list— browse templates (usesearchfor a topic,scopeto narrow to global / team / organization). This returns names, descriptions, and tags only.dashboard-templates-retrieve— open the closest template to see itstiles: which insights it groups together and how each is queried.
Treat templates as examples, not a spec. Take inspiration from the insights and their groupings, but tailor every insight to the user's own events, properties, and intent. Don't copy a template verbatim, and don't force a template onto a request it doesn't fit — a good bespoke dashboard beats a mismatched template every time.
Select the insights
Prefer reusing existing insights over recreating them.
- Search with
insights-listand read promising ones withinsight-getto check they match the user's intent and actually have data. Full-text search misses things named differently, so list broadly before concluding an insight doesn't exist. - For anything missing, read
querying-posthog-databefore choosing its query method. After Data Catalog routing, default to typed runners for each supported product-analytics tile: trends (including simple counts, unique users, sums, and breakdowns), funnels, retention, stickiness, paths, and lifecycle. Run the query to verify it, then save its native query node withinsight-create. Use SQL-backed insights for explicit SQL requests or calculations the typed schemas cannot express, such as custom joins. SQL used to discover events or existing insights does not determine the query type of new tiles. Keep valid existing insights rather than rebuilding them. - Follow
querying-posthog-datafor presenting verified query results: some harnesses show charts inline, while others need a separate top-levelrender-uicall with the same query tool and input. Rendering support does not determine the saved insight's query type. - Keep the set minimal — only the insights the request needs. A focused dashboard is more useful than an exhaustive one.
Use Data Catalog for reusable metrics
Use PostHog's Data Catalog as the source of truth for reusable business and telemetry metrics. Do this before you derive a metric from raw data or copy a definition from an existing dashboard:
- Call
posthog:metric-listand follow pagination until you have checked the complete catalog. - Call
posthog:metric-describefor each possible match. Use only anapproved, non-drifted exact match as a canonical definition. - Call
posthog:data-catalog-metric-runto verify an approved match. Use its definition when you build or update the related dashboard insight. - If the dashboard introduces a reusable metric with no governed match, follow the
setting-up-data-catalogskill and create a proposed metric withposthog:data-catalog-metric-create. Usesource_insight_short_idwhen the definition comes from an insight. A proposed metric is not canonical until a human approves it.
Do not copy the metric definition into dashboar
常见问题
它会不经询问就构建仪表盘吗?
如果请求不明确,它会先提出一个简短问题,例如要新建还是更新现有仪表盘。
它会复用我已有的图表吗?
会。它会搜索现有洞察,只在需要时才创建新的。
正式的指标定义应该放在哪里?
应放在 PostHog 的数据目录中,而不是仪表盘上的备注里。
详情
作者的原始描述
Build a new dashboard, or update an existing one, from a set of insights — the same job the in-app assistant does with its upsert-dashboard tool, but over MCP. Use when a user asks to create a dashboard, put several metrics/charts together on one page, assemble a dashboard for a topic (product analytics, retention, revenue, activation, etc.), or add/remove/replace insights on a dashboard they already have. Covers deciding create vs update, reusing existing insights vs creating new ones, and using PostHog's vetted dashboard templates as reference for what a strong dashboard on a topic looks lik
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6846
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。