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
- Call
Amplitude:get_amplitude_context. If multiple projects, ask which to investigate.
- 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
- 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:
- 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.
- 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).
- 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:
- Error volume trend. Daily error count and unique users affected over the time window. Flag day-over-day spikes >25%.
- Top errors. Group by
Error Message to find the highest-volume errors. Include Error Type and File Name for context.
- 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:
- Volume trend. Daily error click count. Spikes indicate users are actively encountering and engaging with error states.
- 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.
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.
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.
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:
- User scope. Use
Amplitude:query_amplitude_data to count unique users affected. Compare to total active users for an impact percentage.
- Segment breakdown. Group by available user properties (platform,
browser, country, plan tier, org) to determine if errors concentrate in a
specific segment. If discovery is needed, inspect the connected catalog and
use its current taxonomy property reader.
- 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:
- 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.
- 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.
- 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).
- 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:
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.
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] | ... |
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.
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."
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.
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:
- Get context and project
- Query all three error events for the last 7 days — volume, trend, top sources
- Cross-reference by page to find causal chains
- Check deployments for correlation
- Surface the 3-5 biggest issues ranked by user impact
- Provide replay links for the worst pattern
Example 2: Regression Investigation
User says: "Errors seem up since yesterday's deploy"
Actions:
- Get context and check
use_amp_flags with action: "list_deployments" for what shipped
- Query
[Amplitude] Error Logged comparing pre-deploy (7d before) vs post-deploy (last 24h)
- Identify new error messages that didn't exist before the deploy
- Check if new errors correlate with failing network requests
- Segment by page and feature to isolate the blast radius
- 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:
- Filter
[Amplitude] Error Logged to Error Type = TypeError and [Amplitude] Page Path containing the chart builder
- Group by
Error Message and File Name to find the specific errors
- Check
[Amplitude] Network Request on the same pages for failing API calls
- Pull session replays of users who hit the TypeError
- Present the error with reproduction steps derived from replay patterns
1---2name: diagnose-errors3description: 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.4---5
6# Error Diagnosis & Triage
7
8Investigate 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.
9
10This 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.
11
12---
13
14## CRITICAL: Event Reference
15
16These are the three auto-captured events this skill operates on. Never guess property names — use exactly these.
17
18**`[Amplitude] Network Request`** — Browser network requests.
19Key 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`.
20
21**`[Amplitude] Error Logged`** — JavaScript errors.
22Key properties: `Error Message`, `Error Type`, `Error URL`, `File Name`, `Error Lineno`, `Error Colno`, `Error Stack Trace`, `[Amplitude] Error Detection Source`.
23
24**`[Amplitude] Error Click`** — Clicks on error-associated UI elements.
25Key properties: `[Amplitude] Message`, `[Amplitude] Kind`, `[Amplitude] Filename`, `[Amplitude] Line Number`, `[Amplitude] Column Number`, `[Amplitude] Element Text`, `[Amplitude] Element Tag`, `[Amplitude] Element Hierarchy`.
26
27All three share: `[Amplitude] Page Path`, `[Amplitude] Page URL`, `[Amplitude] Session Replay ID`.
28
29---
30
31## Instructions
32
33### Step 1: Context & Scope
34
351. Call `Amplitude:get_amplitude_context`. If multiple projects, ask which to investigate.
362. Determine the investigation scope from the user's request:
37 - **Broad triage**: "What's broken?" → scan all three event types for the biggest problems
38 - **Targeted**: "Network errors are up" → start with `[Amplitude] Network Request`, then check if they cascade into JS errors
39 - **Specific error**: "Users are seeing TypeError" → start with `[Amplitude] Error Logged`, filtered to that error
403. 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.
41
42### Step 2: Quantify the Error Landscape
43
44Run these in parallel where possible. Budget: 4-6 calls for this step.
45
46#### 2a. Network Failures
47
48Use `Amplitude:query_amplitude_data` to query `[Amplitude] Network Request`:
49
501. **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.
512. **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).
523. **Slow endpoints (if relevant).** If the user mentions performance or slowness, measure `[Amplitude] Duration` by `[Amplitude] URL`. Flag P95 > 3s or mean > 1s.
53
54#### 2b. JavaScript Errors
55
56Use `Amplitude:query_amplitude_data` to query `[Amplitude] Error Logged`:
57
581. **Error volume trend.** Daily error count and unique users affected over the time window. Flag day-over-day spikes >25%.
592. **Top errors.** Group by `Error Message` to find the highest-volume errors. Include `Error Type` and `File Name` for context.
603. **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.
61
62#### 2c. Error Clicks (Frustration Signal)
63
64Use `Amplitude:query_amplitude_data` to query `[Amplitude] Error Click`:
65
661. **Volume trend.** Daily error click count. Spikes indicate users are actively encountering and engaging with error states.
672. **What users are clicking.** Group by `[Amplitude] Element Text` or `[Amplitude] Message` to see which error UI elements get the most interaction.
68
69### Step 3: Cross-Event Correlation
70
71This is where the skill adds value beyond looking at each event in isolation.
72
731. **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.
74
752. **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.
76
773. **Page-level triage.** Use `Amplitude:query_amplitude_data` to group all three events by `[Amplitude] Page Path`. Produce a page-level error heatmap:
78 - Pages with network failures + JS errors + error clicks = **critical** (full causal chain)
79 - Pages with JS errors + error clicks but no network failures = **frontend bug**
80 - Pages with network failures but no JS errors = **backend issue, gracefully handled**
81 - Pages with JS errors but no error clicks = **silent errors** (may not affect UX)
82
83### Step 4: Identify Affected Users & Segments
84
85For the top 2-3 error patterns from Step 3:
86
871. **User scope.** Use `Amplitude:query_amplitude_data` to count unique users affected. Compare to total active users for an impact percentage.
882. **Segment breakdown.** Group by available user properties (platform,
89 browser, country, plan tier, org) to determine if errors concentrate in a
90 specific segment. If discovery is needed, inspect the connected catalog and
91 use its current taxonomy property reader.
923. **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.
93
94### Step 5: Root Cause Hypothesis
95
96Build a root cause hypothesis using evidence from the prior steps:
97
981. **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.
992. **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.
1003. **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).
1014. **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.
102
103### Step 6: Present the Diagnosis
104
105Structure the output as a triage report. Lead with what's most broken and actionable.
106
107**Required sections:**
108
1091. **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.
110
1112. **Error landscape** — A table summarizing the state across all three signal types:
112
113```
114| Signal | Volume (7d) | Trend | Top Source | Severity |
115|--------|-------------|-------|------------|----------|
116| Network failures (4xx/5xx) | [N] requests | [↑/↓/→] | [endpoint] | [Critical/High/Medium/Low] |
117| JS errors | [N] errors, [N] users | [↑/↓/→] | [Error Message] | ... |
118| Error clicks | [N] clicks | [↑/↓/→] | [Element Text] | ... |
119```
120
1213. **Top errors** (3-5 max): Each as a narrative paragraph:
122 - **[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.
123
1244. **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."
125
1265. **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.
127
1286. **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?"
129
130**Severity classification:**
131
132| Severity | Criteria |
133|----------|----------|
134| **Critical** | >5% of users affected, full causal chain (network → error → frustration), or blocking a core flow |
135| **High** | 1-5% of users, JS errors on key pages, or a clear regression from a deploy |
136| **Medium** | <1% of users, chronic errors, or errors on non-critical pages |
137| **Low** | Silent errors with no user-facing impact, or errors isolated to a single edge-case segment |
138
139---
140
141## Edge Cases
142
143- **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.
144- **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.
145- **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.
146- **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.
147- **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.
148- **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.
149
150## Examples
151
152### Example 1: Broad Error Triage
153
154User says: "What's broken right now?"
155
156Actions:
1571. Get context and project
1582. Query all three error events for the last 7 days — volume, trend, top sources
1593. Cross-reference by page to find causal chains
1604. Check deployments for correlation
1615. Surface the 3-5 biggest issues ranked by user impact
1626. Provide replay links for the worst pattern
163
164### Example 2: Regression Investigation
165
166User says: "Errors seem up since yesterday's deploy"
167
168Actions:
1691. Get context and check `use_amp_flags` with `action: "list_deployments"` for what shipped
1702. Query `[Amplitude] Error Logged` comparing pre-deploy (7d before) vs post-deploy (last 24h)
1713. Identify new error messages that didn't exist before the deploy
1724. Check if new errors correlate with failing network requests
1735. Segment by page and feature to isolate the blast radius
1746. Present findings anchored to the specific deployment
175
176### Example 3: Specific Error Deep-Dive
177
178User says: "We're seeing a lot of TypeErrors in the chart builder"
179
180Actions:
1811. Filter `[Amplitude] Error Logged` to `Error Type = TypeError` and `[Amplitude] Page Path` containing the chart builder
1822. Group by `Error Message` and `File Name` to find the specific errors
1833. Check `[Amplitude] Network Request` on the same pages for failing API calls
1844. Pull session replays of users who hit the TypeError
1855. Present the error with reproduction steps derived from replay patterns