Communitygithub.com

Amplitude/圖表建構技能

透過自然語言描述建立 Amplitude 圖表,處理事件選擇、篩選條件、分組與視覺化選擇。當你知道要量測什麼但不想手動建構圖表時使用。

圖表建構技能 是什麼?

此技能可讓你透過自然語言描述,無需手動操作即可在 Amplitude 中建立專業圖表。它會引導使用者透過結構化流程,從事件探索、圖表類型選擇到定義建構與結果驗證。支援多種圖表類型(如事件分割、漏斗圖、留存分析、資料表格、客戶旅程與會話分析),並內建最佳實務,例如廣泛搜尋事件、優先使用聚合自訂事件、以及解釋選擇原因。主要用於搭配 Amplitude API 的工具(如 Claude Code、Codex),透過一系列工具呼叫(如搜索、查詢、儲存圖表)來完成任務,並提供完整的錯誤處理與驗證機制。

相容平台~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: send message」而沒有探索,也沒有解釋
  • ✅ 好的做法:使用者問「每週 AI 使用者」→ 搜尋「AI」,找到 Ask AI、Agents、Visibility、自訂匯總事件。回應:「我發現 AI 活動橫跨 Ask AI、Agents 和 Visibility。我使用匯總事件『[2026] 啟用指標 [僅 AI 事件]』,它包含所有 AI 產品互動。這會給您所有功能的 AI 使用者總數。如果您想專注於特定 AI 產品,請告訴我。」

使用前先驗證:

  • 透過搜尋取得使用該事件的既有圖表
  • 檢查事件是否有實際數據量(非零或過時)
  • 尋找匯總相關活動的自訂事件
  • 如果結果為零,搜尋替代方案

取得屬性:

Amplitude:get_event_properties 獲取確切的屬性名稱/值

尋找同類群組:

Amplitude:search with entity_types=['COHORT']
Amplitude:get_cohorts 取得完整定義

圖表類型選擇

圖表類型使用時機
eventsSegmentation計算一段時間內的事件/使用者、趨勢、比較、KPI、分佈、屬性分析
funnels具有「已知順序」的多步驟轉換分析、流失分析、特定事件之間的時間、轉換時間指標
retention使用者回訪行為、同類群組留存曲線、流失分析
dataTableV2表格比較、排名、多維度細分
customerJourney路徑探索、發現使用者採取的「未知路徑」、比較已轉換與流失的路徑
sessions工作階段持續時間、工作階段頻率、每位使用者花費時間、工作階段長度分佈

快速參考

eventsSegmentation - 最多用途。用於:

  • 使用者計數(DAU、WAU、MAU)搭配 uniques 指標
  • 事件總數、平均值、屬性總和
  • 百分位數、分佈、公式
  • 搭配滾動窗口的時間序列

匯總範圍 (eventsSegmentation):

  • PROPSUM(A) / metric: "sums" = 所有事件的全局總和
  • metric: "frequency" = 每位使用者事件計數的分佈(有多少使用者做了 1 次、2 次、3 次)
  • 關於「每位使用者的屬性總和分佈」:Amplitude 不直接支援。請使用 metric: "frequency" 取得事件計數分佈,或使用 dataTableV2 以 user_id 分組並搭配 PROPSUM,然後匯出進行外部分析。

funnels - 具有「預定義步驟」的轉換分析。用於:

  • 當您知道預期順序時,逐步轉換率
  • 有序或無序序列
  • 轉換時間(事件之間的中位數時間)
  • 排除事件、轉換窗口
  • 重疊事件:要尋找執行多個事件(任何順序)的使用者,請使用「任何順序」的漏斗,並將轉換窗口設定為與圖表日期範圍相符
  • 注意:如果您想「探索」使用者採取的實際路徑,請改用 customerJourney

retention - 回訪行為。用於:

  • N 天或滾動留存曲線
  • 同類群組分析(新使用者 vs 回訪使用者)
  • 起始事件 → 回訪事件模式

dataTableV2 - 表格資料。用於:

  • 按維度細分(國家、平台等)
  • 在表格格式中進行多指標比較

customerJourney - 路徑探索與發現。用於:

  • 了解使用者實際採取的實際路徑(相對於漏斗中的預期路徑)
  • 分析以特定事件開始、結束或介於兩個事件之間的路徑
  • 並排比較已轉換和流失的使用者路徑
  • 發現意外的導航模式或摩擦點
  • 探索路徑頻率、相似性或平均完成時間
  • 橋接理想客戶旅程與實際使用者行為之間的差距

sessions - 基於工作階段的互動指標。用於:

  • 工作階段持續時間分析(平均長度、花費時間、分佈)
  • 工作階段頻率(每位使用者的平均工作階段數、總工作階段數)
  • 一段時間內每位使用者花費的時間
  • 在工作階段內執行的活動(每次工作階段的平均事件數)
  • 比較不同使用者區隔的工作階段行為

特殊指標:

  • 使用者計數:metric: "uniques"
  • 事件計數:metric: "totals"
  • 屬性總和:metric: "sums" 搭配 group_by 中的屬性
  • 比率/百分比:在比較不同規模的群組時使用

元事件:

  • _active:任何活躍事件 (DAU、MAU)
  • _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 (for projectId)
  1. 探索事件(先廣泛搜尋):
Amplitude:search for each distinct concept
- Use broad search terms initially
- Look for all related events, custom events, cohorts
- Review ALL results before selecting
  1. 評估並決定:
  • 檢閱所有探索到的事件和自訂事件
  • 做出明智決定(較偏好匯總事件)
  • 準備清晰說明你的發現和選擇
  1. 尋找類似圖表(參考範例):
Amplitude:search entity_types=['CHART'] query="similar concept"
Amplitude:get_charts to see definition structure
  1. 必要時取得屬性:
Amplitude:get_event_properties
  1. 建立定義 使用探索到的名稱
  • 在回應中說明事件選擇理由
  1. 建立圖表:
Amplitude:query_dataset with full definition
  1. 驗證結果 – 檢查資料是否合理

  2. 儲存圖表:

Amplitude:save_chart_edits with editId from query_dataset

錯誤處理

如果 query_dataset 失敗:

  • 仔細閱讀錯誤訊息
  • 常見問題:事件名稱錯誤、無效篩選器、參數類型錯誤
  • 修正定義並重試
  • 先透過搜尋驗證事件是否存在

如果結果為零:

  • 檢查篩選器是否過於嚴格
  • 驗證事件有資料(搜尋使用該事件的圖表)
  • 嘗試更廣的時間範圍
  • 檢查區隔條件

最佳實務

命名:

  • 包含指標 + 時間情境:「最近 90 天的每週活躍使用者」
  • 不要只寫「WAU」或「使用者」

時間範圍:

  • 預設為「最近 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.

相關技能