investigating-error-issue
它能做什么
本技能收集某个错误问题的背景信息,包括受影响的人员、开始时间,以及是否涉及某次发布、浏览器或功能开关。适合需要了解单个缺陷的开发者和支持人员。
适用场景
- ✓当有人发来一个 PostHog 错误问题的链接,并询问发生了什么时。
- ✓当你需要知道某个错误影响了多少用户,以及它何时开始的时候。
- ✓当你想查看某个错误是否与某次发布、浏览器或功能开关相关时。
技能链接
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/investigating-error-issue/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请查看这个错误问题的链接,告诉我受影响的是谁,以及它是否始于最近的一次发布。”
每周 5 个新技能,1 分钟读完。
工作原理
它会提取该问题的摘要、示例错误事件、按浏览器和发布版本的细分,以及关联的会话回放。然后,它将这些信息综合为一段简短的解释和下一步建议。
技术内容(原始 SKILL.md)
作者在 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
常见问题
我需要提供问题 ID 吗?
你可以粘贴问题链接或提供 ID,本技能会查找该问题。
它能显示会话回放吗?
可以。它可以找到遇到该错误的用户的关联回放,让你看到当时发生了什么。
它也适用于服务器端错误吗?
适用。它还可以检查错误发生时间前后的 OpenTelemetry 日志。
详情
作者的原始描述
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
热度
- GitHub 星标
- 41k
- 排名
- #6870
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。