Error Diagnosis & Triage
Investigate product errors by discovering and triaging error-related events in the user's Mixpanel project — failed API calls, JavaScript exceptions, UI error states, and other custom error tracking — to identify what's broken, which users are affected, and what's causing it. This skill cross-references multiple error signals to surface causal chains 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: Discovering Error Events
Unlike platforms with auto-captured error events, Mixpanel projects track errors using custom events. The first step is always to discover what error events exist in the project. Common patterns include:
- Events named with "error", "exception", "fail", "crash", "bug" in the name
- Events like
API Error, JS Exception, Error Displayed, Request Failed, App Crash
- Properties like
error_message, error_code, status_code, error_type, stack_trace, endpoint, page, url
Never assume event or property names — always use Get-Events and Get-Properties to discover the actual schema.
Instructions
Step 1: Context & Scope
- Call
Get-Projects to identify the active project. If multiple projects, ask which to investigate.
- Call
Get-Events to list all events. Scan for error-related events — look for names containing "error", "fail", "exception", "crash", or any event the user references.
- For each discovered error event, call
Get-Properties to understand its schema. Note the property names exactly as they appear.
- Determine the investigation scope from the user's request:
- Broad triage: "What's broken?" → scan all error events for the biggest problems
- Targeted: "API errors are up" → start with the API error event, then check for cascading errors
- Specific error: "Users are seeing TypeError" → filter to that error message
- Determine the time window. Default to the last 7 days with daily granularity unless the user specifies otherwise.
Step 2: Quantify the Error Landscape
Call Get-Query-Schema to understand the available query structure. Then use Run-Query to build queries. Run these in parallel where possible. Budget: 4-6 calls for this step.
2a. Error Volume & Trends
For each discovered error event:
- Error volume trend. Query daily event counts and unique users over the time window. Flag day-over-day spikes >25%.
- Top errors. Group by the error message/type property to find the highest-volume errors. Include error code or type for context.
- New vs. chronic. Compare errors in the recent window (last 7 days) to the prior period (7 days before that). Errors appearing only in the recent window are likely regressions. Errors present in both are chronic.
2b. API / Network Failures (if tracked)
If the project has API or network request events:
- Failure rate trend. Filter to error status codes (4xx, 5xx) or failure indicators. Measure daily counts and unique users. Compare to total request volume for a failure rate percentage.
- Top failing endpoints. Group by URL or endpoint property. Include status code as a secondary grouping to distinguish auth errors (401) from server errors (500) from not-found (404).
- Slow endpoints (if duration is tracked). Flag endpoints with high latency.
2c. UI Error States (if tracked)
If the project tracks error display events, error clicks, or error dismissals:
- Volume trend. Daily error display count. Spikes indicate users are actively encountering error states.
- What users are seeing. Group by error message or UI element to see which error states are most common.
Step 3: Cross-Event Correlation
This is where the skill adds value beyond looking at each event in isolation.
Failed request → exception chain. Compare the timing and pages of API failures (Step 2b) with JS errors (Step 2a). If the same pages have both failed requests AND exceptions, the API failure is likely the root cause. Use page or screen properties as the join dimension.
Error → frustration chain. Compare error events with UI error states or rage clicks if tracked. High error display volume on pages with high exception rates confirms users are seeing the broken experience.
Page-level triage. Use Run-Query to group error events by page or screen property. Produce a page-level error heatmap:
- Pages with API failures + exceptions + error displays = critical (full causal chain)
- Pages with exceptions + error displays but no API failures = frontend bug
- Pages with API failures but no exceptions = backend issue, gracefully handled
- Pages with exceptions but no error displays = 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
Run-Query 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, os) to determine if errors concentrate in a specific segment. Use
Get-Properties if you need to discover available user properties.
- Session Replays. Call
Get-User-Replays-Data for users who experienced the error. Provide 2-3 replay links so the user can watch exactly what happened.
Step 5: Root Cause Hypothesis
Build a root cause hypothesis using evidence from the prior steps:
- 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).
- Release correlation. If error spikes align with a known deployment date (ask the user or check for deploy-tracking events), it's the leading hypothesis.
- Segment concentration. If errors only affect one browser, platform, or plan tier, the root cause likely involves that specific environment or feature gate.
- Experiment correlation. If the user mentions an experiment or if errors concentrate in a segment that maps to an experiment variant, use
Run-Query to check error rates by variant.
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 discovered error signals:
| Signal | Volume (7d) | Trend | Top Source | Severity |
|--------|-------------|-------|------------|----------|
| [Error Event 1] | [N] events, [N] users | [+/-]% WoW | [top error message] | [Critical/High/Medium/Low] |
| [Error Event 2] | [N] events, [N] users | [+/-]% WoW | [top error message] | ... |
Top errors (3-5 max): Each as a narrative paragraph:
- [Error headline] — What's happening (the error), where (page/endpoint), who's affected (user count/segment), since when, and what to do (specific fix action). Include replay links inline.
Causal chains (if found): Describe the cross-event chain. Example: "POST to /api/query is returning 500 → this triggers an unhandled TypeError on the dashboard page → users see the error modal and retry. ~1,200 users affected in the last 7 days."
Recommended actions (2-4 numbered items): Concrete and specific. 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 plan tier, watch a few session replays, or build a monitoring board for these errors?"
Severity classification:
| Severity |
Criteria |
| Critical |
>5% of users affected, full causal chain, or blocking a core flow |
| High |
1-5% of users, errors on key pages, or a clear regression |
| Medium |
<1% of users, chronic errors, or errors on non-critical pages |
| Low |
Silent errors with no user-facing impact, or isolated to an edge-case segment |
Edge Cases
- No error events found. The project may not track errors as discrete events. Report this clearly: "This project doesn't appear to have dedicated error-tracking events. Consider instrumenting error events (e.g.,
Error Displayed, API Error, JS Exception) to enable error diagnosis." Suggest common error tracking patterns.
- 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.
- Error data is sparse. If only one error event type exists, 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 by that error message. Then check for correlated events.
- User asks about a specific user or account. Scope all queries to that user/account. Provide a session-level view using
Get-User-Replays-Data. Prioritize replay links.
Examples
Example 1: Broad Error Triage
User says: "What's broken right now?"
Actions:
- Get project context and discover error events
- Query all error events for the last 7 days — volume, trend, top sources
- Cross-reference by page to find causal chains
- 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 project context and error events
- Query error events comparing pre-deploy (7d before) vs post-deploy (last 24h)
- Identify new error messages that didn't exist before
- Check if new errors correlate with API failures
- Segment by page and feature to isolate the blast radius
- Present findings anchored to the deployment date
Example 3: Specific Error Deep-Dive
User says: "We're seeing a lot of TypeErrors in the chart builder"
Actions:
- Filter error events to TypeError and chart builder pages
- Group by error message and source file to find specific errors
- Check API/network events on the same pages for failing calls
- Pull session replays of users who hit the TypeError
- Present the error with reproduction steps derived from replays
1---2name: diagnose-errors3description: Investigates errors across custom error events, failed API calls, and exception tracking 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", "API failures", "something is broken", or wants to triage product reliability issues.4---56# Error Diagnosis & Triage78Investigate product errors by discovering and triaging error-related events in the user's Mixpanel project — failed API calls, JavaScript exceptions, UI error states, and other custom error tracking — to identify what's broken, which users are affected, and what's causing it. This skill cross-references multiple error signals to surface causal chains rather than treating each in isolation.910This 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.1112---1314## CRITICAL: Discovering Error Events1516Unlike platforms with auto-captured error events, Mixpanel projects track errors using custom events. The first step is always to **discover what error events exist** in the project. Common patterns include:1718- Events named with "error", "exception", "fail", "crash", "bug" in the name19- Events like `API Error`, `JS Exception`, `Error Displayed`, `Request Failed`, `App Crash`20- Properties like `error_message`, `error_code`, `status_code`, `error_type`, `stack_trace`, `endpoint`, `page`, `url`2122Never assume event or property names — always use `Get-Events` and `Get-Properties` to discover the actual schema.2324---2526## Instructions2728### Step 1: Context & Scope29301. Call `Get-Projects` to identify the active project. If multiple projects, ask which to investigate.312. Call `Get-Events` to list all events. Scan for error-related events — look for names containing "error", "fail", "exception", "crash", or any event the user references.323. For each discovered error event, call `Get-Properties` to understand its schema. Note the property names exactly as they appear.334. Determine the investigation scope from the user's request:34 - **Broad triage**: "What's broken?" → scan all error events for the biggest problems35 - **Targeted**: "API errors are up" → start with the API error event, then check for cascading errors36 - **Specific error**: "Users are seeing TypeError" → filter to that error message375. Determine the time window. Default to the last 7 days with daily granularity unless the user specifies otherwise.3839### Step 2: Quantify the Error Landscape4041Call `Get-Query-Schema` to understand the available query structure. Then use `Run-Query` to build queries. Run these in parallel where possible. Budget: 4-6 calls for this step.4243#### 2a. Error Volume & Trends4445For each discovered error event:46471. **Error volume trend.** Query daily event counts and unique users over the time window. Flag day-over-day spikes >25%.482. **Top errors.** Group by the error message/type property to find the highest-volume errors. Include error code or type for context.493. **New vs. chronic.** Compare errors in the recent window (last 7 days) to the prior period (7 days before that). Errors appearing only in the recent window are likely regressions. Errors present in both are chronic.5051#### 2b. API / Network Failures (if tracked)5253If the project has API or network request events:54551. **Failure rate trend.** Filter to error status codes (4xx, 5xx) or failure indicators. Measure daily counts and unique users. Compare to total request volume for a failure rate percentage.562. **Top failing endpoints.** Group by URL or endpoint property. Include status code as a secondary grouping to distinguish auth errors (401) from server errors (500) from not-found (404).573. **Slow endpoints (if duration is tracked).** Flag endpoints with high latency.5859#### 2c. UI Error States (if tracked)6061If the project tracks error display events, error clicks, or error dismissals:62631. **Volume trend.** Daily error display count. Spikes indicate users are actively encountering error states.642. **What users are seeing.** Group by error message or UI element to see which error states are most common.6566### Step 3: Cross-Event Correlation6768This is where the skill adds value beyond looking at each event in isolation.69701. **Failed request → exception chain.** Compare the timing and pages of API failures (Step 2b) with JS errors (Step 2a). If the same pages have both failed requests AND exceptions, the API failure is likely the root cause. Use page or screen properties as the join dimension.71722. **Error → frustration chain.** Compare error events with UI error states or rage clicks if tracked. High error display volume on pages with high exception rates confirms users are seeing the broken experience.73743. **Page-level triage.** Use `Run-Query` to group error events by page or screen property. Produce a page-level error heatmap:75 - Pages with API failures + exceptions + error displays = **critical** (full causal chain)76 - Pages with exceptions + error displays but no API failures = **frontend bug**77 - Pages with API failures but no exceptions = **backend issue, gracefully handled**78 - Pages with exceptions but no error displays = **silent errors** (may not affect UX)7980### Step 4: Identify Affected Users & Segments8182For the top 2-3 error patterns from Step 3:83841. **User scope.** Use `Run-Query` to count unique users affected. Compare to total active users for an impact percentage.852. **Segment breakdown.** Group by available user properties (platform, browser, country, plan tier, os) to determine if errors concentrate in a specific segment. Use `Get-Properties` if you need to discover available user properties.863. **Session Replays.** Call `Get-User-Replays-Data` for users who experienced the error. Provide 2-3 replay links so the user can watch exactly what happened.8788### Step 5: Root Cause Hypothesis8990Build a root cause hypothesis using evidence from the prior steps:91921. **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).932. **Release correlation.** If error spikes align with a known deployment date (ask the user or check for deploy-tracking events), it's the leading hypothesis.943. **Segment concentration.** If errors only affect one browser, platform, or plan tier, the root cause likely involves that specific environment or feature gate.954. **Experiment correlation.** If the user mentions an experiment or if errors concentrate in a segment that maps to an experiment variant, use `Run-Query` to check error rates by variant.9697### Step 6: Present the Diagnosis9899Structure the output as a triage report. Lead with what's most broken and actionable.100101**Required sections:**1021031. **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.1041052. **Error landscape** — A table summarizing the state across discovered error signals:106107```108| Signal | Volume (7d) | Trend | Top Source | Severity |109|--------|-------------|-------|------------|----------|110| [Error Event 1] | [N] events, [N] users | [+/-]% WoW | [top error message] | [Critical/High/Medium/Low] |111| [Error Event 2] | [N] events, [N] users | [+/-]% WoW | [top error message] | ... |112```1131143. **Top errors** (3-5 max): Each as a narrative paragraph:115 - **[Error headline]** — What's happening (the error), where (page/endpoint), who's affected (user count/segment), since when, and what to do (specific fix action). Include replay links inline.1161174. **Causal chains** (if found): Describe the cross-event chain. Example: "POST to `/api/query` is returning 500 → this triggers an unhandled TypeError on the dashboard page → users see the error modal and retry. ~1,200 users affected in the last 7 days."1181195. **Recommended actions** (2-4 numbered items): Concrete and specific. Start each with a verb. Bias toward fixing, investigating further with a specific breakdown, or setting up monitoring.1201216. **Follow-on prompt**: Ask what to dig into next — e.g., "Want me to segment the API failures by plan tier, watch a few session replays, or build a monitoring board for these errors?"122123**Severity classification:**124125| Severity | Criteria |126|----------|----------|127| **Critical** | >5% of users affected, full causal chain, or blocking a core flow |128| **High** | 1-5% of users, errors on key pages, or a clear regression |129| **Medium** | <1% of users, chronic errors, or errors on non-critical pages |130| **Low** | Silent errors with no user-facing impact, or isolated to an edge-case segment |131132---133134## Edge Cases135136- **No error events found.** The project may not track errors as discrete events. Report this clearly: "This project doesn't appear to have dedicated error-tracking events. Consider instrumenting error events (e.g., `Error Displayed`, `API Error`, `JS Exception`) to enable error diagnosis." Suggest common error tracking patterns.137- **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.138- **All errors are chronic.** If nothing is new, frame findings as tech debt priorities rather than regressions.139- **Error data is sparse.** If only one error event type exists, work with what's available. Note which signals are missing and what they would add.140- **User asks about a specific error message.** Skip the broad landscape scan (Step 2) and go directly to filtering by that error message. Then check for correlated events.141- **User asks about a specific user or account.** Scope all queries to that user/account. Provide a session-level view using `Get-User-Replays-Data`. Prioritize replay links.142143## Examples144145### Example 1: Broad Error Triage146147User says: "What's broken right now?"148149Actions:1501. Get project context and discover error events1512. Query all error events for the last 7 days — volume, trend, top sources1523. Cross-reference by page to find causal chains1534. Surface the 3-5 biggest issues ranked by user impact1545. Provide replay links for the worst pattern155156### Example 2: Regression Investigation157158User says: "Errors seem up since yesterday's deploy"159160Actions:1611. Get project context and error events1622. Query error events comparing pre-deploy (7d before) vs post-deploy (last 24h)1633. Identify new error messages that didn't exist before1644. Check if new errors correlate with API failures1655. Segment by page and feature to isolate the blast radius1666. Present findings anchored to the deployment date167168### Example 3: Specific Error Deep-Dive169170User says: "We're seeing a lot of TypeErrors in the chart builder"171172Actions:1731. Filter error events to TypeError and chart builder pages1742. Group by error message and source file to find specific errors1753. Check API/network events on the same pages for failing calls1764. Pull session replays of users who hit the TypeError1775. Present the error with reproduction steps derived from replays