• 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

diagnose-errors

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

エラーをネットワーク障害、JavaScript エラー、ページ操作に伴うエラーの観点から調査し、何が、どこで、なぜ問題が起きているのかを特定します。 次のような場合に使用: - ユーザーが「何が壊れているのか」「エラーが増えている」「ユーザーがエラーを見ているのはなぜか」「JavaScript エラー」「ネットワーク障害」「5xx エラーが急増している」「何かが壊れている」といったことを質問する場合 - 製品の信頼性に関する問題を優先順位付け(トリアージ)したい場合

原文を表示

Investigates errors across network failures, JavaScript errors, and error clicks to identify what's broken, where, and why. Use when the user says "what's broken", "errors are up", "why are users seeing errors", "JS errors", "network failures", "5xx spike", "something is broken", or wants to triage product reliability issues.

ユースケース
  • エラーの原因をネットワーク障害から調査するとき
  • JavaScriptエラーが発生している場面
  • ページ操作に伴うエラーを特定するとき
  • 製品の信頼性問題をトリアージするとき
本文(日本語訳)

エラー診断・優先度判定

3つの自動記録されたイベント—[Amplitude] Network Request(ネットワークリクエスト)、[Amplitude] Error Logged(ログされたエラー)、[Amplitude] Error Click(エラーのクリック)—を横断して分析し、製品のエラーを調査します。何が壊れているのか、どのユーザーが影響を受けているのか、原因は何なのかを特定します。このスキルは3つのシグナルすべてを相互参照し、因果関係(失敗したリクエスト → JavaScriptエラー → ユーザーの不満)を明らかにします。個別に対処するのではなく、全体のつながりを見ることが特徴です。

これは事後調査型のスキルです。ユーザーが何らかの信号(エラーの増加、苦情、実験の悪化、直感など)を受け取り、実際に何が起きているかを理解したいときに使います。継続的な監視については、monitor-reliabilityスキルを代わりにお使いください。


重要: イベント参照ガイド

このスキルが対象とする3つの自動記録イベントです。プロパティ名は必ずこちらを正確に使用してください。

[Amplitude] Network Request — ブラウザのネットワークリクエスト。 主要プロパティ: [Amplitude] URL、[Amplitude] Status Code、[Amplitude] Duration、[Amplitude] Request Method、[Amplitude] Request Type、[Amplitude] Request Body Size、[Amplitude] Response Body Size、[Amplitude] Start Time、[Amplitude] Completion Time、[Amplitude] Page Path。

[Amplitude] Error Logged — JavaScriptエラー。 主要プロパティ: Error Message、Error Type、Error URL、File Name、Error Lineno、Error Colno、Error Stack Trace、[Amplitude] Error Detection Source。

[Amplitude] Error Click — エラー関連のUI要素のクリック。 主要プロパティ: [Amplitude] Message、[Amplitude] Kind、[Amplitude] Filename、[Amplitude] Line Number、[Amplitude] Column Number、[Amplitude] Element Text、[Amplitude] Element Tag、[Amplitude] Element Hierarchy。

3つすべてが共有: [Amplitude] Page Path、[Amplitude] Page URL、[Amplitude] Session Replay ID。


調査手順

ステップ1: 背景と調査範囲の確認

  1. Amplitude:get_amplitude_contextを実行。複数プロジェクトの場合は、どのプロジェクトを調査するか確認。
  2. ユーザーのリクエストから調査範囲を判断:
    • 広く全体的な調査: 「何が壊れている?」→ 3つのイベント全体をスキャンして最大の問題を特定
    • 絞った調査: 「ネットワークエラーが増えている」→ [Amplitude] Network Requestから開始し、JavaScriptエラーに繋がっているか確認
    • 特定のエラー: 「ユーザーがTypeErrorを見ている」→ [Amplitude] Error Loggedをそのエラーでフィルタして開始
  3. 時間範囲を決定。特に指定がなければ過去7日間で1日単位。デプロイや日付の言及があればそれを基準に設定。

ステップ2: エラー状況の全体把握

可能な限り並行して実行。このステップで4-6回の呼び出しを想定。

2a. ネットワーク障害

Amplitude:query_datasetを使用して[Amplitude] Network Requestを照会:

  1. 障害率の推移. [Amplitude] Status Codeを4xx・5xxの範囲でフィルタ。1日ごとのイベント数とユーザー数を測定。全体のネットワークリクエスト数と比較して障害率(パーセンテージ)を算出。
  2. 障害が多いエンドポイント. [Amplitude] URLでグループ化してランク付け。セカンダリグループとして[Amplitude] Status Codeを追加し、401(認証エラー)、500(サーバーエラー)、404(見つからない)を区別。
  3. 遅いエンドポイント(関連性がある場合). ユーザーがパフォーマンス・遅さに言及していれば、[Amplitude] Durationを[Amplitude] URLでグループ化。P95(パーセンタイル)が3秒超またはアベレージが1秒超のものをフラグ。

2b. JavaScriptエラー

Amplitude:query_datasetを使用して[Amplitude] Error Loggedを照会:

  1. エラー数の推移. 1日ごとのエラー数と影響を受けたユーザー数。前日比の増加が25%を超えたらフラグ。
  2. エラーのトップ. Error Messageでグループ化して最も数が多いエラーを特定。コンテキストのためError TypeとFile Nameを含める。
  3. 新規 vs 慢性的. 最近の期間のエラーと前の期間を比較。最近だけに現れたエラーはリグレッション(回帰)の可能性が高い。両期間にあるエラーは技術的な積み重なった問題。

2c. エラークリック(ユーザーの不満の兆候)

Amplitude:query_datasetを使用して[Amplitude] Error Clickを照会:

  1. 数の推移. 1日ごとのエラークリック数。スパイク(急上昇)があればユーザーがエラー状態に積極的に遭遇し、対応していることを示す。
  2. ユーザーが何をクリックしているか. [Amplitude] Element Textまたは[Amplitude] Messageでグループ化して、どのエラーUI要素がもっともクリックされているか確認。

ステップ3: イベント横断の相関分析

ここでこのスキルが個別分析を超えた価値を発揮します。

  1. 失敗したリクエスト → JavaScriptエラーの連鎖. ネットワーク障害(ステップ2a)と JavaScriptエラー(ステップ2b)のタイミングとページを比較。同じページに5xxのネットワーク障害とJavaScriptエラー両方がある場合、ネットワーク障害が根本原因と考えられます。結合キーとして[Amplitude] Page Pathを使用。

  2. エラー → ユーザーの不満の連鎖. JavaScriptエラーのページとエラークリックのページを比較。JavaScriptエラー率の高いページでエラークリック数が多いことが、ユーザーが壊れた体験に遭遇し、対応していることを確認。

  3. ページレベルの優先度判定. Amplitude:query_datasetを使用して3つのイベント全体を[Amplitude] Page Pathでグループ化。ページレベルのエラーヒートマップ(濃淡図)を作成:

    • ネットワーク障害 + JavaScriptエラー + エラークリック = 極度に重大(完全な因果関係)
    • JavaScriptエラー + エラークリックだがネットワーク障害なし = フロントエンドバグ
    • ネットワーク障害だがJavaScriptエラーなし = バックエンド問題(うまく処理されている)
    • JavaScriptエラーだがエラークリックなし = サイレントエラー(UXに影響しない可能性)

ステップ4: 影響を受けるユーザーとセグメントの特定

ステップ3から最も影響が大きい2-3のエラーパターンについて:

  1. ユーザー規模. Amplitude:query_datasetを使用して影響を受けた一意のユーザー数を計算。全アクティブユーザーと比較して影響度(パーセンテージ)を算出。
  2. セグメント分析. 利用可能なユーザー属性(プラットフォーム、ブラウザ、国、プラン階層、組織など)でグループ化して、エラーが特定のセグメントに集中していないか判定。利用可能なプロパティを調べるためAmplitude:get_propertiesを呼び出す。
  3. セッションリプレイ. 最も影響が大きいエラーパターンについて、Amplitude:get_session_replaysを呼び出してそのエラーイベントを含むセッションをフィルタ。ユーザーが実際に何を経験したのかが見えるよう、2-3個のリプレイリンクを提供。

ステップ5: 根本原因の仮説構築

前のステップの証拠を使用して根本原因の仮説を組み立てます:

  1. デプロイとの関連性. Amplitude:get_deploymentsを1回呼び出し。エラースパイクが最近のデプロイと一致するかチェック。エラースパイクの24時間以内にデプロイがあれば、それが最有力仮説です。
  2. 実験との関連性. ユーザーが実験に言及している、またはエラーが実験のバリアント(分岐版)に対応するセグメントに集中している場合は、Amplitude:get_experimentsとAmplitude:query_experimentを呼び出してチェック。
  3. 時間的パターン. エラーは一定か、断続的か、増加傾向か? 一定ならコードバグ。断続的ならインフラストラクチャの問題。増加傾向なら段階的な障害(メモリリーク、キューのバックログなど)を示唆。
  4. ユーザーフィードバックとの関連性. Amplitude:get_feedback_sources、次にAmplitude:get_feedback_insightsを呼び出し、エラーメッセージの最上位キーワードで検索。ユーザーが同じ問題を報告していれば、影響と妥当性が確認でき、データだけでは得られない追加情報が得られるかもしれません。

ステップ6: 診断結果の提示

優先度判定レポートとして出力を構成。最も重大で実行可能な内容から提示します。

必須セクション:

  1. 診断サマリー(2-3文): 最も重要な1つの発見。エンジニアリングリーダーに送れるようなヘッドラインで記述。範囲を含める: 何人のユーザー、どのページ、いつから。

  2. エラー状況 — 3つのシグナルすべての状態をまとめたテーブル:

| シグナル | 数(過去7日) | 傾向 | トップソース | 重大度 |
|---------|--------------|------|------------|--------|
| ネットワーク障害(4xx/5xx) | [N]リクエスト | [↑/↓/→] | [エンドポイント] | [極度に重大/高/中/低] |
| JavaScriptエラー | [N]エラー、[N]ユーザー | [↑/↓/→] | [エラーメッセージ] | ... |
| エラークリック | [N]クリック | [↑/↓/→] | [要素テキスト] | ... |
  1. トップエラー(最大3-5個): 各項目を1つの段落として記述:

    • [エラーのタイトル — 10字以内] — 何が起きているか(エラー内容)、どこで(ページ/エンドポイント)、誰が影響を受けているか(ユーザー数/セグメント)、いつからか(デプロイまたは日付)、何をするべきか(具体的な修正アクション)。グラフリンクとリプレイリンクを本文中に含める。
  2. 因果関係(見つかった場合): イベント横断の連鎖を記述。例: 「POST /api/queryが500を返す → ChartRenderer.tsx:142の未処理のTypeErrorをトリガ → ユーザーがエラー状態を見てクリック。過去7日間に約1,200ユーザーが影響。」

  3. 推奨アクション(2-4個の番号付き): 具体的でコピペ可能。各項目は動詞で開始。修正、特定の分析で詳しく調べる、または監視ダッシュボードの構築へバイアスをかけます。

  4. 次のステップの質問: 次に何を掘り下げるか確認—例えば「APIエラーを組織階層別にセグメント化するか、セッションリプレイを見るか、これらのエラーの監視ダッシュボードを構築するか?」

重大度分類:

重大度 判断基準
極度に重大 ユーザーの5%以上が影響、完全な因果関係(ネットワーク → エラー → 不満)、または主要フローをブロック
高 1-5%のユーザーが影響、重要なページのJavaScriptエラー、またはデプロイからの明確なリグレッション
中 1%未満のユーザーが影響
原文(English)を表示

Error Diagnosis & Triage

Investigate product errors by triaging across three auto-captured event types — [Amplitude] Network Request, [Amplitude] Error Logged, and [Amplitude] Error Click — to identify what's broken, which users are affected, and what's causing it. This skill cross-references all three signals to surface causal chains (failed request → JS error → user frustration) rather than treating each in isolation.

This is a reactive investigation skill — the user has a signal (spike, complaint, experiment regression, gut feeling) and wants to understand what's happening. For proactive monitoring, use the monitor-reliability skill instead.


CRITICAL: Event Reference

These are the three auto-captured events this skill operates on. Never guess property names — use exactly these.

[Amplitude] Network Request — Browser network requests. Key properties: [Amplitude] URL, [Amplitude] Status Code, [Amplitude] Duration, [Amplitude] Request Method, [Amplitude] Request Type, [Amplitude] Request Body Size, [Amplitude] Response Body Size, [Amplitude] Start Time, [Amplitude] Completion Time, [Amplitude] Page Path.

[Amplitude] Error Logged — JavaScript errors. Key properties: Error Message, Error Type, Error URL, File Name, Error Lineno, Error Colno, Error Stack Trace, [Amplitude] Error Detection Source.

[Amplitude] Error Click — Clicks on error-associated UI elements. Key properties: [Amplitude] Message, [Amplitude] Kind, [Amplitude] Filename, [Amplitude] Line Number, [Amplitude] Column Number, [Amplitude] Element Text, [Amplitude] Element Tag, [Amplitude] Element Hierarchy.

All three share: [Amplitude] Page Path, [Amplitude] Page URL, [Amplitude] Session Replay ID.


Instructions

Step 1: Context & Scope

  1. Call Amplitude:get_amplitude_context. If multiple projects, ask which to investigate.
  2. Determine the investigation scope from the user's request:
    • Broad triage: "What's broken?" → scan all three event types for the biggest problems
    • Targeted: "Network errors are up" → start with [Amplitude] Network Request, then check if they cascade into JS errors
    • Specific error: "Users are seeing TypeError" → start with [Amplitude] Error Logged, filtered to that error
  3. Determine the time window. Default to the last 7 days with daily granularity unless the user specifies otherwise. If they mention a deploy or date, anchor to that.

Step 2: Quantify the Error Landscape

Run these in parallel where possible. Budget: 4-6 calls for this step.

2a. Network Failures

Use Amplitude:query_amplitude_data to query [Amplitude] Network Request:

  1. Failure rate trend. Filter [Amplitude] Status Code to 4xx and 5xx ranges. Measure daily event counts and unique users. Compare to total network request volume for a failure rate percentage.
  2. Top failing endpoints. Group by [Amplitude] URL to rank which APIs fail most. Include [Amplitude] Status Code as a secondary grouping to distinguish 401s (auth) from 500s (server errors) from 404s (missing).
  3. Slow endpoints (if relevant). If the user mentions performance or slowness, measure [Amplitude] Duration by [Amplitude] URL. Flag P95 > 3s or mean > 1s.

2b. JavaScript Errors

Use Amplitude:query_amplitude_data to query [Amplitude] Error Logged:

  1. Error volume trend. Daily error count and unique users affected over the time window. Flag day-over-day spikes >25%.
  2. Top errors. Group by Error Message to find the highest-volume errors. Include Error Type and File Name for context.
  3. New vs. chronic. Compare errors in the recent window to the prior period. Errors that appear only in the recent window are likely regressions. Errors present in both are chronic tech debt.

2c. Error Clicks (Frustration Signal)

Use Amplitude:query_amplitude_data to query [Amplitude] Error Click:

  1. Volume trend. Daily error click count. Spikes indicate users are actively encountering and engaging with error states.
  2. What users are clicking. Group by [Amplitude] Element Text or [Amplitude] Message to see which error UI elements get the most interaction.

Step 3: Cross-Event Correlation

This is where the skill adds value beyond looking at each event in isolation.

  1. Failed request → JS error chain. Compare the timing and pages of network failures (Step 2a) with JS errors (Step 2b). If the same pages have both 5xx network failures AND JS errors, the network failure is likely the root cause. Use [Amplitude] Page Path as the join dimension.

  2. Error → frustration chain. Compare JS error pages with error click pages. High error click volume on pages with high JS error rates confirms users are seeing and interacting with the broken experience.

  3. Page-level triage. Use Amplitude:query_amplitude_data to group all three events by [Amplitude] Page Path. Produce a page-level error heatmap:

    • Pages with network failures + JS errors + error clicks = critical (full causal chain)
    • Pages with JS errors + error clicks but no network failures = frontend bug
    • Pages with network failures but no JS errors = backend issue, gracefully handled
    • Pages with JS errors but no error clicks = silent errors (may not affect UX)

Step 4: Identify Affected Users & Segments

For the top 2-3 error patterns from Step 3:

  1. User scope. Use Amplitude:query_amplitude_data to count unique users affected. Compare to total active users for an impact percentage.
  2. Segment breakdown. Group by available user properties (platform, browser, country, plan tier, org) to determine if errors concentrate in a specific segment. Call Amplitude:get_properties if you need to discover available properties.
  3. Session Replays. For the most impactful error pattern, call Amplitude:get_amp_session_replay_info with action: "search" filtered to sessions containing the error event. Provide 2-3 replay links so the user can see exactly what happened.

Step 5: Root Cause Hypothesis

Build a root cause hypothesis using evidence from the prior steps:

  1. Deployment correlation. Call Amplitude:use_amp_flags with action: "list_deployments" once. Check if error spikes align with recent deploys. If a deployment shipped within 24 hours of the error spike, it's the leading hypothesis.
  2. Experiment correlation. If the user mentions an experiment or if errors concentrate in a segment that maps to an experiment variant, call Amplitude:use_amp_experiments with action: "get", then with action: "analyze" to check.
  3. Temporal pattern. Is the error constant, intermittent, or growing? Constant suggests a code bug. Intermittent suggests infrastructure. Growing suggests a progressive failure (memory leak, queue backlog).
  4. Feedback correlation. Call Amplitude:use_amplitude_ai_feedback with facet: "sources" then facet: "insights" with keywords from the top error messages. If users are reporting the same issue, it validates the impact and may provide additional context the data can't.

Step 6: Present the Diagnosis

Structure the output as a triage report. Lead with what's most broken and actionable.

Required sections:

  1. Diagnosis summary (2-3 sentences): The single most important finding. Written as a headline you'd send to the engineering lead. Include scope: how many users, which pages, since when.

  2. Error landscape — A table summarizing the state across all three signal types:

| Signal | Volume (7d) | Trend | Top Source | Severity |
|--------|-------------|-------|------------|----------|
| Network failures (4xx/5xx) | [N] requests | [↑/↓/→] | [endpoint] | [Critical/High/Medium/Low] |
| JS errors | [N] errors, [N] users | [↑/↓/→] | [Error Message] | ... |
| Error clicks | [N] clicks | [↑/↓/→] | [Element Text] | ... |
  1. Top errors (3-5 max): Each as a narrative paragraph:

    • [Error headline — ≤10 words] — What's happening (the error), where (page/endpoint), who's affected (user count/segment), since when (deployment or date), and what to do (specific fix action). Include chart links and replay links inline.
  2. Causal chains (if found): Describe the cross-event chain. "POST to /api/query is returning 500 → this triggers an unhandled TypeError in ChartRenderer.tsx:142 → users see and click the error state. ~1,200 users affected in the last 7 days."

  3. Recommended actions (2-4 numbered items): Concrete, copy-paste-ready. Start each with a verb. Bias toward fixing, investigating further with a specific breakdown, or setting up monitoring.

  4. Follow-on prompt: Ask what to dig into next — e.g., "Want me to segment the API failures by org tier, watch a few session replays, or build a monitoring dashboard for these errors?"

Severity classification:

Severity Criteria
Critical >5% of users affected, full causal chain (network → error → frustration), or blocking a core flow
High 1-5% of users, JS errors on key pages, or a clear regression from a deploy
Medium <1% of users, chronic errors, or errors on non-critical pages
Low Silent errors with no user-facing impact, or errors isolated to a single edge-case segment

Edge Cases

  • No auto-captured error events. The project may not have Session Replay or autocapture enabled. Report this clearly: "This project doesn't appear to have [Amplitude] Network Request, [Amplitude] Error Logged, or [Amplitude] Error Click events. These require Session Replay or the autocapture plugin to be enabled." Suggest the user check their SDK configuration.
  • Very high error volume. If >100K errors in the window, focus on unique error messages and affected user counts, not raw event counts. Group aggressively.
  • All errors are chronic. If nothing is new, frame findings as tech debt priorities rather than regressions. Compare error-free session rate to establish a baseline.
  • Error data is sparse. If only one of the three events has data, work with what's available. Note which signals are missing and what they would add.
  • User asks about a specific error message. Skip the broad landscape scan (Step 2) and go directly to filtering [Amplitude] Error Logged by Error Message. Then check for correlated network failures and error clicks.
  • User asks about a specific user or org. Scope all queries to that user/org. Provide a session-level timeline of errors rather than aggregate trends. Prioritize Session Replay links.

Examples

Example 1: Broad Error Triage

User says: "What's broken right now?"

Actions:

  1. Get context and project
  2. Query all three error events for the last 7 days — volume, trend, top sources
  3. Cross-reference by page to find causal chains
  4. Check deployments for correlation
  5. Surface the 3-5 biggest issues ranked by user impact
  6. Provide replay links for the worst pattern

Example 2: Regression Investigation

User says: "Errors seem up since yesterday's deploy"

Actions:

  1. Get context and check use_amp_flags with action: "list_deployments" for what shipped
  2. Query [Amplitude] Error Logged comparing pre-deploy (7d before) vs post-deploy (last 24h)
  3. Identify new error messages that didn't exist before the deploy
  4. Check if new errors correlate with failing network requests
  5. Segment by page and feature to isolate the blast radius
  6. Present findings anchored to the specific deployment

Example 3: Specific Error Deep-Dive

User says: "We're seeing a lot of TypeErrors in the chart builder"

Actions:

  1. Filter [Amplitude] Error Logged to Error Type = TypeError and [Amplitude] Page Path containing the chart builder
  2. Group by Error Message and File Name to find the specific errors
  3. Check [Amplitude] Network Request on the same pages for failing API calls
  4. Pull session replays of users who hit the TypeError
  5. Present the error with reproduction steps derived from replay patterns

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