skills/authoring-error-tracking-alerts/SKILL.md
Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack/webhook/Linear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.
npx skillsauth add posthog/ai-plugin authoring-error-tracking-alertsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Authoring an error tracking alert is a routing problem, not a measurement problem. The trigger events already exist and fire on real conditions in the ingestion pipeline — your job is to pick the right trigger for the user's intent, dedupe against what's already configured, and wire a destination they can actually act on.
_reopened with a
per-issue property filter.posthog:query-error-tracking-issue and posthog:query-error-tracking-issue-events instead of
authoring more alerts mid-fire.$exception events over a window). That's a logs-style
alert and is not in scope here — error tracking alerts ride the lifecycle events instead.| Tool | Job | Where it fits |
| ---------------------------------------------- | ---------------------------------------------------------------- | ---------------------------- |
| posthog:error-tracking-alerts-list | List existing alerts; dedupe before creating. | Step 2 — dedupe. |
| posthog:integrations-list | Find the user's Slack workspace id (filter by kind=slack). | Step 3 — pick channel. |
| posthog:integrations-channels-retrieve | List Slack channels for a workspace. | Step 3 — pick channel. |
| posthog:error-tracking-alerts-create | Create the alert (HogFunction with type=internal_destination). | Step 4 — ship. |
| posthog:error-tracking-alerts-partial-update | Toggle, rename, or modify an existing alert. | When tuning, not authoring. |
| posthog:error-tracking-alerts-delete | Soft-delete an alert. | When the user says "remove". |
There are three lifecycle events. Each has a different "noise vs urgency" trade-off — picking the wrong one is the most common cause of alert fatigue here.
| Event | Fires when | Use when |
| -------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| $error_tracking_issue_created | A brand-new issue first appears. | Small projects, or projects where every new error type is genuinely worth a look. Floods large/noisy projects. |
| $error_tracking_issue_reopened | A previously resolved issue starts emitting again. | Catch regressions on issues someone already triaged. The safest "I want to know if this comes back" trigger. |
| $error_tracking_issue_spiking | The spike detector flags abnormal volume on an issue. | Production projects with high baseline volume. Threshold/multiplier is shared across the project — check spike config before using. |
If the user is vague ("alert me on errors"), default to _spiking. It's the most signal-dense trigger
and the least likely to cause alert fatigue. Confirm explicitly before proceeding.
You need three things from the user before creating anything:
_spiking and ask for confirmation. Do not silently
pick one.Call posthog:error-tracking-alerts-list. Filter the response client-side by filters.events[].id.
error-tracking-alerts-partial-update) or skip.#oncall, one for the
oncall webhook) is fine and sometimes intentional. Confirm.PostHog's "alerts configured" recommendation only inspects filters.events — adding per-issue
filters.properties does not affect the status the recommendations card reports.
For Slack:
posthog:integrations-list with kind=slack → pick the integration id (an integer).posthog:integrations-channels-retrieve with that id → pick the channel id (e.g. C0123ABC). Channel
names like "#oncall" are accepted but channel ids are preferred — they survive renames.For webhook: the user supplies a single https:// URL. Refuse http:// URLs.
For Linear / GitHub / GitLab: confirm the integration is connected via posthog:integrations-list first,
then ask the user which project / repository / team to file issues into.
Call posthog:error-tracking-alerts-create with:
{
"type": "internal_destination",
"template_id": "template-slack",
"name": "<short, channel-attributed name>",
"enabled": true,
"filters": {
"events": [{ "id": "$error_tracking_issue_created", "type": "events" }]
},
"inputs": {
"slack_workspace": { "value": <slack_integration_id_int> },
"channel": { "value": "<channel_id>" },
"text": { "value": "..." },
"blocks": { "value": [...] }
}
}
The canonical Slack blocks payload for each event lives in
references/block-templates.md. Copy the matching block verbatim — it
matches the in-product alert wizard, so agent-created alerts look identical to UI-created ones.
For per-issue scoping — created / reopened only, spiking events carry no exception properties — add
to filters:
"properties": [
{ "key": "$exception_issue_id", "value": "<issue_uuid>", "operator": "exact", "type": "event" }
]
Other useful property filters: $exception_types (exception class names, an array), name (issue
title). See references/event-triggers.md for the full property surface
per event.
Echo the alert back to the user with: name, trigger event (human-readable), destination, and a one-line
preview of the message body. Do not echo Slack workspace ids or webhook URLs — those are sensitive. Tell
the user how to disable: "you can pause this alert by setting enabled: false via
error-tracking-alerts-partial-update or by toggling it in the destinations UI."
Use <trigger> · <channel> (auto) so the user can scan their alert list and spot agent-created entries.
Examples:
Issue spiking · #oncall (auto)Issue reopened · #regressions-webhook (auto)Issue created · Linear/Eng (auto)Do not use the issue title in the name — alerts can match many issues, and the title becomes stale once the issue evolves.
posthog:error-tracking-alerts-list call up front, not per candidate.Report what you did, in this shape:
_spiking and the
detector hasn't been turned on), wire up source maps (so the alert's stack trace links resolve), or
tune the alert filters after watching it for a day.data-ai
Signals scout for PostHog Tasks, the agent work items a project runs. Two lenses: delivery health (runs failing, clustered by repository and error class, and retry storms) every run, and on a slower rotation demand (recurring asks across human-authored tasks that point at a product gap). Skips the scout fleet's own run rows.
devops
Signals scout for the PostHog Conversations (support inbox) product. Watches the `$conversation_*` ticket-lifecycle events for support-delivery regressions — SLA breach-rate steps, first-response latency blowouts, backlog inflow-vs-resolution imbalance, and channel / assignment concentration — and files each dated regression as a report. Complements the per-ticket product-feedback signals the emission pipeline already fires; does not re-surface individual ticket content.
development
Populates and maintains a project's data catalog (semantic layer): canonical metrics, trust marks (certifications) on warehouse tables/views, and reviewed table relationships. Use when asked to set up / seed / bootstrap the data catalog or semantic layer, to catalog a project's metrics, to certify or deprecate data sources, to propose or review table joins, or to work through the proposal review queue. To *use* an existing catalog to answer a business-number question, see querying-posthog-data instead. Trigger terms: data catalog, semantic layer, canonical metric, certify table, deprecate source, relationship proposal, metric drift, review queue.
tools
Investigate logs in a PostHog project: verify a service or deployment is healthy, explain an error spike, triage an incident, or understand what a log stream is saying. Use when the user asks to "check the logs", asks whether a service, deploy, release, or change is working or broke anything, asks why errors are up or what changed, or wants the root cause of failures visible in logs. Routes the logs MCP tools (services overview, pattern mining, before/after pattern diffing, bucketed counts, facets, raw rows) so investigations start from summaries instead of raw rows or hand-written SQL over the logs table.