• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialmonitoring

debug-replay

プラグイン
amplitude
ソース
GitHub で見る ↗
説明

ユーザーが報告したバグを、Amplitude Session Replay(ユーザーの操作を記録・再生できるサービス)でエラーが発生したセッションを探し出し、操作の流れを抽出し、エラーの直前に共通する一連のアクションを特定することで、再現可能な手順に変換します。 **次のような場合に使用:** - ユーザーがバグを報告した - エラーイベントが急増した - 「これはどうやって再現できるのか」「ユーザーXに何が起きたのか」「再現手順を教えて」といった質問が出ている - エラーが起きる前にユーザーが何をしていたかを理解する必要がある

原文を表示

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.

ユースケース
  • ユーザーがバグを報告した
  • エラーイベントが急増した
  • バグの再現手順を特定する
  • エラー発生前のユーザー操作を調査する
本文(日本語訳)

Debug Replay

バグを調査するために、セッション動画(ユーザーがアプリケーションを操作する様子を記録したもの)から エラーが起きた場面を見つけ出し、そこまでの操作内容を時系列で抽出し、エンジニアが実際に再現できるようにステップバイステップの手順にまとめます。このスキルは「ユーザーがバグを報告した」という状態から「正確にはこうやって再現する」という状態への橋渡けをします。


重要: 使用するツール

このスキルは3つのAmplitude セッション動画ツールを使用します。以下の順番で使ってください:

  1. Amplitude:get_amp_session_replay_info (action: "search")— 特定の条件(エラーや特定ユーザー、時間範囲など)に当てはまるセッションを検索します。セッションの基本情報と動画へのリンクを返します。

  2. Amplitude:get_amp_session_replay_info (action: "list")— ユーザーIDやデバイスIDがわかっているときや、最近のセッションだけが必要なときに、簡単にセッション一覧を取得します。セッション動画IDを「デバイスID/セッションID」の形式で返します。

  3. Amplitude:get_amp_session_replay_info (action: "events")— 特定のセッション動画をデコード(データを読み込み可能な形に変換)して、画面遷移・クリック・文字入力・スクロールなどの操作の時系列を取得します。上記のツールから得たセッション動画IDを sessionReplayId として渡してください。

このスキルで使う補助ツール:

  • Amplitude:use_amplitude_cohorts (action: "find")— メールアドレスやユーザーIDなどでユーザーを検索します。
  • Amplitude:manage_amp_events (action: "get" かつ kind: "event")— フィルタリングに使えるイベント名を事前に確認します。イベント名を推測で入力してはいけません。
  • Amplitude:get_properties — イベントに付属している属性情報を確認し、フィルタリングに活用します。
  • Amplitude:use_amp_flags (action: "list_deployments")— エラーが最近のデプロイ(プログラム更新)と関連しているかを確認します。

手順

ステップ1: バグ報告の内容を整理する

ユーザーの報告から以下の情報を抽出してください:

  • エラーの内容: エラーメッセージ、エラーイベント名、またはイベントの種類(例: [Amplitude] Error Logged、カスタム(独自)エラーイベント)
  • ユーザー情報(わかれば): メールアドレス、ユーザーID、デバイスID、アカウント名など
  • 発生時期: いつ報告されたか、または発生し始めた時期。指定がなければ過去7日間としてください。
  • 影響する機能(わかれば): ページ、機能、またはどのような流れで発生するかなど

報告が曖昧な場合(例「チェックアウトで何か壊れている」)は、進める前に1つの確認質問をしてください。2つ以上質問してはいけません。

ステップ2: コンテキストを確認し、エラーイベントを見つける

  1. Amplitude:get_amplitude_context を呼び出してください。複数のプロジェクトがある場合は、どれを調べるか聞いてください。

  2. Amplitude:manage_amp_events を action: "get" と kind: "event" で呼び出し、プロジェクトに当該エラーイベントが存在することを確認します。一般的なパターン:

    • [Amplitude] Error Logged — JavaScriptの自動検出エラー
    • [Amplitude] Network Request (ステータスコードでフィルタ可能)— APIの失敗
    • その製品固有のカスタムエラーイベント
  3. ユーザー情報がある場合は、Amplitude:use_amplitude_cohorts を action: "find" で呼び出して、ユーザーのIDとデバイスIDを取得してください。

ステップ3: エラーが発生したセッションを探す

Amplitude:get_amp_session_replay_info を action: "search" で呼び出し、エラーが起きたセッションを探します。わかっている情報に基づいてフィルタを組み立ててください:

特定のユーザーの場合:

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

エラーメッセージがわかっているが特定ユーザーがわからない場合:

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

3~5個のセッションをリクエストしてください。セッション数が多いほどパターンが見えやすくなりますが、少ないほどコンテキストに余裕ができます。

ステップ4: 操作の時系列を抽出する

ステップ3で見つかった各セッションについて、Amplitude:get_amp_session_replay_info を action: "events" で呼び出し、sessionReplayId を渡します。

  • 通常は event_limit: 500 を使ってください
  • 4セッション以上を分析する場合は event_limit: 200 を使い、コンテキスト(文脈)の量を調整してください

各セッションから抽出すべき内容:

  • 画面遷移(訪問したURL)
  • エラーが起きるまでのクリックと文字入力
  • 異常なパターン: 同じボタンを何度も連打する(ユーザーのいら立ち)、長い待機時間、前後を何度も移動するなど
  • エラーが起きたと思われる時刻(セッションが終わる直前や、ユーザーが急いで別ページへ移動する時刻を目安に)

ステップ5: 共通する再現パターンを抽出する

これが分析の核となる部分です。複数のセッションの操作時系列を比較して、エラーの前に共通して起きている操作の流れ(共通の前置き)を見つけ出してください。

  1. エラーポイントから時系列を整列させてください。 エラーが起きたと思われる点から遡って分析します。
  2. 共通の操作を確認してください。 セッション間で同じ画面遷移・クリック・入力の流れがあるかを見ます。
  3. 異なる部分に注目してください。 時系列が異なる箇所を記録します。複数の再現パターンがあるか、任意のステップがあるかもしれません。
  4. シンプルにしてください。 不要な操作(スクロールなど)を削って、最小限のステップに整理します。

セッションが1つだけの場合は、その時系列をそのまま抽出し、複数セッションで検証されていないことを記載してください。

ステップ6: デプロイの背景を確認する

Amplitude:use_amp_flags を action: "list_deployments" で1回呼び出してください。エラーの急増が最近のデプロイと時期が合致していれば、それを記載してください。エンジニアにとって重要な情報です。

ステップ7: 再現手順を提示する

エンジニアがそのまま使えるバグ報告として構成してください。

必須セクション:

  1. バグの概要(1~2文): 何が壊れているか、誰が影響を受けているか、いつからか。エンジニアがチケットのタイトルに入れるような見出しとして書きます。

  2. 環境情報:

    • プロジェクトとプラットフォーム
    • 調査した期間
    • 分析したセッション数
    • 関連するデプロイ(あれば)
  3. 再現手順 — 番号を付け、具体的で、コピペできる形で:

## 再現手順

1. [URL] に遷移する
2. [要素/エリアの説明]([位置]付近)をクリックする
3. [フィールドの説明]に「[値]」と入力する
4. [要素/エリアの説明]をクリックする
5. 観察: [エラーの動作 — ユーザーに見える現象]

**期待される動作:** [起きるべき動作]
**実際の動作:** [実際に起きること]
  1. エラーの詳細(わかれば):

    • エラーメッセージ/タイプ
    • 失敗しているエンドポイント(ネットワークエラーの場合)
    • エラーが起きるページ
  2. セッション証拠:

    • 分析した各セッションの動画リンク(クリック可能)
    • 信頼度: 高(3セッション以上が同じパターン)、中(2セッション)、低(1セッションのみ)
    • セッション間での違いがあれば記載
  3. 観察所見(任意): デバッグの参考になるかもしれないパターン — ユーザーのいら立ちを示すクリックの連打(UIが反応していない兆候)、長い待機時間(読込の問題の兆候)、特定の入力値でエラーが起きるかなど。


特殊なケースへの対応

  • エラーイベントが見つからない。 プロジェクトで自動検出が有効になっていないか、カスタムイベント名で追跡されているかもしれません。Amplitude:manage_amp_events を action: "get" と kind: "event" で呼び出し、エラー関連のイベントを探してください。見つかったものを報告し、何もなければ何を設定すべきかを提案してください。

  • ユーザーが見つからない。 use_amplitude_cohorts を action: "find" で呼び出してもユーザーが出てこなければ、別の識別子(メールアドレスのドメイン、部分一致など)で試してください。それでも見つからなければ、ユーザーフィルタなしでエラーイベントだけで検索を進めてください。

  • セッションは見つかったが、動画データがない。 セッションに rrweb データ(動画の記録データ)がない場合があります(動画機能が無効、広告ブロッカーなど)。そのセッションをスキップし、記載してください。次のセッションを試してください。

  • セッションが1つだけ。 時系列を「未検証の再現手順」として、信頼度「低」で提示してください。ユーザーに手動で再現できるか確認することを勧めてください。

  • エラーが間欠的(ときどき起きる)。 セッションが異なる再現パターンを示す場合、別の手順として提示してください:「パターンA(5セッション中3セッション)」「パターンB(5セッション中2セッション)」のように。

  • ノードIDが解決できない。 get_amp_session_replay_info を action: "events" で呼び出すとDOM(HTMLの要素)のIDが返されますが、要素名では返されません。位置(X, Y座標)、ページの文脈、操作の流れで説明してください。「このボタンをクリック」ではなく「フォームの右上の領域をクリック」というような表現を使ってください。文脈から推測できれば要素名を使ってもかまいません。

例

例1: ユーザーからの報告

ユーザーが言った: 「顧客の jane@acme.com がエクスポートボタンが機能しないと言ってる」

対応:

  1. コンテキストを確認し、プロジェクトを特定
  2. use_amplitude_cohorts を action: "find" で jane@acme.com を検索
  3. get_amp_session_replay_info を action: "search" で、彼女のメール + エラーイベントでセッションを探す
  4. 2~3セッションから操作時系列を抽出
  5. 共通パターンを特定: 「レポートページに移動 → エクスポートボタンをクリック → 何も起きない(またはエラー)」
  6. 動画リンク付きの番号付き再現手順を提示

例2: エラー急増の調査

ユーザーが言った: 「TypeErrorが昨日の2倍に増えた。再現手順をもらえる?」

対応:

  1. コンテキストを確認、[Amplitude] Error Logged が存在するか確認
  2. get_amp_session_replay_info を action: "search" で、過去48時間のTypeErrorセッションを探す
  3. 3~5セッションから操作時系
原文(English)を表示

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.
  • Amplitude:manage_amp_events with action: "get" and kind: "event" — Discover valid event names before filtering. Never guess event names.
  • Amplitude:get_properties — Discover properties available on an event for filtering.
  • 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. Call Amplitude:manage_amp_events with action: "get" and kind: "event" to confirm the 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:

{
  "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:

{
  "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. Call Amplitude:manage_amp_events with action: "get" and kind: "event" and 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

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。