Communitygithub.com

amplitude/builder-skills

通过自然语言描述创建 Amplitude 图表,处理事件选择、筛选、分组和可视化选项。当您知道要衡量什么但不想手动构建图表时使用。

builder-skills 是什么?

此技能允许开发者和数据分析师通过自然语言描述直接创建 Amplitude 图表,无需手动进行复杂的事件选择、筛选和分组配置。它支持所有主要的图表类型,包括事件细分(eventsSegmentation)、漏斗分析(funnels)、留存分析(retention)、数据表(dataTableV2)、用户路径(customerJourney)和会话分析(sessions)。技能的核心工作流程包括:首先进行广泛的事件搜索以发现相关选项,然后做出明智的事件选择(优先聚合自定义事件),然后构建图表定义并调用 Amplitude API 创建和保存图表。此外,技能还内置了错误处理和最佳实践指导,例如验证事件是否存在、避免零数据图表,以及始终包含图表 URL 和关键见解。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/amplitude/builder-skills/tree/HEAD/analytics-skills/skills/create-chart

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

创建 Amplitude 图表

通过自然语言发现事件、构建图表定义并验证结果来创建图表。

先规划(关键)

在调用任何工具之前,分解请求:

1. 识别图表组件:

  • 图表类型和指标(正在衡量什么)
  • 时间范围(默认:最近 30 天,如未指定)
  • 主要事件(被计数的操作)
  • 细分条件(用户筛选器/分组)
  • 筛选器、分组、细分维度
  • 漏斗步骤(如果是转化分析)

2. 规划事件搜索:

  • 每个不同的事件概念进行一次搜索
  • 绝不要在一次搜索中组合多个概念
  • 示例:“购买”和“注册”需要分开搜索

3. 规划并行工具调用:

  • 获取上下文、搜索事件、查找群体可以同时运行
  • 在构建定义之前等待结果

事件发现(关键:先发现)

重要:先广泛撒网,再缩小范围

当用户的请求模糊不清或可能映射到多个事件时:

  1. 首先广泛搜索以发现相关选项
  2. 审查相关结果——寻找相关事件、自定义事件、元事件
  3. 向用户展示选项或解释您的选择依据
  4. 尽量不要在没有探索的情况下假设单个事件是唯一答案

搜索事件:

Amplitude:search with entity_types=['EVENT', 'CUSTOM_EVENT']
  • 一次搜索一个概念
  • 首先使用宽泛的搜索词(例如,搜索“AI”而不是仅“AI 聊天”)
  • ✓ 好的:“用户完成购买”
  • ✗ 坏的:“注册或购买事件”

做出明智的决定,然后解释:

  1. 广泛搜索以发现所有选项
  2. 审查结果并确定最全面/最准确的方法
  3. 做出您的最佳判断(优先选择聚合的自定义事件而非单个事件)
  4. 始终解释:“我找到了 X、Y、Z 选项。我选择了 [X],因为 [原因]。这包括/排除了 [范围]。”
  5. 如果您的假设错误,用户可以更正

决策标准:

  • 优先选择聚合相关活动的自定义事件(例如,“[2026] 激活指标 [仅 AI 事件]”)
  • 如果没有聚合事件,则选择主要交互事件
  • 考虑该产品领域中“活跃用户”的通常含义
  • 除非用户指定了窄范围,否则默认使用更广泛的范围

示例:

  • ❌ 不好的:用户询问“每周 AI 用户” → 立即选择“ai-chat: 发送消息”,不进行探索,没有解释
  • ✅ 好的:用户询问“每周 AI 用户” → 搜索“AI”,找到 Ask AI、Agents、Visibility、自定义聚合事件。回应:“我找到了涵盖 Ask AI、Agents 和 Visibility 的 AI 活动。我正在使用聚合所有 AI 产品交互的 '[2026] 激活指标 [仅 AI 事件]' 自定义事件。这为您提供了跨所有功能的 AI 用户总数。如果您想专注于特定的 AI 产品,请告诉我。”

使用前验证:

  • 通过搜索获取使用该事件的现有图表
  • 检查事件是否有实际数据量(不为零/不陈旧)
  • 寻找聚合相关活动的自定义事件
  • 如果结果为零,则搜索替代方案

获取属性:

Amplitude:get_event_properties 获取精确的属性名称/值

查找群体:

Amplitude:search with entity_types=['COHORT']
Amplitude:get_cohorts 获取完整定义

图表类型选择

图表类型使用场景
eventsSegmentation计算事件/用户随时间变化、趋势、比较、关键绩效指标、分布、属性分析
funnels具有已知序列的多步骤转化分析、流失分析、特定事件之间的时间、转化时间指标
retention用户回访行为、群组留存曲线、流失分析
dataTableV2表格比较、排名、多维细分
customerJourney路径探索、发现用户采用的未知路径、比较转化与流失路径
sessions会话时长、会话频率、每位用户花费时间、会话时长分布

快速参考

eventsSegmentation - 最通用。用于:

  • 用户计数(日活跃用户、周活跃用户、月活跃用户),使用 uniques 指标
  • 事件总数、平均值、属性总和
  • 百分位数、分布、公式
  • 带有滚动窗口的时间序列

聚合范围 (eventsSegmentation):

  • PROPSUM(A) / metric: "sums" = 所有事件的全局总和
  • metric: "frequency" = 每位用户事件计数的分布(多少用户执行了 1 次、2 次、3 次)
  • 对于“每位用户属性总和的分布”:Amplitude 不直接支持。使用 metric: "frequency" 进行事件计数分布,或使用按 user_id 分组并带 PROPSUM 的 dataTableV2,然后导出进行外部分析。

funnels - 具有预定义步骤的转化分析。用于:

  • 当您了解预期序列时的逐步转化率
  • 有序或无序序列
  • 转化时间(事件之间的中位时间)
  • 排除事件、转化窗口
  • 重叠事件:要查找执行了多个事件(任何顺序)的用户,使用“任何顺序”的漏斗,并将转化窗口设置为匹配图表日期范围
  • 注意:如果您想发现用户采用的路径,请改用 customerJourney

retention - 回访行为。用于:

  • N 天或滚动留存曲线
  • 群组分析(新用户 vs 回访用户)
  • 开始事件 → 回访事件模式

dataTableV2 - 表格数据。用于:

  • 按维度细分(国家、平台等)
  • 表格格式的多指标比较

customerJourney - 路径探索和发现。用于:

  • 理解用户实际采用的路径(与漏斗中的预期路径相对)
  • 分析以特定事件开始、结束或在两个特定事件之间的路径
  • 并排比较转化与流失的用户路径
  • 发现意外的导航模式或摩擦点
  • 探索路径频率、相似性或平均完成时间
  • 弥合理想客户旅程与实际用户行为之间的差距

sessions - 基于会话的参与度指标。用于:

  • 会话时长分析(平均时长、花费时间、分布)
  • 会话频率(每位用户的平均会话数、总会话数)
  • 每位用户随时间花费的时间
  • 会话内执行的事件(每次会话的平均事件数)
  • 比较不同用户分段的会话行为

特殊指标:

  • 用户计数:metric: "uniques"
  • 事件计数:metric: "totals"
  • 属性总和:metric: "sums" 并在 group_by 中指定属性
  • 比率/百分比:比较不同规模的组时使用

元事件:

  • _active:任何活跃事件(日活跃用户、月活跃用户)
  • _new:新用户(首次事件)
  • _any_revenue_event:收入事件

图表定义结构

核心参数(所有图表类型):

{
  "name": "描述性图表标题",
  "projectId": "12345",
  "definition": {
    "app": "12345",
    "type": "eventsSegmentation",
    "params": {
      "range": "Last 30 Days",
      "events": [{
        "event_type": "Purchase Completed",
        "filters": [],
        "group_by": []
      }],
      "metric": "uniques",
      "countGroup": "User",
      "interval": 1,
      "segments": [{"conditions": []}]
    }
  }
}

关键参数:

  • countGroup:“User”(唯一用户)或“Event”(事件发生次数)
  • interval:1(每日)、7(每周)、30(每月)
  • segments:用户筛选器/分组(空数组 = 所有用户)

事件筛选器(内联 OR 逻辑):

"filters": [{
  "group_type": "User",
  "subprop_key": "country",
  "subprop_op": "is",
  "subprop_type": "event",
  "subprop_value": ["United States", "Canada"]
}]

用户分段(条件 AND 逻辑):

"segments": [{
  "name": "Active Users",
  "conditions": [{
    "type": "property",
    "group_type": "User",
    "prop_type": "user",
    "prop": "plan",
    "op": "is",
    "values": ["Pro", "Enterprise"]
  }]
}]

群体分段: 搜索群体,获取 ID,然后:

"segments": [{
  "name": "My Cohort",
  "conditions": [{
    "type": "cohort",
    "group_type": "User",
    "cohort_id": "abc123",
    "op": "is_in"
  }]
}]

工作流程:创建图表

  1. 获取上下文:
Amplitude:get_context (获取 projectId)
  1. 发现事件(首先广泛搜索):
Amplitude:search 针对每个不同的概念
- 最初使用宽泛的搜索词
- 查找所有相关事件、自定义事件、群体
- 在选取之前审查**所有**结果
  1. 评估并决定:
  • 审查所有发现的事件和自定义事件
  • 做出明智的决定(优先选择聚合事件)
  • 准备清晰解释您发现的内容以及您的选择
  1. 查找相似图表(查看示例):
Amplitude:search entity_types=['CHART'] query="相似概念"
Amplitude:get_charts 查看定义结构
  1. 根据需要获取属性:
Amplitude:get_event_properties
  1. 构建定义,使用发现的事件名称
  • 在响应中解释事件选择依据
  1. 创建图表:
Amplitude:query_dataset 带有完整定义
  1. 验证结果 - 检查数据是否合理

  2. 保存图表:

Amplitude:save_chart_edits 带有来自 query_dataset 的 editId

错误处理

如果 query_dataset 失败:

  • 仔细阅读错误消息
  • 常见问题:事件名称不正确、筛选器无效、参数类型错误
  • 修复定义并重试
  • 首先通过搜索验证事件是否存在

如果结果为零:

  • 检查筛选器是否限制过多
  • 验证事件是否有数据(搜索使用它的图表)
  • 尝试更广泛的时间范围
  • 检查分段条件

最佳实践

命名:

  • 包含指标 + 时间上下文:“最近 90 天的周活跃用户”
  • 不要用:“WAU”或“Users”

时间范围:

  • 默认使用“最近 30 天”
  • 对于特定时间段使用包含性范围
  • 明确说明解释的时间范围

验证:

  • 使用前务必验证事件是否存在
  • 检查相似图表以了解事件使用情况
  • 使用 get_event_properties 确认属性

比较:

  • 使用分段在同一图表上比较用户组
  • 对不同规模的组使用比率/百分比

始终包含:

  • 响应中的图表 URL
  • 图表显示的内容
  • 来自初始数据的关键见解
  • 使用的方法论

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

amplitude/builder-skills

Performs deep analysis of a specific Amplitude chart to explain trends, anomalies, and likely drivers. Use when a metric looks unusual, investigating a spike or drop, or understanding the "why" behind numbers.

amplitude/builder-skills

Deeply analyze Amplitude dashboards by analyzing key charts, surfacing top areas for concern and takeaways, identify anomalies, then explain changes using customer feedback trends.

amplitude/builder-skills

Designs A/B tests with proper metrics and variants, analyzes running or completed experiments, and interprets results with statistical rigor. Use when setting up experiments, checking experiment status, analyzing results, or making ship decisions.

amplitude/builder-skills

Synthesizes customer feedback into actionable themes including feature requests, bugs, pain points, and praise. Use when planning product roadmap, understanding user sentiment, investigating specific issues, or preparing voice-of-customer reports.

amplitude/builder-skills

Analyze MCP server usage instrumented with Amplitude's MCP Analytics SDK: break usage and errors down by tool, read the rationales within each tool to see what callers are trying to do, and produce a prioritized write-up of actionable fixes. Use this skill whenever the user asks to understand how their MCP server is being used, what agents/users are trying to do with it, why tool calls are failing, what to fix or improve in their MCP server, or asks for an "MCP usage report", "tool error analysis", "intent analysis", "rationale clustering", or "MCP insights". Also trigger when the user mentions [MCP]-prefixed events, tool rationale, tool call errors, or just finished instrumenting their MCP server and wants to see what the data says. Requires the Amplitude MCP connector.

amplitude/builder-skills

Read lost deals and churned accounts from your CRM, extract reasons clustered by theme (missing features, pricing, competitors, UX), and write a prioritized weekly analysis with product improvement recommendations. Use before roadmap planning or to build the case for prioritizing retention work.

amplitude/builder-skills

Guide an Amplitude user through building a custom agent by suggesting use cases grounded in their role and data, shaping the idea into a well-formed spec, and generating a ready-to-run Global Agent deeplink that creates it. Use to create, build, or set up a custom agent, automate a recurring analysis, or put a repeated report on a schedule.

amplitude/builder-skills

Builds comprehensive Amplitude dashboards from requirements or goals, organizing charts into logical sections with appropriate layouts. Use when creating a complete dashboard from scratch or assembling existing charts into a cohesive view.

amplitude/builder-skills

Monitors all active and recently completed experiments across Amplitude projects, triages them by importance, then runs deep analysis and reporting on the most impactful ones. Use when the user asks to "check on experiments", "experiment status", "experiment review", "what experiments are running", or wants a periodic experiment health report.

amplitude/builder-skills

Pull Intercom tickets and Slack support messages from the past 7 days, classify each signal, enrich with CRM data (ARR, plan, renewal), score by customer value and churn risk, and output a tiered priority report saved to Drive. Use when you need a fast, data-driven view of what support signals matter most.

amplitude/builder-skills

Use this skill whenever a user wants to improve existing pages on their website to get cited more by AI models — whether they say "our pages aren't getting cited", "improve this page for AI visibility", "which of our pages should we update", "make this article more cite-worthy", "our competitors are getting cited instead of us", "update our content for AI search", or any variation where the goal is improving an existing asset rather than creating something new. This skill pulls owned pages from AI Visibility, identifies which ones have citation potential but are underperforming, compares them against the external pages that are winning citations on the same topics, and produces section-level rewrites or a full-page update — then pushes the revision to the CMS as a draft. Trigger even if the user just says "help me get cited more" or "why is [competitor] getting cited instead of us".

amplitude/builder-skills

Use this skill whenever a user wants to win AI citations on prompts that competitors currently dominate — whether they say "competitors are getting cited instead of us", "we're losing on these prompts", "how do I outrank [competitor] in AI answers", "find prompts where we should be winning", "create content to beat [competitor]", or any variation where the goal is capturing AI share on prompts a competitor currently owns. This skill pulls competitor visibility data from AI Visibility, identifies the specific prompts where competitors win and Amplitude is absent, clusters them by intent, and produces targeted comparison pages, alternatives content, or rebuttal assets — then pushes drafts to CMS. Trigger on any mention of competitor, prompt hijack, outrank, or "why is [competitor] getting cited instead of us".

amplitude/builder-skills

Use this skill whenever a user wants to turn AI Visibility data into published content — whether they say "find content gaps", "what should we write about", "which topics have low visibility", "help me get cited by AI models", "create a blog post from our AI Visibility gaps", "we're losing to competitors on these prompts", or any variation where they want to go from AI visibility weakness to a draft article, landing page, or FAQ. This skill connects directly to Amplitude AI Visibility data (topics, prompts, visibility scores, citations, competitor data, full LLM responses and sources) and produces a publish-ready content brief plus full article draft. If the user mentions CMS (WordPress, Webflow, Contentful, Sanity, HubSpot, Ghost, Shopify), also trigger this skill to push the draft directly. Trigger even if they just say something vague like "what content should we create?" in an AI Visibility context.

amplitude/builder-skills

Use this skill whenever a user wants to test content variants before publishing to find which one will get cited most by AI models — whether they say "which version of this content will perform better", "test this article before we publish", "simulate how AI will respond to this content", "which angle should we use", "generate content variants and pick the winner", "run a simulation before publishing", or any variation where the goal is data-driven content selection rather than gut-feel publishing. This skill takes an identified content opportunity, generates 2–3 distinct variants with different angles or structures, scores them against actual AI model responses from AI Visibility, references the Simulate Changes feature for pre-publish validation, and produces a clear recommendation on which variant to publish — then pushes the winner to CMS. Trigger on any mention of "simulate", "test variants", "which performs better", "A/B content", or "before we publish".

amplitude/builder-skills

Use this skill whenever a user wants to understand which external sources are being cited by AI models on topics relevant to their brand, and wants to create content that will outrank those sources — whether they say "what sources are AI models citing", "why is [third-party site] being cited instead of us", "we want to be the definitive source on X", "build something that gets cited more than G2 or TechRadar", "create an authoritative asset", or any variation where the goal is producing a new reference asset (definition page, benchmark, methodology, glossary, comparison hub) designed to beat existing top-cited sources. This skill analyzes AI Visibility source data, reverse-engineers what makes top-cited pages authoritative, and produces a superior source asset — then pushes it to CMS as a draft. Trigger on any mention of "sources", "third-party citations", "authoritative content", "definitional pages", or "outrank".

amplitude/builder-skills

Instrument a Node/TypeScript MCP server with Amplitude's @amplitude/mcp-analytics SDK so tool calls, sessions, and rationale are tracked as Amplitude events. Use this skill whenever the user wants to add Amplitude analytics to their MCP server, mentions "MCP Analytics", "@amplitude/mcp-analytics", "instrument my MCP server", "track MCP tool calls", "add rationale to my MCP tools", or wants agent traffic (Claude, Cursor, ChatGPT) attributed back to Amplitude. Also use for adding UTM tagging to MCP-returned links, or for troubleshooting identity/user_id mismatches between MCP events and web/mobile Amplitude data.

amplitude/builder-skills

Instruments a pull request with Amplitude analytics that conform to the project's existing taxonomy. Reads the tracking plan via the Amplitude MCP server (events, properties, naming conventions), analyzes the PR diff to find the few user actions genuinely worth tracking, detects the codebase's SDK and tracking patterns, and adds instrumentation that matches both. Optionally (opt-in) stages new events and properties on an Amplitude tracking-plan branch for data-governance review. Use when asked to "instrument this PR", "add analytics to this change", "add tracking", "add Amplitude events", "instrument this feature", or "what should I track here".

amplitude/builder-skills

Diagnoses product health by cross-referencing Amplitude analytics (dashboards, charts, funnels, feedback, AI agent analytics), optionally Datadog (errors, latency, stack traces), and optionally Slack (qualitative feedback, bug reports, feature requests). Identifies what's broken, what's working, and what to do about it — with root causes, not just symptoms. Use when asked to "diagnose my product", "what's going on", "product health check", "what's broken", "where are users struggling", "give me a product diagnosis", or "what should I focus on".

amplitude/builder-skills

Turn one or more meeting transcripts, notes, or Slack threads into concise takeaways and clear action items with DRIs. Works with a single meeting or a batch from the whole week.

amplitude/builder-skills

Summarizes B2B account health by analyzing usage patterns, engagement trends, risk signals, and expansion opportunities. Use for customer success reviews, renewal preparation, QBRs, or account prioritization.

相关技能