К основному содержанию
скилл CX Codex

triaging-error-issues — скилл для Claude Code: разбор ошибок PostHog

Собирает короткий список ошибок PostHog, на которые стоит смотреть: новые, всплески и те, что задели много пользователей. Пригодится на утреннем или дежурном разборе.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add PostHog/skills --skill triaging-error-issues -a claude-code
Открыть на GitHub

Что делает triaging-error-issues

Скилл превращает запрос «что сломалось?» в приоритизированный список, а не свалку из всех активных ошибок. Он тянет данные через MCP-инструменты PostHog: список ошибок с метриками, детали отдельной ошибки, сэмплы событий $exception и записи сессий. Окно времени берётся из формулировки — «сегодня» даёт -24h, «на этой неделе» — -7d.

Ранжирование настраивается: по first_seen ловятся регрессии после свежих деплоев, по users — то, что задело больше всего людей. Для каждого кандидата из топа подтягивается сэмпл исключения со стеком и URL, чтобы в сводке было не только название. Дальше скилл предлагает действие: разобраться, назначить, подавить или слить в группу.

Важная деталь: скилл ничего не назначает и не закрывает сам. Список отдаётся вам, решение остаётся за вами. Если проект смешивает браузерный и серверный SDK, топ по пользователям обычно забит серверными ошибками — там на каждый вызов свой distinct_id, поэтому список стоит сузить фильтром library. И ещё: для работы нужен доступ к MCP-серверу PostHog, без него инструменты просто не вызовутся.

Какие задачи решает

  • получить список новых ошибок за последние сутки
  • отделить всплеск от ровного фона
  • найти ошибки, задевшие больше всего пользователей
  • приложить к ошибке стек и URL, а не только заголовок
  • решить, что подавить, а что разбирать

Примеры запросов агенту

  • Что сломалось за последние сутки?
  • Покажи топ ошибок за сегодня по числу затронутых пользователей
  • На что мне посмотреть сегодня утром?

Как установить triaging-error-issues

1Через Skills CLI (Vercel)

npx skills add PostHog/skills --skill triaging-error-issues -a claude-code

2Вручную: положить файлы

~/.claude/skills/triaging-error-issues/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/triaging-error-issues/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора21

exploring-live-traffic Скилл учит агента читать вкладку Live в PostHog Web analytics: кто на сайте прямо сейчас, какие боты стучатся и куда идут люди. CX Codex +1 378установок finding-replay-for-issue Находит среди сессий, привязанных к ошибке в PostHog, ту запись, по которой видно, что пользователь делал до сбоя. CX Codex +1 375установок suggesting-data-imports Подсказывает, каких данных не хватает в PostHog, и ведёт к подключению источника в дата-вейрхаусе. Пригодится, когда запрос падает из-за отсутствующей таблицы. CX Codex +1 372установок inbox-exploration Скилл для работы с PostHog Inbox: показывает отчёты, помогает разобрать их и превратить в задачу или PR. CX Codex +1 370установок authoring-log-alerts Помогает настроить алерты по логам в проекте PostHog: выбирает сервисы, считает базовую линию и подбирает порог, чтобы алерт срабатывал 0–3 раза в неделю. CX Codex +1 356установок formatting-insight-axes Подбирает правильную единицу оси Y при создании инсайта в PostHog: секунды, миллисекунды, проценты, валюта. Избавляет от формул ради пересчёта единиц. CX Codex +1 353установок signals-scout-general Скилл для PostHog: ищет корреляции между продуктами и заглядывает туда, куда не смотрят узкие скауты. Пишет отчёт в инбокс. CX Codex +1 314установок designing-email-templates Скилл создаёт и редактирует шаблоны писем для кампаний и рабочих процессов PostHog через MCP. Пригодится, когда письмо нужно собрать из редактируемых блоков и персонализировать с помощью Liquid. CX Codex +1 301установок

Похожие

integration-error-observability Samuel Berthe Скилл помогает спроектировать показ ошибок внешним разработчикам: логи запросов с повтором, сквозные correlation ID и правила оповещений партнёров. CX Codex +1 7 700установок adding-error-tracking spencerpauly Скилл подключает Sentry к веб-приложению: ловит ошибки, считает трейсы и загружает source maps. Пригодится, когда нужен crash reporting без ручной настройки. CX Codex +1 386установок sentry-fix-issues getsentry Ищет ошибки в Sentry через MCP-сервер, разбирает трейсы и готовит исправления в коде. Пригодится при разборе инцидентов и багов в продакшене. CX Codex +1 10 000установок sentry-nextjs-sdk getsentry Скилл сканирует проект на Next.js и помогает настроить мониторинг Sentry для браузера, Node.js и Edge Runtime. Пригодится при подключении трейсинга, сессий или сборе ошибок с роутов и Server Actions. CX Codex +1 3 600установок error-detective VoltAgent Community Субагент для Claude, который ищет причины сбоев: сопоставляет ошибки между сервисами, строит цепочки и предлагает, как их предотвратить. 7 557установок sentry sanjeed5 Правило задаёт, как инициализировать Sentry в проекте: где ставить SDK, какие переменные окружения использовать, как не сломать чужой код. ★ 3 579звёзд репо

Рядом в теме «Настройка агента: память, контекст, субагенты»

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →

Вопросы о triaging-error-issues

Как установить triaging-error-issues в Claude?

Выполните npx skills add PostHog/skills --skill triaging-error-issues -a claude-code. Скилл встанет в ~/.claude/skills/triaging-error-issues/SKILL.md.

Что делает triaging-error-issues?

Собирает приоритизированный список активных ошибок PostHog: новые, всплески и с большим числом затронутых пользователей. К топу добавляет сэмпл исключения со стеком и предлагает следующее действие.

Что нужно, чтобы скилл заработал?

Доступ к MCP-серверу PostHog — скилл работает через его инструменты. Если проект смешивает браузерный и серверный SDK, сузьте выборку фильтром library.

Исходный текст

SKILL.md · MIT
---
name: triaging-error-issues
description: >
  Triage PostHog error tracking issues during a daily or on-call review.
  Use when the user asks "what's broken?", "what new errors do we have?",
  "show me top errors today", "what should I look at this morning",
  or wants a prioritized list of active issues to work on. Surfaces new
  and high-impact issues, ranks by users affected and recency, points at
  linked replays, and proposes next actions (investigate, assign, suppress,
  merge).
---

# Triaging error tracking issues

When a user asks "what's broken?" or wants a daily error review, the goal is a short
prioritized list of issues worth a human's attention — not a dump of every active
issue. Most projects have hundreds of active issues; the few that matter are usually
new (first seen in the last 24-48h), spiking, or affecting many distinct users.

## Available tools

| Tool                                        | Purpose                                                                   |
| ------------------------------------------- | ------------------------------------------------------------------------- |
| `posthog:query-error-tracking-issues-list`  | List + rank issues with aggregate metrics (occurrences, users, sessions)  |
| `posthog:query-error-tracking-issue`        | Compact details for a single issue (status, assignee, top frame, release) |
| `posthog:query-error-tracking-issue-events` | Sampled `$exception` events with stack, URL, browser, and `$session_id`   |
| `posthog:query-session-recordings-list`     | Find replays of users hitting an issue                                    |
| `posthog:inbox-reports-list`                | Pre-curated actionable signals if the project uses Inbox                  |

## Workflow

### Step 1 — Pick a window and a signal

Read the time window from the user's wording. Defaults if unspecified:

- "Today" / "this morning" / "right now" → `dateRange: { date_from: "-24h" }`
- "This week" / "since Monday" → `-7d`
- On-call shift handoff → `-24h`

Pick what "matters" means:

- **New issues** — `orderBy: "first_seen"`, `orderDirection: "DESC"`, tight window.
  Catches regressions introduced by recent deploys.
- **High-impact** — `orderBy: "users"` ranks by distinct users affected. Better than
  raw occurrences for severity (one bot loop produces many occurrences but one user).
- **Trending** — `orderBy: "occurrences"` over a short window vs a longer baseline
  to spot spikes.

### Step 2 — Pull the candidate list

Start narrow and widen if too few issues come back:

```json
posthog:query-error-tracking-issues-list
{
  "status": "active",
  "orderBy": "users",
  "orderDirection": "DESC",
  "dateRange": { "date_from": "-24h" },
  "limit": 20,
  "volumeResolution": 24
}
```

Match `volumeResolution` to the window (24 buckets for `-24h`, 14 for `-14d`, etc.)
so each row's sparkline has enough resolution to show a spike vs flat steady state.
A single bucket only gives a total, not a shape.

For new-issues-only, run a parallel query with `orderBy: "first_seen"`:

```json
{
  "status": "active",
  "orderBy": "first_seen",
  "orderDirection": "DESC",
  "dateRange": { "date_from": "-24h" },
  "limit": 10
}
```

If a project mixes browser and server SDKs, the top-by-users list is usually drowned
by server-side errors (each invocation often gets a fresh `distinct_id`). Narrow with
the `library` filter — values match the SDK's `$lib`, not the npm package name, examples:

- `web` — posthog-js (browser)
- `posthog-node`, `posthog-python`, `posthog-ruby`, `posthog-go`, `posthog-php`, `posthog-java`, `posthog-elixir` — server SDKs
- `posthog-edge` — Cloudflare Workers / edge runtime
- `posthog-ios`, `posthog-android`, `posthog-react-native`, `posthog-flutter` — mobile

### Step 3 — Filter the noise

The list will include known noise. Before presenting, drop or call out:

- Issues whose volume is flat over the window — they're not new, the user already
  lives with them. Surface them only if they're in the top by users.
- Bot-only issues — if all events come from headless browsers or crawler user agents,
  flag for suppression (`suppressing-noisy-errors`) instead of triage.

If unsure whether an issue is new vs. recurring, compare `first_seen` to the start
of the window:

- `first_seen` inside the window → new, worth attention
- `first_seen` weeks ago but spiking now → regression worth attention
- `first_seen` weeks ago, flat volume → background noise

### Step 4 — Add context for the top items

For the top 3-5 candidates, pull a sample exception so the summary includes a stack
frame and URL, not just a title. Use `posthog:query-error-tracking-issue-events` rather than
raw SQL — it returns normalized fields (`$exception_types`, `$exception_values`,
`$current_url`, browser/OS, `$session_id`) and defaults to `onlyAppFrames: true` to
strip vendor noise from the stack:

```json
posthog:query-error-tracking-issue-events
{
  "issueId": "<issue_id>",
  "limit": 1,
  "include": ["exception", "stacktrace", "environment", "navigation", "correlation"]
}
```

If the user wants to see what users were doing, hand off to `finding-replay-for-issue`
to pick the best linked recording. Don't fetch replays for every triaged issue — only
the ones the user asks to dig into.

### Step 5 — Present the triage list

Lead with a one-line headline ("3 new issues in last 24h, 1 spike, 5 active
high-impact"). Then a short table sorted by your chosen signal:

| Issue | First seen | Users | Sessions | Sample message                    | Suggested action           |
| ----- | ---------- | ----- | -------- | --------------------------------- | -------------------------- |
| ...   | 2h ago     | 142   | 198      | `TypeError ... at checkout.js:42` | Investigate                |
| ...   | spike      | 67    | 89       | `Network request failed`          | Watch — likely transient   |
| ...   | 3d ago     | 12    | 12       | `chrome-extension:// timeout`     | Suppress (extension noise) |

For each, suggest one of: **investigate** (`investigating-error-issue`), **assign**
(`error-tracking-issues-partial-update`), **suppress** (`suppressing-noisy-errors`),
**merge** (`grouping-noisy-errors`), or **resolve** if it's already known fixed.

## Tips

- A single deploy often surfaces several related new issues. If multiple new issues
  share a `properties.$lib_version` (or `properties.$exception_releases` when the
  SDK is configured to populate it), present them grouped — a rollback decision
  rests on the cluster, not any one issue.
- "Users" is the right severity proxy for user-facing apps. For backend services
  without a real distinct_id concept, fall back to `sessions` or `occurrences`.
- Don't auto-assign or auto-resolve as part of triage. Present the list and let the
  user decide. Bulk actions belong in dedicated skills.
- If the project uses Inbox (`posthog:inbox-reports-list`), check it first — PostHog
  may have already curated the most actionable issues so you avoid re-deriving them.
- Provide each row's `_posthogUrl` (returned on every issue row) so the user can jump
  straight to the issue page if they want to drill down themselves. If you build the
  link yourself, use the full `/project/<project_id>/error-tracking/<id>` path, never
  a bare `/error-tracking/<id>`.

## Related skills

- **`investigating-error-issue`** — deep-dive a single issue off the triage list
- **`grouping-noisy-errors`** — when triage is drowned by duplicate or over-split issues
- **`suppressing-noisy-errors`** — mute known-noise fingerprints so future triage runs are cleaner
- **`authoring-error-tracking-alerts`** — route the issues worth acting on to Slack or a webhook instead of re-triaging manually

© PostHog · MIT · PostHog/skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой