ユーザーが報告したバグを、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.
バグを調査するために、セッション動画(ユーザーがアプリケーションを操作する様子を記録したもの)から エラーが起きた場面を見つけ出し、そこまでの操作内容を時系列で抽出し、エンジニアが実際に再現できるようにステップバイステップの手順にまとめます。このスキルは「ユーザーがバグを報告した」という状態から「正確にはこうやって再現する」という状態への橋渡けをします。
このスキルは3つのAmplitude セッション動画ツールを使用します。以下の順番で使ってください:
Amplitude:get_amp_session_replay_info (action: "search")— 特定の条件(エラーや特定ユーザー、時間範囲など)に当てはまるセッションを検索します。セッションの基本情報と動画へのリンクを返します。
Amplitude:get_amp_session_replay_info (action: "list")— ユーザーIDやデバイスIDがわかっているときや、最近のセッションだけが必要なときに、簡単にセッション一覧を取得します。セッション動画IDを「デバイスID/セッションID」の形式で返します。
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")— エラーが最近のデプロイ(プログラム更新)と関連しているかを確認します。ユーザーの報告から以下の情報を抽出してください:
[Amplitude] Error Logged、カスタム(独自)エラーイベント)報告が曖昧な場合(例「チェックアウトで何か壊れている」)は、進める前に1つの確認質問をしてください。2つ以上質問してはいけません。
Amplitude:get_amplitude_context を呼び出してください。複数のプロジェクトがある場合は、どれを調べるか聞いてください。
Amplitude:manage_amp_events を action: "get" と kind: "event" で呼び出し、プロジェクトに当該エラーイベントが存在することを確認します。一般的なパターン:
[Amplitude] Error Logged — JavaScriptの自動検出エラー[Amplitude] Network Request (ステータスコードでフィルタ可能)— APIの失敗ユーザー情報がある場合は、Amplitude:use_amplitude_cohorts を action: "find" で呼び出して、ユーザーのIDとデバイスIDを取得してください。
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個のセッションをリクエストしてください。セッション数が多いほどパターンが見えやすくなりますが、少ないほどコンテキストに余裕ができます。
ステップ3で見つかった各セッションについて、Amplitude:get_amp_session_replay_info を action: "events" で呼び出し、sessionReplayId を渡します。
event_limit: 500 を使ってくださいevent_limit: 200 を使い、コンテキスト(文脈)の量を調整してください各セッションから抽出すべき内容:
これが分析の核となる部分です。複数のセッションの操作時系列を比較して、エラーの前に共通して起きている操作の流れ(共通の前置き)を見つけ出してください。
セッションが1つだけの場合は、その時系列をそのまま抽出し、複数セッションで検証されていないことを記載してください。
Amplitude:use_amp_flags を action: "list_deployments" で1回呼び出してください。エラーの急増が最近のデプロイと時期が合致していれば、それを記載してください。エンジニアにとって重要な情報です。
エンジニアがそのまま使えるバグ報告として構成してください。
必須セクション:
バグの概要(1~2文): 何が壊れているか、誰が影響を受けているか、いつからか。エンジニアがチケットのタイトルに入れるような見出しとして書きます。
環境情報:
再現手順 — 番号を付け、具体的で、コピペできる形で:
## 再現手順
1. [URL] に遷移する
2. [要素/エリアの説明]([位置]付近)をクリックする
3. [フィールドの説明]に「[値]」と入力する
4. [要素/エリアの説明]をクリックする
5. 観察: [エラーの動作 — ユーザーに見える現象]
**期待される動作:** [起きるべき動作]
**実際の動作:** [実際に起きること]
エラーの詳細(わかれば):
セッション証拠:
観察所見(任意): デバッグの参考になるかもしれないパターン — ユーザーのいら立ちを示すクリックの連打(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座標)、ページの文脈、操作の流れで説明してください。「このボタンをクリック」ではなく「フォームの右上の領域をクリック」というような表現を使ってください。文脈から推測できれば要素名を使ってもかまいません。
ユーザーが言った: 「顧客の jane@acme.com がエクスポートボタンが機能しないと言ってる」
対応:
use_amplitude_cohorts を action: "find" で jane@acme.com を検索get_amp_session_replay_info を action: "search" で、彼女のメール + エラーイベントでセッションを探すユーザーが言った: 「TypeErrorが昨日の2倍に増えた。再現手順をもらえる?」
対応:
[Amplitude] Error Logged が存在するか確認get_amp_session_replay_info を action: "search" で、過去48時間のTypeErrorセッションを探す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."
This skill operates on three Amplitude Session Replay tools. Use them in this order:
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.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.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.Parse the user's request to extract:
[Amplitude] Error Logged, a custom error event)If the report is vague (e.g., "something is broken in checkout"), ask one clarifying question before proceeding. Do not ask more than one.
Amplitude:get_amplitude_context. If multiple projects, ask which to investigate.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 failuresAmplitude:use_amplitude_cohorts with action: "find" to look up the user and get their user ID and device ID.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.
For each session found in Step 3, call Amplitude:get_amp_session_replay_info with action: "events" and the sessionReplayId.
event_limit: 500 for standard sessionsevent_limit: 200 if analyzing 4+ sessions (to manage context)What to capture from each timeline:
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.
If only 1 session is available, extract the timeline as-is and note that it hasn't been validated across multiple sessions.
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.
Structure the output as an engineering-ready bug report.
Required sections:
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.
Environment Context:
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]
Error Context (if available):
Session Evidence:
Observations (optional): Patterns that may help debugging — rage clicks suggesting UI unresponsiveness, long pauses suggesting loading issues, specific input values that trigger the error.
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.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.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.User says: "Customer jane@acme.com says the export button doesn't work"
Actions:
use_amplitude_cohorts with action: "find"get_amp_session_replay_info action: "search" filtered to her email + any error eventsUser says: "TypeError errors doubled yesterday, can you get repro steps?"
Actions:
[Amplitude] Error Logged existsget_amp_session_replay_info action: "search"User says: "Users are having trouble with checkout"
Actions:
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。