/investigating-error-issue
Investigates a single PostHog error tracking issue end-to-end. Use when the user provides an issue ID or pastes an issue URL (`/error_tracking/<id>`) and wants to understand the error — who it affects, what triggers it, when it started, whether it correlates with a release,
$ npx -y skills add posthog/posthog --skill investigating-error-issue --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/investigating-error-issue
Context preview
The summary Claude sees to decide when to auto-load this skill.
Investigates a single PostHog error tracking issue end-to-end. Use when the user provides an issue ID or pastes an issue URL (`/error_tracking/<id>`) and wants to understand the error — who it affects, what triggers it, when it started, whether it correlates with a release,
SKILL.md
investigating-error-issue.SKILL.mdname: investigating-error-issue
description: >
Investigates a single PostHog error tracking issue end-to-end. Use when
the user provides an issue ID or pastes an issue URL
(`/error_tracking/<id>`) and wants to understand the error — who it
affects, what triggers it, when it started, whether it correlates with
a release, browser, OS, or feature flag, and what the next step should
be. Pulls aggregated metrics, sample exception events, segment
breakdowns, linked replays, and synthesizes a hypothesis-grade summary
in one pass.
Investigating an error tracking issue
When a user asks "what's going on with this error?" or pastes an issue URL, gather the context they would otherwise have to assemble manually: who is hitting it, what changed, where it happens, and whether a replay shows the cause.
Available tools
| Tool | Purpose | | ------------------------------------------- | ------------------------------------------------------------------------------------------- | | `posthog:query-error-tracking-issue` | Compact issue details (status, assignee, top frame, release, aggregates) | | `posthog:query-error-tracking-issue-events` | Sampled `$exception` events with stack, URL, browser, `$session_id` | | `posthog:execute-sql` | Breakdowns, release / flag correlations, surrounding events + console logs around the error | | `posthog:query-logs` | OTEL log entries around the error timestamp for server-side issues | | `posthog:query-session-recordings-list` | Linked replays (delegate ranking to `finding-replay-for-issue`) | | `posthog:read-data-schema` | Confirm property keys before filtering on them |
Workflow
Step 1 — Establish the issue baseline
Fetch the issue record with its compact aggregates and a sparkline:
posthog:query-error-tracking-issue
{
"issueId": "<issue_id>",
"dateRange": { "date_from": "-30d" },
"includeSparkline": true,
"volumeResolution": 12
}Capture: `name`, `description`, `status`, `first_seen`, `last_seen`, `assignee`, total `occurrences` / `users` / `sessions`, top in-app frame, latest release metadata, and the volume buckets.
The sparkline tells you the shape — flat, spike, ramp, or recurring — and that shape drives the rest of the investigation. If the user only asked a status question, skip `includeSparkline` to save tokens.
Step 2 — Pull a sample exception event
A captured event has the stack frames, URL, browser, and properties needed to reason about cause. Pull a recent sample first, then an early one to compare.
posthog:query-error-tracking-issue-events
{
"issueId": "<issue_id>",
"limit": 1,
"include": ["exception", "stacktrace", "environment", "navigation", "correlation"]
}The tool defaults to `onlyAppFrames: true`, which strips vendor frames; flip to `false` when the bug appears to live in a third-party library — or when the response comes back with `stacktrace.type: "resolved"` but no frames at all (common for minified bundles where every frame looks vendor-y to the resolver, e.g. React production builds).
For the earliest sample, narrow `dateRange` to a tight window around the issue's `first_seen` (e.g. set `date_from` slightly before and `date_to` slightly after) and pass `orderDirection: "ASC"` so you get the earliest event in the window rather than the latest — the tool defaults to `DESC`, which would return a recent event and silently duplicate the first call. If recent and earliest events look materially different — different stack root, different URL pattern — the issue may be a grouping mistake. Flag for `grouping-noisy-errors` instead of continuing as if it were one bug.
Step 3 — Run breakdowns to isolate the cause
Breakdowns aren't a typed tool — drop into `execute-sql`. Run only the breakdowns the issue's shape suggests; each one costs a query and clutters the synthesis.
| Sparkline shape | First breakdown to try | | ----------------- | ------------------------------------------------------------------------ | | Spike from zero | By app version / release — almost always a deploy regression (see below) | | Steady-state high | By browser / OS — rendering or platform-specific bug | | Ramp | By geography or feature flag — gradual rollout exposure | | Bursts then quiet | By time of day or `$current_url` — scheduled job or specific page |
Picking the right version property
PostHog emits three version-shaped fields. They mean different things and only one of them answers "what version of the user's app introduced this?":
| Property | What it is | Auto-captured by | Use for | | --------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | `$exception_releases` | Cymbal-managed release map, keyed by release ID | Only when SDK publishes release metadata (e.g. sourcemap upload tied to a release) | Most precise release attribution **when present** | | `$app_version` | The user's deployed app version | iOS (`CFBundleShortVersionString`), React Native (Expo / react-native-device-info) | "What deploy of my app introduced this?" — the question users care about | | `$lib_version` | The Pos
Read more
name: investigating-error-issue description: > Investigates a single PostHog error tracking issue end-to-end. Use when the user provides an issue ID or pastes an issue URL (`/error_tracking/<id>`) and wants to understand the error — who it affects, what triggers it, when it started, whether it correlates with a release, browser, OS, or feature flag, and what the next step should be. Pulls aggregated metrics, sample exception events, segment breakdowns, linked replays, and synthesizes a hypothesis-grade summary in one pass.
Investigating an error tracking issue
When a user asks "what's going on with this error?" or pastes an issue URL, gather the context they would otherwise have to assemble manually: who is hitting it, what changed, where it happens, and whether a replay shows the cause.
Available tools
| Tool | Purpose | | ------------------------------------------- | ------------------------------------------------------------------------------------------- | | `posthog:query-error-tracking-issue` | Compact issue details (status, assignee, top frame, release, aggregates) | | `posthog:query-error-tracking-issue-events` | Sampled `$exception` events with stack, URL, browser, `$session_id` | | `posthog:execute-sql` | Breakdowns, release / flag correlations, surrounding events + console logs around the error | | `posthog:query-logs` | OTEL log entries around the error timestamp for server-side issues | | `posthog:query-session-recordings-list` | Linked replays (delegate ranking to `finding-replay-for-issue`) | | `posthog:read-data-schema` | Confirm property keys before filtering on them |
Workflow
Step 1 — Establish the issue baseline
Fetch the issue record with its compact aggregates and a sparkline:
posthog:query-error-tracking-issue
{
"issueId": "<issue_id>",
"dateRange": { "date_from": "-30d" },
"includeSparkline": true,
"volumeResolution": 12
}Capture: `name`, `description`, `status`, `first_seen`, `last_seen`, `assignee`, total `occurrences` / `users` / `sessions`, top in-app frame, latest release metadata, and the volume buckets.
The sparkline tells you the shape — flat, spike, ramp, or recurring — and that shape drives the rest of the investigation. If the user only asked a status question, skip `includeSparkline` to save tokens.
Step 2 — Pull a sample exception event
A captured event has the stack frames, URL, browser, and properties needed to reason about cause. Pull a recent sample first, then an early one to compare.
posthog:query-error-tracking-issue-events
{
"issueId": "<issue_id>",
"limit": 1,
"include": ["exception", "stacktrace", "environment", "navigation", "correlation"]
}The tool defaults to `onlyAppFrames: true`, which strips vendor frames; flip to `false` when the bug appears to live in a third-party library — or when the response comes back with `stacktrace.type: "resolved"` but no frames at all (common for minified bundles where every frame looks vendor-y to the resolver, e.g. React production builds).
For the earliest sample, narrow `dateRange` to a tight window around the issue's `first_seen` (e.g. set `date_from` slightly before and `date_to` slightly after) and pass `orderDirection: "ASC"` so you get the earliest event in the window rather than the latest — the tool defaults to `DESC`, which would return a recent event and silently duplicate the first call. If recent and earliest events look materially different — different stack root, different URL pattern — the issue may be a grouping mistake. Flag for `grouping-noisy-errors` instead of continuing as if it were one bug.
Step 3 — Run breakdowns to isolate the cause
Breakdowns aren't a typed tool — drop into `execute-sql`. Run only the breakdowns the issue's shape suggests; each one costs a query and clutters the synthesis.
| Sparkline shape | First breakdown to try | | ----------------- | ------------------------------------------------------------------------ | | Spike from zero | By app version / release — almost always a deploy regression (see below) | | Steady-state high | By browser / OS — rendering or platform-specific bug | | Ramp | By geography or feature flag — gradual rollout exposure | | Bursts then quiet | By time of day or `$current_url` — scheduled job or specific page |
Picking the right version property
PostHog emits three version-shaped fields. They mean different things and only one of them answers "what version of the user's app introduced this?":
| Property | What it is | Auto-captured by | Use for | | --------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | `$exception_releases` | Cymbal-managed release map, keyed by release ID | Only when SDK publishes release metadata (e.g. sourcemap upload tied to a release) | Most precise release attribution **when present** | | `$app_version` | The user's deployed app version | iOS (`CFBundleShortVersionString`), React Native (Expo / react-native-device-info) | "What deploy of my app introduced this?" — the question users care about | | `$lib_version` | The Pos
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Other skills on posthog.
- /analyzing-expensive-users
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.
Open skill - /creating-online-evaluations
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously
Open skill - /exploring-ai-failures
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues
Open skill - /exploring-llm-clusters
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Open skill - /exploring-llm-costs
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",
Open skill - /exploring-llm-evaluations
Investigate AI observability evaluations — `hog` (deterministic code-based), `llm_judge` (LLM-prompt-based), and `sentiment` (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and
Open skill

