investigating-replay
What it does
This skill gathers everything about one session recording, including who the user was, what they did and any errors. It is for people who want to understand a single session quickly.
When to use it
- ✓When you have a recording or session ID and want to know what happened in it.
- ✓When you want to know who the user was in a session that had problems.
- ✓When you want to see whether a session is linked to error tracking issues.
Skill link
https://github.com/PostHog/posthog/blob/master/products/replay/skills/investigating-replay/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Tell me what happened in this recording and whether the user hit any errors.”
5 new skills a week. 1 minute to read.
How it works
It collects the recording details, the user's profile, the events in the session and any linked error issues at the same time. Then it summarizes what happened in the session.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Investigating a session recording
When a user asks "what happened in this session?" or provides a recording/session ID to investigate, gather all relevant context in parallel rather than making them ask for each piece.
Available tools
| Tool | Purpose |
|---|---|
posthog:session-recording-get |
Recording metadata (duration, counts, status) |
posthog:persons-retrieve |
Person profile (properties, distinct IDs) |
posthog:execute-sql |
Query events, errors, and page views in session |
posthog:query-error-tracking-issues-list |
Find error tracking issues linked to the session |
posthog:vision-observations-list |
Check for an existing Replay Vision AI summary |
posthog:vision-observations-get |
Read one observation in full (scanner_result) |
posthog:vision-scanners-inline-scan |
Generate an AI summary of the session (slow, optional) |
posthog:vision-scanners-list |
Find saved summarizer scanners (scanner_type=summarizer) |
posthog:vision-scanners-scan-session |
Run a saved summarizer scanner on the session (slow) |
Workflow
Step 1 — Get recording metadata and person profile
Start with the recording to get metadata and the person's distinct ID:
posthog:session-recording-get
{
"id": "<session_id>"
}
The recording id and the event $session_id are the same value. It selects the
recording here and the same-session events in Step 2. The response includes
distinct_id, person, start_time, end_time, duration, interaction counts,
console error counts, and viewing status. Use the distinct_id to fetch
the full person profile:
posthog:persons-retrieve
{
"id": "<person_uuid_from_recording>"
}
Step 2 — Query same-session events
Use the recording id from Step 1 as the $session_id value. Get the timeline
of what the user did during the session:
posthog:execute-sql
SELECT
timestamp,
event,
properties.$current_url AS url,
properties.$browser AS browser,
properties.$os AS os,
properties.$device_type AS device_type,
properties.$screen_width AS screen_width
FROM events
WHERE $session_id = '<session_id>'
ORDER BY timestamp ASC
LIMIT 200
For sessions with many events, focus on the most informative ones:
posthog:execute-sql
SELECT
timestamp,
event,
properties.$current_url AS url,
if(event = '$exception', properties.$exception_values[1], null) AS exception_message,
if(event = '$exception', properties.$exception_types[1], null) AS exception_type
FROM events
WHERE $session_id = '<session_id>'
AND event IN ('$pageview', '$pageleave', '$autocapture', '$exception', '$rageclick')
ORDER BY timestamp ASC
LIMIT 100
No rows? Recover the event session ID
The recording id is the session ID. No rows means the session's events were
ingested without it. Find candidates from the person's events in the recording
window, padded by 100 seconds like the replay events query. person_id covers
all of the person's distinct IDs:
posthog:execute-sql
SELECT
properties.$session_id AS session_id,
count() AS event_count,
min(timestamp) AS first_seen,
max(timestamp) AS last_seen
FROM events
WHERE person_id = '<person_uuid>'
AND timestamp >= toDateTime('<start_time>') - INTERVAL 100 SECOND
AND timestamp <= toDateTime('<end_time>') + INTERVAL 100 SECOND
AND properties.$session_id IS NOT NULL
GROUP BY session_id
ORDER BY event_count DESC
LIMIT 10
Continue only when one session ID clearly matches. Use it for the Step 2 and
Step 3 queries only. The replay URL and all Replay Vision calls take the
recording id.
Step 3 — Check for linked error tracking issues
If the recording has console errors or exceptions, find related error tracking issues:
posthog:execute-sql
SELECT DISTINCT
properties.$exception_fingerprint AS fingerprint,
properties.$exception_types[1] AS type,
properties.$exception_values[1] AS message,
count() AS occurrences
FROM events
WHERE $session_id = '<session_id>'
AND event = '$exception'
GROUP BY fingerprint, type, message
ORDER BY occurrences DE
FAQ
Do I need to gather each piece myself?
No. The skill gathers the details in one pass, so you do not need to ask for each part.
Can it show the AI summary of a recording?
Yes. It can read an existing AI summary, or generate one, which takes longer.
Does it find linked errors?
Yes. It looks for error tracking issues connected to the session.
Details
Original description by the author
Investigates a session recording by gathering metadata, person profile, same-session events, and linked error tracking issues in one pass. Use when a user provides a recording or session ID and wants to understand what happened — who the user was, what they did, what errors occurred, and whether there are related error tracking issues. Replaces the manual chain of session-recording-get, persons-retrieve, execute-sql, and query-error-tracking-issues-list.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6909
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.