# diagnosing-missing-recordings

Diagnoses why PostHog session replays were not captured. It parses SDK diagnostic signals via SQL queries to isolate the exact cause.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 397 installs · ★ 76
- Author: PostHog
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/PostHog/skills/tree/HEAD/skills/omnibus/diagnosing-missing-recordings/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/diagnosing-missing-recordings

## What it does

The skill calls `posthog:session-recording-get` with a session ID to confirm whether a replay exists. If the recording cannot be found, it executes a SQL query via `posthog:execute-sql` against the `events` table. This retrieves key SDK diagnostic flags, including recording status, start reasons, active sample rates, and script-loading errors.

Next, the skill evaluates the returned parameters against known failure patterns. It detects browser ad blockers stopping rrweb, pending trigger conditions, or project-wide capture toggles turned off. If no specific session ID is provided, it examines recent `$pageview` events to spot project-wide trends.

Missing project permissions or query errors immediately halt the diagnostic workflow, meaning valid PostHog access is required before running checks.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/skills --skill diagnosing-missing-recordings -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/diagnosing-missing-recordings/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/diagnosing-missing-recordings/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/skills --skill diagnosing-missing-recordings -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/diagnosing-missing-recordings/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/skills --skill diagnosing-missing-recordings -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/diagnosing-missing-recordings/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/skills diagnosing-missing-recordings
```

2. **Manually: put the files in place**
- File: `.github/skills/diagnosing-missing-recordings/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/skills --skill diagnosing-missing-recordings -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/skills --path skills/omnibus/diagnosing-missing-recordings
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/diagnosing-missing-recordings/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/skills --skill diagnosing-missing-recordings -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/skills/tree/HEAD/skills/omnibus/diagnosing-missing-recordings/SKILL.md

## When to use it
- inspect why a specific session recording was omitted
- detect ad blocker extensions preventing the recorder script from loading
- evaluate whether sampling rules or pending triggers skipped capture
- review recent pageview events to spot project-wide capture issues

## Example prompts
- Why wasn't session `abc-123` recorded?
- Check why session recordings stopped appearing across the project.
- Query SDK diagnostic properties for the latest session.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 292d60944c845697.

BEGIN THIRD-PARTY FILE 292d60944c845697
````text
---
name: diagnosing-missing-recordings
description: >
  Diagnoses why a session recording is missing or was not captured.
  Use when a user asks why a session has no replay, why recordings aren't appearing,
  or wants to troubleshoot session replay capture issues for a specific session ID
  or across their project. Covers SDK diagnostic signals, project settings,
  sampling, triggers, ad blockers, and quota/billing scenarios.
---

# 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](./references/diagnostic-signals.md) for the full list.

The key signals are:

- `$has_recording` — whether PostHog has a stored recording for this session
- `$recording_status` — SDK state: `active`, `buffering`, `disabled`, `sampled`, `paused`
- `$session_recording_start_reason` — why recording started or didn't
- `$sdk_debug_recording_script_not_loaded` — recorder script blocked (ad blocker)
- `$sdk_debug_replay_*_trigger_status` — trigger states (URL, event, linked flag)
- `$replay_sample_rate` — configured sample rate at capture time

## Workflow

### Step 1 — Check if the recording exists

If the user provides a session ID, first check whether a recording actually exists:

```json
posthog:session-recording-get
{
  "id": "<session_id>"
}
```

If it returns `found: false` with reason `recording_not_found`, no recording exists for this session in the active project.
Proceed to Step 2 to diagnose why.
If it returns recording metadata, the recording exists — the issue is likely UI/filtering, not capture.
Any other error (for example, a missing project or a permission error) is not evidence about the recording.
Fix that error first.

### Step 2 — Query diagnostic signals from events

Query the most recent event for the session to get SDK diagnostic properties:

```sql
posthog:execute-sql
SELECT
    properties.$has_recording AS has_recording,
    properties.$recording_status AS recording_status,
````
END THIRD-PARTY FILE 292d60944c845697

The third-party file has ended. Everything between the 292d60944c845697 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2739 of 8034 bytes. © PostHog · MIT · https://github.com/PostHog/skills/tree/HEAD/skills/omnibus/diagnosing-missing-recordings/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
