Why is there no recording of this visit? The tracking code leaves a trail of clues on every event it sends, and this reads them to say which link in the chain dropped it.
WHEN TO USE
SCOPE
USE FOR
Find out why one specific session has no replay recording at all.
Work out why recordings have stopped appearing across the whole project.
Tell an ad-blocked recorder script apart from a sampled-out or disabled session.
Spot a broken ingestion path where snapshots are captured but never uploaded.
This is a saved copy of the skill's SKILL.md instructions. It may differ from the upstream file or the version you install.
Diagnosing missing session recordings
When a user asks "why wasn't this session recorded?" or "why don't I have any recordings?",
follow this workflow to systematically diagnose the cause.
Available tools
Tool
Purpose
posthog:execute-sql
Query session event properties for diagnostic signals
posthog:session-recording-get
Check if a recording actually exists for the session
posthog:query-session-recordings-list
Search for recordings matching criteria
Diagnostic signals
The PostHog SDK emits diagnostic properties on every event that explain the recording state.
See the diagnostic signals reference for the full list.
The key signals are:
$has_recording — whether PostHog has a stored recording for this session
If this returns data, the recording exists — the issue is likely UI/filtering, not capture.
If it returns 404, proceed to diagnose why.
Step 2 — Query diagnostic signals from events
Query the most recent event for the session to get SDK diagnostic properties:
posthog:execute-sql
SELECT
properties.$has_recording AS has_recording,
properties.$recording_status AS recording_status,
properties.$session_recording_start_reason AS start_reason,
properties.$sdk_debug_recording_script_not_loaded AS script_not_loaded,
properties.$sdk_debug_replay_url_trigger_status AS url_trigger,
properties.$sdk_debug_replay_event_trigger_status AS event_trigger,
properties.$sdk_debug_replay_linked_flag_trigger_status AS flag_trigger,
properties.$replay_sample_rate AS sample_rate,
properties.$sdk_debug_replay_internal_buffer_length AS buffer_length,
properties.$sdk_debug_replay_flushed_size AS flushed_size,
properties.$lib AS sdk_library,
properties.$lib_version AS sdk_version
FROM events
WHERE $session_id = '<session_id>'
ORDER BY timestamp DESC
LIMIT 1
Recording exists ($has_recording = true) — recording is captured, issue is elsewhere
Ad blocked (script) ($sdk_debug_recording_script_not_loaded = true) — browser extension blocking the recorder script from loading
Disabled ($recording_status = 'disabled') — replay turned off in settings or SDK config
Trigger pending (trigger statuses are trigger_pending, none matched) — recording gated on trigger that never fired
Sampled out ($session_recording_start_reason = 'sampled_out') — excluded by sample rate
Buffering empty ($recording_status = 'buffering', buffer length = 0, nothing flushed) — initialized but no snapshots produced
Flush blocked (buffer length climbs across events while flushed_size stays at 0) — snapshots are produced but the /s/ ingestion endpoint is blocked by an ad blocker or misconfigured reverse proxy. Detecting this requires querying the trend across the session's events — see example 3 in examples.md
Unknown — signals don't match a known pattern
Step 4 — Check project-level settings (if no session ID)
When the user asks about recordings missing project-wide (no specific session),
query for recent sessions to check the pattern:
posthog:execute-sql
SELECT
$session_id,
properties.$recording_status AS recording_status,
properties.$session_recording_start_reason AS start_reason,
properties.$sdk_debug_recording_script_not_loaded AS script_not_loaded,
properties.$replay_sample_rate AS sample_rate
FROM events
WHERE event = '$pageview'
AND timestamp > now() - INTERVAL 1 DAY
GROUP BY
$session_id,
recording_status,
start_reason,
script_not_loaded,
sample_rate
ORDER BY max(timestamp) DESC
LIMIT 10
Look for patterns:
All disabled → replay is turned off in project settings
All sampled_out with low sample rate → sample rate too aggressive
All script_not_loaded → likely a CSP or deployment issue, not just one user's ad blocker
Mix of statuses → per-session issue, dig into specifics
Step 5 — Provide actionable recommendations
Based on the verdict, recommend specific actions:
Verdict
Recommendation
Ad blocked
User's browser extension is blocking rrweb. Suggest trying without ad blocker, or using a proxy/custom domain for the recorder script
Disabled
Check project replay settings — recording may be turned off. Link to Settings > Session replay
Trigger pending
The configured trigger (URL pattern, event, or feature flag) never matched. Review trigger configuration
Sampled out
Increase the sample rate in project settings, or use a trigger to guarantee capture for important sessions
Buffering empty
Page closed before first snapshot. Common with very short sessions or single-page navigations. Consider lowering minimum duration
See real-world diagnostic examples showing how signal combinations
map to verdicts. Use these to calibrate your interpretation of query results.
Tips
If $lib_version is very old, some diagnostic signals won't be present.
Note this to the user — upgrading the SDK will provide better diagnostics.
A session might have events but no recording if the recording was deleted due to retention.
Check the session's timestamp against the project's retention period.
If $has_recording is true but the user can't find it, check if it's filtered out
by duration, activity threshold, or playlist filters.
Related skills
diagnosing-sdk-health — an outdated SDK is a common root cause and blunts the diagnostic signals
finding-sessions-to-watch — once capture works, pick the sessions worth watching
investigating-replay — analyze the recording once it exists
MCP connection required
1 FOR YOU
01
Connect the PostHog MCP server
Connect PostHog's MCP server with session replay tools (execute-sql, session-recording-get, query-session-recordings-list) so missing recordings can be diagnosed from your project's data.
Listed as free
Connected services may require an account or charge fees.
Installation
One command — usually under 2 minutes.
🔌 This skill ships inside the PostHog AI Plugin. Listed package contents include 3 slash commands, 1 agent, hooks and an MCP server. Installed components and skill versions may vary by AI tool.
Install just this skill
Run this outside your AI tool, using Node.js 22.20.0 or newer. Skills CLI 1.7.2 skips skill selection; prompts cancel installation without an interactive terminal. If choosing Project when asked about installation scope, open your project's folder before running this.
Install checklist
Check selected tools if a picker appears; Claude Code may be unchecked under Additional agents. ↑/↓ moves, Space toggles selections, Enter confirms.
Without a tool picker, check Installing to: for your intended tool. Stop if it names a different tool.
If asked, choose Symlink (Recommended) for shared files or Copy to all agents for separate copies; review the summary before confirming installation.
Install the find-skills skill? defaults to Yes, adding another skill for all projects. Choose No if you don't want that extra installation.
Skills CLI 1.7.2 sends install data to skills.sh by default, including the source, skill names, target tools and file details; GitHub sources are reported only when GitHub confirms the repository is public, while other remote sources can also be reported. Confirmed-public GitHub sources also trigger a security-audit request. Before installing, set the environment variable DO_NOT_TRACK=1 or DISABLE_TELEMETRY=1 to disable both.
After installing for Claude Code, open it in the installation project if you chose Project; Global makes the skill available across projects on this computer. Once Claude Code loads the skill, its description helps Claude decide when to use it.
If installation created a top-level skills folder that did not exist when your Claude Code session started, run /reload-skills in that session. Run it again after later changes in that folder.
MCP server required
The skill's steps call for tools from the PostHog MCP server. Installing just this skill doesn't add that connection; set it up in your AI tool if it isn't there yet: PostHog MCP setup. Installing the whole plugin instead includes the connection settings.
Requirements for the PostHog MCP server
Connecting is free; sign in with your PostHog account.
Some tools use AI internally and may incur PostHog AI charges. Those tools require AI data processing to be enabled in your organization settings.
Install the whole plugin
This route installs the posthog plugin package selected for your AI tool.
Claude Code
Add PostHog's marketplace, then install the plugin
Run both lines in a terminal. They install PostHog's posthog plugin: this skill, PostHog's other skills, and a connection to PostHog's hosted MCP server.
01
claude plugin marketplace add PostHog/ai-plugin
02
claude plugin install posthog@posthog
Installation and loading
The plugin installs for you in every project and loads the next time you start Claude Code, or after /reload-plugins in an open session.
To connect your PostHog account, start claude, type /mcp, select plugin:posthog:posthog and follow the browser prompts.
Good to know
The plugin includes PostHog's session-capture hook; PostHog's README says it sends sessions to LLM Analytics only when POSTHOG_LLMA_CC_ENABLED=true and POSTHOG_API_KEY are both set.
If you use the separate posthog-telemetry plugin, PostHog says to keep only one of the two, because both register the same hook.
On a self-hosted PostHog, this route's MCP connection won't reach your instance: the plugin's config is fixed to https://mcp.posthog.com/mcp, which routes to PostHog's US or EU region. POSTHOG_MCP_URL works only for the Gemini CLI extension.
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties already work: feature flag targeting, cohorts, insight filters and breakdowns, surveys, session replay filters, workflows, and the person profile. Use when the user wants to "add a person property from my warehouse", "enrich people with Stripe/Postgres/Salesforce data", "put ARR or plan tier on my persons", "target a feature flag by a warehouse column", "sync warehouse columns onto groups or organizations", or wants to inspect, backfill, disable, or debug an existing warehouse-backed person or group property.Read full description
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.Read full description
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results. Also covers pairing the observed behavior with a linked survey when the user wants qualitative feedback beyond what recordings show.Read full description
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements.
TRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap/click data, or to 'analyze/assess/review the heatmap' for a URL.
DO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).Read full description
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can I clean up?", "are any of my endpoints broken?", "which materialised versions are still being called?", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.Read full description
Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.Read full description