From posthog
Investigates PostHog session recordings by fetching metadata, person profiles, same-session events via SQL, and linked error tracking issues in parallel. Use on provided recording or session ID.
npx claudepluginhub anthropics/claude-plugins-official --plugin posthogThis skill uses the workspace's default tool permissions.
When a user asks "what happened in this session?" or provides a recording/session ID
Finds the most informative PostHog session replay for an error tracking issue by ranking linked recordings on recency, activity score, journey completeness, and summarizing pre-error context.
Generates reproducible bug steps from Amplitude Session Replays by finding error sessions, extracting interaction timelines, and identifying failure sequences. Useful for user bug reports, repro requests, or error spikes.
Analyzes Sentry session replays from external users to surface UX patterns, pain points, and user journeys for product areas like issues, traces, or dashboards.
Share bugs, ideas, or general feedback.
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.
| 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:error-tracking-issues-list | Find error tracking issues linked to the session |
posthog:session-recording-summarize | AI-generated summary (slow, ~5 min, optional) |
Start with the recording to get metadata and the person's distinct ID:
posthog:session-recording-get
{
"id": "<recording_id>"
}
The response includes distinct_id, person, 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>"
}
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_message, null) AS exception_message,
if(event = '$exception', properties.$exception_type, 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
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_type AS type,
properties.$exception_message AS message,
count() AS occurrences
FROM events
WHERE $session_id = '<session_id>'
AND event = '$exception'
GROUP BY fingerprint, type, message
ORDER BY occurrences DESC
LIMIT 10
If fingerprints are found, search for the corresponding error tracking issues to provide links and status:
posthog:error-tracking-issues-list
{
"search": "<exception_type or message>"
}
Present the findings as a coherent narrative:
If the user wants a deeper analysis without reading through events manually,
offer session-recording-summarize. Warn that first-time summaries take ~5 minutes:
posthog:session-recording-summarize
{
"session_ids": ["<session_id>"]
}
start_url from the recording tells you where the user's journey began —
use this to frame the narrative.person is null on the recording, the user was anonymous.
Person properties won't be available, but events still are.