.claude/skills/posthog-session-replay-diagnosis/SKILL.md
Diagnose session replay issues including missing recordings, broken or blank replays, CSP/CORS failures, asset loading issues, browser-side recorder problems, and mobile SDK performance/OOM/masking issues.
npx skillsauth add mongo-ai/posthog-triage-agent posthog-session-replay-diagnosisInstall 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.
docs-search with the platform + customer's primary symptomquery-docs for that SDK's config referencegh search issues on the relevant repoThe steps below are a diagnostic FRAMEWORK (what questions to ask, in what order). The docs responses are the CONTENT (current answers, version requirements, config details).
Before running any steps, classify the platform from ticket context:
If unclear, ask the customer or check $lib in recent events.
Identify whether replay issues are caused by:
Run docs-search("session replay troubleshooting recordings not showing")
Use the response as your primary checklist. Extract:
Query recent web events for $lib_version.
SELECT properties.$lib, properties.$lib_version, count()
FROM events
WHERE distinct_id = '{distinct_id}'
AND timestamp > now() - interval 7 day
GROUP BY properties.$lib, properties.$lib_version
ORDER BY count() DESC;
Compare against the version requirements from the docs response in Step 1.
Separate:
These are different problems.
Cross-reference the docs-search checklist with the customer's setup. Key areas to investigate:
If reverse proxy is relevant, run: docs-search("reverse proxy setup PostHog")
Run docs-search("session replay broken blank CORS stylesheet")
Key areas to investigate:
crossorigin attribute on stylesheetsIf the complaint is "can't filter recording by user/page/cohort":
Only if:
Mobile session replay uses a fundamentally different architecture than web: screenshot-based capture (not DOM mutation recording). This means different failure modes.
Run in parallel:
docs-search("{platform} session replay troubleshooting")gh search issues --repo PostHog/posthog-{sdk} "session replay {symptom}" --limit 10DeepWiki ask_question("PostHog/posthog-{sdk}", "How does the session replay screenshot capture and masking pipeline work?")This is the most common mobile replay complaint. The screenshot capture pipeline is the bottleneck.
iOS screenshot mode typically works as:
UIGraphicsImageRendererEach cycle may create multiple full-resolution bitmaps. On high-res devices this can consume significant memory per snapshot cycle.
IMPORTANT: Verify this architecture is still accurate by running:
DeepWiki ask_question("PostHog/posthog-ios", "session replay screenshot capture memory management")
Run: gh search issues --repo PostHog/posthog-{sdk} "replay memory OR OOM OR performance OR crash" --limit 10
Check issue status (open/closed), linked PRs, and any experimental branches.
gh release list)Fetch current workarounds: docs-search("{platform} session replay performance workaround")
Common patterns (verify against docs response):
Run docs-search("{platform} session replay setup enable")
Key areas to investigate:
/decide endpoint response includes session recordingRun docs-search("{platform} session replay masking configuration")
Key areas to investigate:
Run docs-search("{platform} session replay quality black rectangles")
Key areas to investigate:
Escalate to engineering if:
tools
Diagnose PostHog web analytics issues including missing pageviews, incorrect bounce rates, broken channel attribution, missing UTM data, reverse proxy problems, and discrepancies with other analytics tools.
business
Final synthesis skill. Produce a structured, evidence-graded triage report with a clear root-cause assessment, honest confidence, and a ready-to-send customer response.
tools
Normalize an incoming support ticket into structured investigation inputs: product area, identifiers, scope clues, URLs, timeframe, and likely first diagnostic path.
development
Diagnose PostHog survey issues including surveys not appearing, targeting mismatches, response collection failures, display timing problems, and API-mode survey integration issues.