ユーザーが報告したバグを、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.
バグを調査するために、エラーが発生したセッションのリプレイ(再生記録)を見つけ、そこでのユーザーの操作の流れを抽出し、エンジニアが実行できる番号付きの再現手順に整理するスキルです。このスキルは「ユーザーがバグを報告した」という状態から「このように再現します」という具体的な手順へと橋渡しします。
このスキルは Amplitude Session Replay の3つのツールを使い、この順序で実行します:
Amplitude:get_amp_session_replay_info (action: "search" 指定)— エラーや特定ユーザー、時間帯などの条件に合うセッションを探します。セッションの情報とリプレイへのリンクが返されます。
Amplitude:get_amp_session_replay_info (action: "list" 指定)— ユーザーIDやデバイスIDがすでに分かっている場合、または最近のセッションが必要な場合に、シンプルなリスト取得を行います。device_id/session_id という形式のセッションリプレイIDが返されます。
Amplitude:get_amp_session_replay_info (action: "events" 指定)— 特定のリプレイを画面遷移、クリック、入力、スクロールなどのユーザーの操作タイムラインに変換します。前述のツールから得られたIDを sessionReplayId として渡します。
このスキルで使う補助ツール:
Amplitude:use_amplitude_cohorts (action: "find" 指定)— メールアドレスやユーザーID、その他の識別情報からユーザーを検索します。Amplitude:use_amp_flags (action: "list_deployments" 指定)— エラーが最近のアップデート・デプロイ(本番環境へのリリース)と関連しているか確認します。ユーザーの報告から以下の情報を抽出します:
[Amplitude] Error Logged、カスタムエラーイベント)報告が曖昧な場合(例:「チェックアウト機能が壊れている」)、先に進む前に1つだけ確認質問をします。複数質問は避けます。
Amplitude:get_amplitude_context を呼び出します。複数のプロジェクトがある場合は、どのプロジェクトを調査するか質問します。[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が応答していないことを示す怒りのクリック、読み込み遅延を示す長い待機時間、エラーを起こす特定の入力値など。
エラーイベントが見つからない。 そのプロジェクトで自動キャプチャが有効になっていない、またはエラーが別のカスタムイベント名で記録されている可能性があります。利用可能なカタログ検索でエラー関連イベントを探してください。見つかったものを報告し、何も存在しない場合は何を計測すべきか提案してください。
ユーザーが見つからない。 use_amplitude_cohorts を action: "find" 指定で実行した結果が空の場合、別の識別情報(メールドメイン、部分一致など)で試してください。それでも見つからなければ、ユーザーフィルターなしでエラーイベントだけで検索を進めます。
セッションは見つかったがリプレイデータがない。 一部セッションはリプレイ機能が無効、広告ブロッカー使用など、記録データがない場合があります。そのセッションをスキップし記載してください。別のセッションを試してください。
利用可能なセッションが1件だけ。 タイムラインを「未検証の再現手順」として「信頼度:低」で提示します。ユーザーに手動で再現を試して確認するよう提案してください。
エラーが間欠的に起きる。 複数セッションで同じエラーまでの道筋が異なる場合、別々の再現パターンとして提示してください:「パターンA(5件中3件で確認)」「パターンB(5件中2件で確認)」。
DOM ノードID が名前に解決できない。 get_amp_session_replay_info を action: "events" 指定で取得した結果には要素名ではなくDOMノード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" で検索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: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] 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.
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 による自動翻訳です。