Logo Debug Replay

Debug Replay

Tổ chức
amplitude
debug-replay

Turns bug reports into reproducible steps by finding error sessions in Amplitude Session Replay, extracting interaction timelines, and identifying the common action sequence that precedes the failure. Use when a user reports a bug, an error event spikes, someone says "how do I reproduce this", "what happened to user X", "repro steps", or you need to understand what a user did before an error occurred.

Tổng quan

Nhà phát hànhamplitude
Kho mãmcp-marketplace
Tên kỹ năngdebug-replay
Sao
47
Bản fork
12
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được amplitude công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Debug Replay trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/amplitude/mcp-marketplace/tree/main/plugins/amplitude/skills/debug-replay
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git /tmp/mcp-marketplace
mkdir -p .claude/skills
cp -r /tmp/mcp-marketplace/plugins/amplitude/skills/debug-replay .claude/skills/debug-replay
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Debug Replay trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Debug Replay ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Debug Replay không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Debug Replay

Investigate bugs by finding session replays where the error occurred, extracting the interaction timeline, and distilling it into numbered reproduction steps an engineer can follow. This skill bridges the gap between "a user reported a bug" and "here's exactly how to reproduce it."


CRITICAL: Tool Reference

This skill operates on three Amplitude Session Replay tools. Use them in this order:

  1. Amplitude:get_amp_session_replay_info with action: "search" — Find sessions matching event filters (errors, specific users, time windows). Returns session metadata and replay links.
  2. Amplitude:get_amp_session_replay_info with action: "list" — Simple paginated listing when you already have a user/device ID or just need recent sessions. Returns a session replay ID in device_id/session_id format.
  3. Amplitude:get_amp_session_replay_info with action: "events" — Decode a specific replay into an interaction timeline: navigations, clicks, inputs, scrolls. Pass the ID from the tools above as sessionReplayId.

Supporting tools used in this skill:

  • Amplitude:use_amplitude_cohorts with action: "find" — Look up users by email, user ID, or other identifiers.
  • Available taxonomy reader — Inspect the connected catalog and use its event and event-property read capabilities to discover valid filter names. Never guess names or copy parameters from an older schema.
  • Amplitude:use_amp_flags with action: "list_deployments" — Check if error aligns with a recent deploy.

Instructions

Step 1: Understand the Bug Report

Parse the user's request to extract:

  • Error identifier: Error message, error event name, or event type (e.g., [Amplitude] Error Logged, a custom error event)
  • User identifier (if provided): Email, user ID, device ID, or account name
  • Time window: When it was reported or when it started. Default to last 7 days if unspecified.
  • Product area (if mentioned): Page, feature, or flow where the bug occurs

If the report is vague (e.g., "something is broken in checkout"), ask one clarifying question before proceeding. Do not ask more than one.

Step 2: Get Context and Find the Error Event

  1. Call Amplitude:get_amplitude_context. If multiple projects, ask which to investigate.
  2. Use the catalog's taxonomy reader to confirm the exact error event name exists in the project. Common patterns:
    • [Amplitude] Error Logged — auto-captured JS errors
    • [Amplitude] Network Request with status code filters — API failures
    • Custom error events specific to the product
  3. If a user identifier was provided, call Amplitude:use_amplitude_cohorts with action: "find" to look up the user and get their user ID and device ID.

Step 3: Find Error Sessions

Use Amplitude:get_amp_session_replay_info with action: "search" to find sessions where the error occurred. Build filters based on what you know:

If you have a specific user:

json
{
  "action": "search",
  "projectId": "12345",
  "userProperties": [{"name": "gp:email", "is": "user@example.com"}],
  "events": [{"name": "[Amplitude] Error Logged"}],
  "limit": 5
}

If you have an error message but no specific user:

json
{
  "action": "search",
  "projectId": "12345",
  "events": [
    {
      "name": "[Amplitude] Error Logged",
      "withProperty": {"name": "Error Message", "contains": "TypeError"}
    }
  ],
  "limit": 5
}

Request 3-5 sessions. More sessions give better pattern extraction; fewer saves context.

Step 4: Extract Interaction Timelines

For each session found in Step 3, call Amplitude:get_amp_session_replay_info with action: "events" and the sessionReplayId.

  • Use event_limit: 500 for standard sessions
  • Use event_limit: 200 if analyzing 4+ sessions (to manage context)

What to capture from each timeline:

  • Page navigations (URLs visited)
  • Clicks and inputs leading up to the error point
  • Any unusual patterns: rapid repeated clicks (rage clicks), long pauses, back-and-forth navigation
  • The approximate timestamp where the error likely occurred (look for the last meaningful action before the session ends or the user navigates away in frustration)

Step 5: Extract Common Repro Path

This is the core analytical step. Compare the timelines from multiple sessions to find the common prefix — the shared sequence of actions that precedes the error.

  1. Align timelines by the error point. Work backwards from where the error appears to occur.
  2. Identify shared actions. Look for the same sequence of page navigations, clicks, and inputs across sessions.
  3. Note divergences. Where timelines differ, note the variations — these may indicate multiple trigger paths or optional steps.
  4. Simplify. Collapse repeated or irrelevant actions (e.g., scrolling) into the minimal set of steps needed.

If only 1 session is available, extract the timeline as-is and note that it hasn't been validated across multiple sessions.

Step 6: Check Deployment Context

Call Amplitude:use_amp_flags with action: "list_deployments" once. If an error spike aligns with a recent deploy, note it — this is critical context for the engineer.

Step 7: Present Reproduction Steps

Structure the output as an engineering-ready bug report.

Required sections:

  1. Bug Summary (1-2 sentences): What's broken, who's affected, since when. Written as a headline an engineer would put in a ticket title.

  2. Environment Context:

    • Project and platform
    • Time window investigated
    • Number of sessions analyzed
    • Related deployment (if found)
  3. Reproduction Steps — Numbered, specific, copy-paste-ready:

## Reproduction Steps

1. Navigate to [URL]
2. Click [element/area description] at [approximate location]
3. Enter "[value]" in [field description]
4. Click [element/area description]
5. Observe: [error behavior — what the user sees]

**Expected:** [what should happen]
**Actual:** [what happens instead]
  1. Error Context (if available):

    • Error message / type
    • Failing endpoint (if network error)
    • Page where error occurs
  2. Session Evidence:

    • Replay links for each analyzed session (clickable)
    • Confidence level: High (3+ sessions show same path), Medium (2 sessions), Low (1 session only)
    • Note any variations between sessions
  3. Observations (optional): Patterns that may help debugging — rage clicks suggesting UI unresponsiveness, long pauses suggesting loading issues, specific input values that trigger the error.


Edge Cases

  • No error events found. The project may not have auto-capture enabled, or the error may be tracked under a custom event name. Use the available taxonomy event reader to search for error-related events. Report what you find and suggest what to instrument if nothing exists.
  • User not found. If use_amplitude_cohorts with action: "find" returns nothing, try searching with alternative identifiers (email domain, partial match). If still nothing, proceed without user filtering and search by error event alone.
  • Sessions found but no replay events. Some sessions may not have rrweb data (replay disabled, ad blocker, etc.). Skip those sessions and note it. Try the next session.
  • Only 1 session available. Present the timeline as "unvalidated reproduction steps" with Low confidence. Suggest the user try to reproduce manually to confirm.
  • Error is intermittent. If sessions show different paths to the same error, present them as separate reproduction paths: "Path A (seen in 3/5 sessions)" and "Path B (seen in 2/5 sessions)."
  • nodeId values can't be resolved. get_amp_session_replay_info with action: "events" returns DOM node IDs, not element names. Describe interactions by position (x, y coordinates), page context, and sequence rather than element identity. Use phrasing like "click in the upper-right area of the form" rather than "click the Submit button" unless you can infer from context.

Examples

Example 1: User-Reported Bug

User says: "Customer jane@acme.com says the export button doesn't work"

Actions:

  1. Get context and confirm project
  2. Look up jane@acme.com via use_amplitude_cohorts with action: "find"
  3. Find her recent sessions with get_amp_session_replay_info action: "search" filtered to her email + any error events
  4. Extract interaction timelines from 2-3 sessions
  5. Identify the common path: navigates to reports → clicks export → nothing happens (or error)
  6. Present numbered repro steps with replay links

Example 2: Error Spike Investigation

User says: "TypeError errors doubled yesterday, can you get repro steps?"

Actions:

  1. Get context, confirm [Amplitude] Error Logged exists
  2. Find sessions with TypeError in the last 48 hours via get_amp_session_replay_info action: "search"
  3. Extract timelines from 3-5 sessions
  4. Compare timelines to find the common action sequence before the TypeError
  5. Check deployments for what shipped yesterday
  6. Present repro steps anchored to the deployment

Example 3: Vague Bug Report

User says: "Users are having trouble with checkout"

Actions:

  1. Ask one clarifying question: "Do you have a specific error event or user in mind, or should I look for any errors on checkout pages?"
  2. Search for error events on checkout-related pages
  3. Find sessions, extract timelines, identify friction patterns
  4. Present repro steps for the most common failure path

Câu hỏi thường gặp

Kỹ năng AI Debug Replay làm được gì?

Turns bug reports into reproducible steps by finding error sessions in Amplitude Session Replay, extracting interaction timelines, and identifying the common action sequence that precedes the failure. Use when a user reports a bug, an error event spikes, someone says "how do I reproduce this", "what happened to user X", "repro steps", or you need to understand what a user did before an error occurred.

Vì sao nên dùng Debug Replay trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Debug Replay là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Debug Replay trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/amplitude/mcp-marketplace/tree/main/plugins/amplitude/skills/debug-replay. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Debug Replay?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Debug Replay với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Debug Replay với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Debug Replay có miễn phí không?

Có. Kỹ năng này được amplitude phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇