From magic-powers
Transform bug reports into actionable reproduction steps using session replay data. Uses mcp__Amplitude__list_session_replays, mcp__Amplitude__get_session_replay_events, mcp__Amplitude__get_session_replays.
npx claudepluginhub kienbui1995/magic-powers --plugin magic-powersThis skill uses the workspace's default tool permissions.
- A user reports a bug and you need to reproduce it without access to their environment
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.
Extract actionable signals from the incoming bug report:
Key signals to extract:
| Signal | Where to Find It | Use |
|---|---|---|
| Affected URL / page | Bug description | Filter replays by page |
| Error message | Sentry, console logs, screenshot | Filter by error event |
| User ID | Support ticket, auth logs | Find sessions for specific user |
| Approximate time | "It happened around 3pm" | Set time range filter |
| Device / browser | Support form, user agent | Filter by device type |
| Action sequence | User description | Verify in replay timeline |
If any signal is missing, note it — missing user ID means broader search; missing time means longer window.
Use Amplitude Session Replay to search for sessions matching the bug signals:
mcp__Amplitude__list_session_replays:
- Filter by: URL containing the affected page path
- Filter by: error events (if Amplitude auto-captures the error type)
- Filter by: user_id (if known)
- Time range: ±2 hours around reported time, or last 48h if time unknown
- Sort by: relevance / recency
Search strategy:
From the results list, select sessions most likely to reproduce the issue:
Prioritize sessions with:
Get session details:
mcp__Amplitude__get_session_replays: [session_id_1, session_id_2, ...]
For each selected session, use mcp__Amplitude__get_session_replay_events to get the full event timeline:
Build a chronological sequence:
T+0:00 Page loaded: /checkout/payment
T+0:12 Scrolled to credit card form
T+0:34 Clicked "Card Number" field
T+0:35 Typed card number (16 digits)
T+1:02 Clicked "Expiry" field
T+1:15 Clicked "Submit Payment" button
T+1:16 Network request: POST /api/payments → HTTP 500
T+1:16 JS Error: "Cannot read property 'id' of undefined"
T+1:20 Page showed spinner (no error message to user)
T+2:45 User clicked browser back button
Note: the exact sequence reveals the breaking point — the last successful step before failure.
From the timeline, pinpoint exactly where the failure began:
Look for: network errors immediately after a user action, JS errors in the error events, page state that doesn't change after a click (dead click pattern).
Write precise steps that any engineer can follow:
## Reproduction Steps (verified in 3/5 sessions)
**Environment:** Chrome 120, macOS, logged-in user with Basic plan
**Preconditions:** User must have at least one item in cart
**Steps:**
1. Navigate to /checkout/payment
2. Scroll down to the credit card form
3. Enter a valid card number (any 16-digit number)
4. Click the Expiry field
5. Enter expiry date (e.g., 12/26)
6. Click "Submit Payment"
**Expected:** Payment processes, redirect to /checkout/confirmation
**Actual:** Spinner shows indefinitely; no error message displayed
**Technical failure:** POST /api/payments returns HTTP 500
Response body: {"error": "Cannot read property 'id' of undefined"}
JS Error: "TypeError: Cannot read property 'id' of undefined at processPayment (payment.js:142)"
**Affected sessions:** 3/5 sampled sessions show identical failure pattern
**First occurrence:** 2024-11-08 14:32 UTC (matches deploy at 14:15 UTC)
Based on session data, determine severity:
Severity classification:
| Signal | Severity |
|---|---|
| Blocks core user action (checkout, login, signup) | P0 — Critical |
| Blocks important action, workaround exists | P1 — High |
| Degrades UX but doesn't block the action | P2 — Medium |
| Cosmetic only, no functional impact | P3 — Low |
Frequency assessment:
mcp__Amplitude__list_session_replays — search for sessions matching bug signals (URL, error type, user ID, time range)mcp__Amplitude__get_session_replays — get metadata and details for selected sessionsmcp__Amplitude__get_session_replay_events — extract the full interaction timeline and event sequence from a session## Bug Report: <one-line description>
**Severity:** P<N> — <Critical|High|Medium|Low>
**Affected Sessions:** N sessions in last 24h (X% of sessions on this page)
**First Occurrence:** <timestamp> (correlates with: <deploy / config change / etc.>)
### Reproduction Steps
<numbered steps>
**Expected vs. Actual:** <one-liner>
### Technical Details
**Network Error:** <endpoint> → HTTP <status>
**JS Error:** <error message + stack location>
**Device/Browser:** <from session metadata>
### Evidence
Session IDs reviewed: [<id1>, <id2>, <id3>]
Failure confirmed in: N/5 sessions
Pattern: <description of the consistent failure pattern>
### Recommended Fix
<specific hypothesis based on the error message and stack trace>