From magic-powers
Triage and investigate application errors using Amplitude's auto-captured error events. Uses mcp__Amplitude__query_amplitude_data, mcp__Amplitude__get_session_replays, mcp__Amplitude__get_charts.
npx claudepluginhub kienbui1995/magic-powers --plugin magic-powersThis skill uses the workspace's default tool permissions.
- Users are reporting errors but you don't know which errors or how many users are affected
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Amplitude auto-captures three error categories. Query all three:
Network errors — failed API/HTTP calls:
mcp__Amplitude__query_amplitude_data:
event: "[Amplitude] Network Error" (or project-specific name)
time_range: last 24h
group_by: endpoint, http_status_code, error_message
JS errors — unhandled JavaScript exceptions:
mcp__Amplitude__query_amplitude_data:
event: "[Amplitude] JS Error"
time_range: last 24h
group_by: error_type, error_message, file, line_number
Error clicks — clicks on elements in an error state:
mcp__Amplitude__query_amplitude_data:
event: "[Amplitude] Error Click" (or rage_click, error_element_clicked)
time_range: last 24h
group_by: element, page_url
Also check: mcp__Amplitude__get_charts for any pre-built error rate dashboards in the project.
Rank errors by unique user count (not total occurrences — one user hitting an error 100 times is less severe than 100 users hitting it once):
Top Errors (last 24h):
#1: POST /api/payments → 500 Internal Server Error
Affected users: 847 | Total occurrences: 1,203
First seen: 2024-11-08 14:15 UTC
#2: TypeError: Cannot read property 'name' of undefined (profile.js:89)
Affected users: 312 | Total occurrences: 419
First seen: 2024-11-07 09:22 UTC
#3: GET /api/user/preferences → 404 Not Found
Affected users: 89 | Total occurrences: 234
First seen: 2024-11-06 16:40 UTC
For each top error, determine its history:
Query error volume over 7 days:
mcp__Amplitude__query_amplitude_data:
event: "network_error"
filter: endpoint = "/api/payments", status = 500
time_range: last 7 days
breakdown: by day
Classification:
Regression detection:
If error_volume[today] > 5x error_volume[yesterday] → regression flag
If error_first_seen correlates with deploy_time → regression flag
For the top 3 errors, find sessions where the error occurred:
mcp__Amplitude__get_session_replays:
filter: error_events containing [error_type, error_endpoint]
time_range: last 24h
limit: 10
The session replay context reveals:
From the session replays and event data, extract:
Affected user profile:
Affected flows:
Affected endpoints/elements:
Error context template:
Error: POST /api/payments → 500
Context:
- Flow: checkout → payment submission
- Trigger: user clicks "Submit Payment" after entering card details
- User segment: all authenticated users, no plan restriction
- Device: 78% Chrome desktop, 22% Safari mobile
- Error response: {"error": "payment_processor_timeout"}
- User experience: form shows spinner indefinitely, no error message
- User action after error: 68% abandon, 22% retry (triggers error again), 10% refresh
Classify each error for response priority:
P0 — Critical (respond now):
P1 — High (fix this sprint):
P2 — Medium (schedule fix):
P3 — Low (backlog):
mcp__Amplitude__query_amplitude_data — query error event volumes, group by error type/endpoint, analyze trends over time to distinguish regressions from existing issuesmcp__Amplitude__get_session_replays — find sessions where specific errors occurred to understand user context and flowmcp__Amplitude__get_charts — check pre-built error monitoring dashboards and charts for baseline context## Error Triage Report — <time range>
### Top Errors by Impact
| # | Error | Type | Affected Users | Classification | Priority |
|---|-------|------|----------------|----------------|---------|
| 1 | POST /api/payments → 500 | Network | 847 | Regression (deploy 14:15) | P0 |
| 2 | TypeError: 'name' undefined | JS | 312 | Known (7d) | P1 |
| 3 | GET /api/preferences → 404 | Network | 89 | New (24h) | P2 |
### Error Details
**P0: POST /api/payments → 500** [Regression — started 14:15 UTC]
Users affected: 847 (23% of checkout attempts)
Trigger: user submits payment form
User experience: infinite spinner, no error message
Session replay: [session_id_1] [session_id_2]
Recommended action: [rollback deploy / hotfix payment processor timeout handling]
**P1: TypeError: 'name' undefined** [Known — stable volume]
...
### Summary
- P0 issues: 1 (requires immediate action)
- P1 issues: 1 (schedule this sprint)
- P2 issues: 1 (backlog)
- Total unique users affected: 1,248