.claude/skills/flight-recorder/SKILL.md
Analyze flight recorder dumps to diagnose bugs from event traces
npx skillsauth add cwilliams5/Alt-Tabby flight-recorderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze flight recorder dump(s) to diagnose a bug or anomaly. The user may describe the bug, specify files, or both. If invoked with no arguments, load the newest dump and use the USER NOTE in the dump as the bug description.
release/recorder/, pick the newest fr_*.txt by modification time. The USER NOTE inside the dump describes what happened.release/recorder/fr_*.txt files from today in release/recorder/release/recorder/ for a matching fileUse ls -t release/recorder/fr_*.txt to find files. Confirm resolved file(s) to the user before analyzing.
Each dump has four sections:
T-SSSSSS.mmm offsets relative to dump time.Read the USER NOTE and any user-provided description. Form a hypothesis about what category of bug this is:
ALT_PENDING with gINT_AltIsDown=0 is suspicious)gINT_BypassMode=1 when it shouldn't be?gGUI_PendingPhase non-empty (stuck async activation)?Use query_state.ps1 to extract the expected state machine branches for comparison with the event trace. Use query_messages.ps1 to identify WM_ message handlers/senders when Windows messages appear in the trace.
Read the event trace bottom-to-top (chronological order). Look for:
Complete sequences — A normal Alt-Tab is:
ALT_DN → TAB_DN → TAB_DECIDE → TAB_DECIDE_INNER(isAltTab=1) → STATE→ACTIVE → FREEZE → ALT_UP → QUICK_SWITCH → ACTIVATE_START → ACTIVATE_RESULT(success=1) → MRU_UPDATE → STATE→IDLE
Broken sequences — Where does the chain deviate? Common patterns:
ALT_DN + ALT_UP with no TAB_DN = Tab was lost (check BYPASS mode)ACTIVATE_RESULT(success=0) = Windows rejected activation (check fg field)ACTIVATE_GONE = Window disappeared between selection and activationFOCUS_SUPPRESS during an Alt-Tab = MRU suppression interferedWS_SWITCH during an Alt-Tab = workspace changed mid-sessionTiming analysis — Calculate gaps between related events. Flag any gap > 50ms between keyboard events or > 100ms between state transitions.
Correlation with live items — Cross-reference hwnds in events with the LIVE ITEMS list. Are referenced windows still present? On the expected workspace?
When analyzing multiple dumps for the same bug:
Use query_events.ps1 <name_or_code> for structured event lookups — shows field meanings (d1-d4) and emitter functions. Use query_events.ps1 with no args for the full index. See docs/USING_RECORDER.md for analysis patterns and worked examples.
Present findings as:
If the cause is clear, suggest where in the code to look (reference the event type to its handler using the architecture knowledge). If uncertain, describe what additional information would help (e.g., "need a dump with DiagEventLog enabled to see the full WinEvent stream").
tools
Create a new git worktree and switch the session into it
tools
Spawn agent to trace code flow via query tools — answer only, no context cost
tools
Commit, push, and create a PR for the current branch
tools
Retire a shader by moving its files to legacy/shaders_retired