Authoring Error Tracking Alerts
PostHogOfficialPublished by PostHog
- Skill
- Workflow
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for setting up error tracking notifications within a project. It focuses on routing error lifecycle events—specifically issue creation, reopening, and spiking—to external destinations like Slack, webhooks, or issue trackers. The process emphasizes preventing alert fatigue through proper deduplication, selecting the appropriate trigger event based on user intent, and using canonical message templates to ensure consistency with in-product alerts.
What it does
- Lists existing error tracking alerts to prevent duplicate configurations.
- Retrieves available integration channels for Slack, webhooks, and issue trackers.
- Creates new error tracking alerts using standardized message templates.
- Supports per-issue scoping using event property filters.
- Provides a consistent naming convention for easy management of agent-created alerts.
- Verifies and summarizes the configuration details for the user.
When to use it
- When a user requests notifications for new errors or exceptions.
- When a user wants to be alerted if a previously resolved issue recurs.
- When a user needs to monitor for abnormal spikes in error volume.
- When setting up a new project and establishing a baseline for error monitoring.
Advantages
- Reduces alert fatigue by guiding users toward the most signal-dense trigger events.
- Ensures consistency with native UI alerts by using canonical block templates.
- Prevents redundant notifications through mandatory deduplication checks.
- Supports flexible routing to various platforms including Slack, Linear, and webhooks.
Usage examples
- “Set up an alert to notify our #oncall channel whenever an error issue starts spiking.”
- The agent will list existing alerts, confirm the #oncall channel ID, and create a spiking alert using the canonical template.
- “I want to know if the 'DatabaseConnectionError' issue comes back after we fix it.”
- The agent will configure a '$error_tracking_issue_reopened' alert scoped specifically to that issue's fingerprint.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/posthog/authoring-error-tracking-alerts/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip authoring-error-tracking-alerts.zip -d .agents/skills
Documentation by PostHog
Authoring error tracking alerts
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.
When to use this skill
The user asks to set up alerts / notifications for errors or exceptions in their project.
The user wants a starter set of alerts after enabling error tracking.
The user pastes an issue link and asks "notify me when this happens again" — usually
_reopenedwith a per-issue property filter.
When not to use this skill
Tuning the spike detector itself (multiplier, window, threshold). That lives behind the spike detection config endpoint and is not exposed via MCP today.
Investigating an active incident — query the issue / its events directly via
posthog:query-error-tracking-issueandposthog:query-error-tracking-issue-eventsinstead of authoring more alerts mid-fire.Configuring volume-threshold alerts (count of
$exceptionevents over a window). That's a logs-style alert and is not in scope here — error tracking alerts ride the lifecycle events instead.
Tools
| Tool | Job | Where it fits |
|---|---|---|
posthog:error-tracking-alerts-list | List existing alerts (paginated); 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". |
Trigger events — pick exactly one per alert
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.
Workflow
1. Confirm intent
You need three things from the user before creating anything:
Which trigger event. If unspecified, recommend
_spikingand ask for confirmation. Do not silently pick one.Which channel. Slack channel name, webhook URL, Linear team, etc. Never hardcode a production channel. If the user says "the dev channel", ask for the exact channel id or name.
Which scope. All issues (most common), or scoped to a specific issue / exception type / assignee.
2. Dedupe against existing alerts
Scan every destination before you decide. The endpoint is paginated and defaults to 100 rows per page, so a single default call misses older alerts on a project with hundreds of destinations.
Call posthog:error-tracking-alerts-list with type: ["internal_destination"] and limit: 1000. If the
response still carries a non-null next, keep paging with offset until next is null. Then filter the
collected rows client-side by filters.events[].id and by any per-issue scope in filters.properties.
The list response carries no inputs, so it does not tell you which channel or URL a row delivers to.
Read the destination off name and description instead — the naming convention below puts the channel
in the name. When a row matches on event and scope but its name does not say where it delivers, do not
guess: show the user the matching names and ask whether one of them is the alert they mean.
If an alert exists for the same event delivering to the same channel with the same scope, stop. Tell the user it already exists and ask whether they want to change anything (in which case use
error-tracking-alerts-partial-update) or skip.Multiple alerts on the same event for the same channel produce duplicate Slack messages — the user almost never wants this.
Multiple alerts on the same event for different channels (e.g. one for
#oncall, one for the oncall webhook) is fine and sometimes intentional. Confirm.Multiple alerts on the same event and channel but different scopes (e.g. two
_reopenedalerts each pinned to a different$exception_issue_id) are not duplicates. Confirm before adding. Note that a scoped alert and an all-issues alert to the same channel both fire on the scoped issue.
PostHog's "alerts configured" recommendation only inspects filters.events — adding per-issue
filters.properties does not affect the status the alerts banner reports.
3. Pick the integration
For Slack:
posthog:integrations-listwithkind=slack→ pick the integrationid(an integer).posthog:integrations-channels-retrievewith 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.
4. Create the alert
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.
5. Verify
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."
Naming convention
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.
Token-economy rules
One complete
posthog:error-tracking-alerts-listscan up front, not per candidate. The scan is complete only whennextis null — page through it once and reuse the collected rows for every candidate.Reuse a single integration lookup for multiple alerts going to the same workspace.
Confirm the channel / URL with the user before creating each alert. Never batch-create alerts to a destination the user has not explicitly named.
Cap iteration at 1 round per alert. If the user wants three alerts, that's three create calls — not three create calls per alert.
Output
Report what you did, in this shape:
For each shipped alert: name, trigger event, destination (channel name or webhook host — never the full URL), enabled state.
For each skipped alert: trigger + channel + why (already exists, user declined, missing integration).
Anything the user should do next: enable the spike detection config (if they picked
_spikingand 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.
Related skills
triaging-error-issues— work out which issues actually matter before wiring alerts for theminvestigating-error-issue— deep-dive an issue an alert fired forauthoring-log-alerts— the same alerting job, but for log lines instead of exceptions
Files
- ATTRIBUTION.mdAdded by AutoGineer881 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md10.8 KiB
- references/block-templates.md11.5 KiB
- references/event-triggers.md6.6 KiB
references/event-triggers.md
Error tracking alert trigger events
The three lifecycle events that error tracking alerts ride on. Each is fired by a different part of the ingestion / detection pipeline, has a different cadence, and exposes a different property surface.
$error_tracking_issue_created
Fires: once, the first time a fingerprint produces an exception that maps to a new issue. Subsequent exceptions on the same fingerprint do not re-fire this event.
Cadence: proportional to the number of distinct exception types in your project. A new project may fire dozens per hour; a mature project may fire once or twice a day.
Best for:
Small projects where every new error type is genuinely worth a look.
Projects right after enabling error tracking, to learn the shape of incoming errors.
Routing into a "triage" Slack channel that humans only check during business hours.
Avoid for: large or noisy projects. A single bad release can produce hundreds of new issues; a firehose into the user's primary channel will train them to ignore it.
Useful event properties for templating:
event.properties.name— issue title (typically the exception class).event.properties.description— truncated body / message.event.properties.status—"active"at this point.event.properties.fingerprint— used in the deep link.event.properties.exception_timestamp— used in the deep link.event.distinct_id— the issue id.The originating exception's event properties are also spread onto the alert event, so property filters can reference keys like
$exception_issue_id(per-issue scoping) and$exception_types.
$error_tracking_issue_reopened
Fires: when an issue previously marked resolved starts emitting again. The status flips back to
active and this event fires once per re-open transition. Spike detection on a resolved issue will
not fire _reopened — only the explicit status flip back to active does.
Cadence: roughly proportional to how often someone actually marks issues resolved. In projects where issues are auto-resolved on release, this can be noisy; in projects where resolution is manual, this is rare and high-signal.
Best for: catching regressions on issues someone has already triaged. The safest "I want to know if this comes back" trigger.
Useful event properties for templating: same as _created, plus the issue's current status will
be "active" (the reopen has already taken effect).
$error_tracking_issue_spiking
Fires: when the spike detector flags an issue as having abnormal volume. The detector uses the
configured baseline window, multiplier, and threshold (configured via the spike detection config
endpoint per project — not per alert). Each spiking issue fires its own event; one project-wide
spike can therefore trigger many _spiking events in quick succession.
Cadence: depends entirely on the spike config. With default thresholds, expect a handful per day on a typical production project; tighter thresholds make this much noisier.
Best for:
Production projects with high baseline volume where
_createdand_reopenedare too rare or too noisy.Routing into an oncall channel (this is the closest thing to "wake someone up" the lifecycle events offer).
Avoid for: projects where the spike detector hasn't been configured. Without a tuned baseline the detector either over-fires or under-fires.
Useful event properties for templating — spiking events carry a smaller surface than _created:
no status and no exception properties (so no per-issue property scoping). Available:
event.properties.name— issue title.event.properties.description— truncated body / message.event.distinct_id— the issue id.event.properties.fingerprint— a fingerprint of the spiking issue, for the merge-stable deep link.event.properties.exception_timestamp— the spike detection time.event.properties.current_bucket_value— exception count in the current detection window (typically 5 minutes).event.properties.computed_baseline— the historical baseline the current value is being compared to. May be 0 on the first spike if there isn't enough history yet — the canonical Slack template guards against this with a conditional expression.
Pre-flight check: before creating a _spiking alert, verify the spike detection config has been
turned on for the project. There is no MCP tool for this today — direct the user to the error tracking
spike config UI in product settings if it is not enabled. An alert on _spiking is silent until the
detector is running.
Common to all three
Project context is exposed as {project.url} (already includes /project/<team_id>), {project.id},
and {project.name}. The alert's own metadata is exposed as {source.url} and {source.name} —
useful for "manage this alert" links inside the message body.
Assignee properties are present only when the issue has an assignee. On an unassigned issue the keys are missing, so a test run against an unassigned issue does not show them.
event.properties.assignee— a JSON string such as{"type":"user","id":1234}, not an object, soevent.properties.assignee.iddoes not work. Use it for "is set" / "is not set" filters.event.properties.assignee_name— the user's full name (their email when they have no name), or the role name.event.properties.assignee_email— user assignees only.
The event keeps assignee but leaves out assignee_name and assignee_email in two cases: the assigned user has left the organization, or the issue was reassigned before the alert went out.
So a missing name does not mean the issue is unassigned.
To show the assignee in a message, use {event.properties.assignee_name ?? (event.properties.assignee ? 'Assigned' : 'Unassigned')}.
To alert only on unassigned issues, add the property filter assignee is not set.
Deep-link shape for the issue page (used by the canonical block templates):
{project.url}/error-tracking/fingerprint/{encodeURLComponent(event.properties.fingerprint)}?timestamp={event.properties.exception_timestamp}&utm_source=alert&utm_campaign=error_tracking_alert&utm_medium=slackThe link goes through the fingerprint redirect page, which resolves the fingerprint to whatever issue it currently belongs to — so links keep working after issues are merged.
utm_medium matches the destination (slack, discord, microsoft_teams).
The same link shape is used for all three trigger events.
The utm_* tags let the team measure how often issues get clicked from alerts later via product analytics on $pageview.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/authoring-error-tracking-alerts · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog or PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download authoring-error-tracking-alerts.zip