investigating-error-issue
What it does
This skill gathers the context for one error issue, including who is affected, when it began and whether a release, browser or feature flag is involved. It is for developers and support staff who need to understand a single bug.
When to use it
- βWhen someone sends you a PostHog error issue link and asks what is going on.
- βWhen you need to know how many users an error affects and when it started.
- βWhen you want to see whether an error is linked to a release, browser or feature flag.
Skill link
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/investigating-error-issue/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
βLook at this error issue link and tell me who is affected and whether it started with a recent release.β
5 new skills a week. 1 minute to read.
How it works
It pulls the issue's summary, sample error events, breakdowns by browser and release, and linked session replays. It then combines them into a short explanation and a next step.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
Do I need to give it the issue ID?
You can paste the issue link or give the ID, and the skill will look it up.
Can it show me a session replay?
Yes. It can find linked replays of users who hit the error, so you can see what happened.
Does it work for server-side errors too?
Yes. It can also check OpenTelemetry logs around the time of the error.
Details
Original description by the author
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.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6870
- 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.