skills/grouping-noisy-errors/SKILL.md
Consolidate PostHog error tracking issues that are the same actual error reported under different fingerprints. Use when the user asks "why do I have so many TypeError issues that look the same?", "merge these duplicates", "stop splitting this error into new issues", or wants to clean up fingerprint sprawl. Decides between a one-shot merge of existing issues and a durable grouping rule that keeps future events from creating new fingerprints. Does NOT group conceptually similar bugs across different runtimes, SDKs, or call sites.
npx skillsauth add posthog/ai-plugin grouping-noisy-errorsInstall 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.
The same error can be reported as dozens of separate issues when stack frames or messages contain volatile data — random IDs, dynamic file paths, build hashes, anonymous function names. The fix is two-step: merge the existing issues into one target, then create a grouping rule so future events from the same call site share a single canonical fingerprint instead of spawning new ones.
Important up front: "same error" here is narrow. Two issues that share a name or
a sentence of message text but came from different code paths, different SDKs,
or different runtimes are different errors and should stay separate, even if
the user thinks of them as "the same kind of bug". Grouping a frontend
TypeError together with a backend TypeError because both messages contain
"undefined" destroys the signal that lets the team find each one. The criteria
in step 1 exist to keep that from happening.
| Tool | Purpose |
| ---------------------------------------------- | ------------------------------------------------------ |
| posthog:query-error-tracking-issues-list | Find candidate duplicate issues |
| posthog:query-error-tracking-issue | Pull compact details for an individual issue |
| posthog:query-error-tracking-issue-events | Sampled $exception events with stack and message |
| posthog:error-tracking-issues-merge-create | Merge existing issues into a target |
| posthog:error-tracking-issues-split-create | Surgically split fingerprints back out if a merge errs |
| posthog:error-tracking-grouping-rules-create | Auto-group future events into one issue |
| posthog:error-tracking-grouping-rules-list | Check existing grouping rules before adding new ones |
| posthog:error-tracking-issues-partial-update | Rename or re-describe the target after a merge |
The two tools solve different halves of the problem:
custom-rule:<rule_id> at ingestion time, so all future matches
share one canonical fingerprint rather than spawning new ones. The first
match either creates a new issue keyed off that fingerprint, or routes to
whatever issue is already bound to it.Use both together when the issue is recurring: merge historical duplicates
into a target issue, then create the rule. The rule API does not accept a
target issue ID — once the rule starts firing, the resulting custom-rule:...
issue can be merged into the same target so the consolidation sticks. Use
merge alone for historical sprawl that you don't expect to recur. Use a
grouping rule alone for a brand-new pattern you're getting ahead of, when
you don't need to consolidate with an existing issue.
Search by exception type or message to find candidates:
posthog:query-error-tracking-issues-list
{
"searchQuery": "TypeError: Cannot read property",
"status": "active",
"limit": 50,
"orderBy": "occurrences",
"dateRange": { "date_from": "-30d" }
}
For each candidate, pull one sampled exception event to compare stack, type, and message:
posthog:query-error-tracking-issue-events
{
"issueId": "<candidate_issue_id>",
"limit": 1,
"verbosity": "stack"
}
Run this once per candidate. The tool defaults to onlyAppFrames: true, which
makes the top in-app frame stand out at a glance. If two candidates share the
same top frame and same exception type, they're likely the same error — but
verify against the full checklist below before merging.
Treat two issues as duplicates only when every one of these matches:
$lib is the same SDK (posthog-js, posthog-python, posthog-node,
posthog-android, etc.). Errors from different SDKs almost always come from
different code paths even when the exception type matches.$exception_types).$exception_handled agrees (both handled or both unhandled). A caught
variant and an uncaught variant are different code paths and benefit from
staying separate.If any single one of those differs, they are not duplicates — investigate
separately (investigating-error-issue).
These are the failure modes that destroy debugging signal. Do not group across any of them, even when the user describes them as "the same kind of bug":
TypeError
from a browser bundle and a TypeError from a Node service share a name and
often a message word, but the stack, the runtime, and the fix all differ.posthog-js vs posthog-python vs
posthog-android are different call sites.NullPointerException thrown from OrderService.cancel is not the same bug
as one thrown from PaymentService.refund, even if both messages say
"user was null".$exception_handled
are usually a code path that swallows the error in one place and lets it
propagate in another — keeping them separate makes that visible.Pick the issue that should absorb the others:
first_seen — preserves the original timelineNote the target's ID. The other candidates become ids to merge in.
posthog:error-tracking-issues-merge-create
{
"id": "<target_issue_id>",
"ids": ["<duplicate_id_1>", "<duplicate_id_2>", "..."]
}
Merge is destructive (annotation destructive: true) — once issues are merged
into a target, the source issues are gone from the active list. Confirm the
target with the user before calling. Cap each merge call at ~50 source IDs to
keep failures localized; for larger sprawl, batch.
Merged changes may not appear in the issue list immediately — re-listing right
after the call can still show the source issues for a short window. If a
follow-up error-tracking-issues-list call looks unchanged, wait a few seconds
and re-query rather than re-issuing the merge.
If after the merge the target's metadata looks wrong (a duplicate had a better
name), use error-tracking-issues-partial-update to fix the name or description
on the target rather than re-merging.
A grouping rule is worth creating when both are true:
The canonical exception properties ($exception_types, $exception_values
for messages, $exception_sources for file paths, $exception_functions for
function names) are arrays at capture time. The property filter compiler
special-cases them — it parses the JSON-materialized column
and wraps the filter in arrayExists(v -> ..., JSONExtract(...)), so all
the standard operators (exact, is_not, icontains, not_icontains,
regex, not_regex) work against individual elements with the bare value:
exact "TypeError", not exact '["TypeError"]' or regex '"TypeError"'.
The singular forms ($exception_type, $exception_message) and
$exception_stack_trace_raw are emitted on a fraction of a percent of events;
filtering on them produces a rule that silently never matches.
If the volatility is in the message (e.g.,
TypeError at /static/main.<hash>.js), a regex filter on $exception_values
works. If the volatility is in line numbers within a known file, icontains
on $exception_sources does. $exception_handled is also a useful narrowing
dimension — separate handled vs unhandled rather than mixing them.
Skip the grouping rule when:
Translate the step 1 "same error" checklist into rule filters. A rule that
matches more loosely than the checklist will silently merge unrelated bugs
forever — the rule is more dangerous than the merge because it runs against
every future event. At a minimum, scope by SDK and exception type, and add
a third dimension (file path via $exception_sources, or a specific message
phrase via $exception_values) to pin the call site:
posthog:error-tracking-grouping-rules-create
{
"filters": {
"type": "AND",
"values": [
{
"type": "event",
"key": "$lib",
"operator": "exact",
"value": "posthog-js"
},
{
"type": "event",
"key": "$exception_types",
"operator": "exact",
"value": "TypeError"
},
{
"type": "event",
"key": "$exception_sources",
"operator": "icontains",
"value": "/static/checkout/"
},
{
"type": "event",
"key": "$exception_values",
"operator": "icontains",
"value": "Cannot read property"
}
]
},
"description": "Cleanup: collapse noisy checkout TypeError fingerprints (posthog-js)"
}
Rules are evaluated in order. List existing rules first
(posthog:error-tracking-grouping-rules-list) — if a rule already partially
covers the pattern, prefer adjusting its filter over stacking a near-duplicate.
The optional assignee field auto-assigns issues created by the rule. Skip it
unless the user explicitly wants ownership baked into the rule.
Sample the merged issue's recent events to confirm the merge succeeded.
Watch for the rule's custom-rule:<rule_id> fingerprint to start matching
events — the first match creates a new issue (or routes to whatever was
already bound to that fingerprint). To keep events under your historical
target rather than scattered across the new custom-rule issue, run a second
merge folding the custom-rule issue into the target.
If new (non-rule) fingerprints continue appearing despite the rule, its filter is too narrow — widen it.
TypeErrors in different files are different bugs.error-tracking-issues-split-create if you need to surgically
separate fingerprints back out of a merged issue.testing
Focused Signals scout for PostHog projects running surveys. Watches active surveys for score regressions (NPS / CSAT / rating drops), response-volume drops, abandonment spikes, and targeting drift, AND aggregates open-text responses into recurring themes the team should know about (clusters of complaints, praise, feature requests). Emits findings only when a theme or anomaly clears the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on other skills. Picked uniformly at random by the coordinator alongside `signals-scout-general` and other specialists.
development
Focused Signals scout for PostHog projects using revenue analytics. Watches the derived revenue product for upstream failures (Stripe sync stalls, capture regressions), config drift (missing subscription property, currency mix surprises, broken Stripe↔person joins, deferred-revenue gaps), and goal-miss escalations. Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on other skills. Picked uniformly at random by the coordinator alongside `signals-scout-general` and other specialists.
testing
Focused Signals scout for finding observability gaps in PostHog itself — significant event volumes the team isn't tracking, custom events with no insight or dashboard coverage, insights pointing at events that have stopped firing, dashboards missing related context, critical events with no alerts. Watches the event-stream-vs-saved- inventory delta as the team's product evolves and emits findings recommending new insights, dashboard additions, or alerts when gaps clear the confidence bar. Self-contained peer in the signals-scout-* fleet — picked uniformly at random by the coordinator alongside `signals-scout-general` and other specialists.
testing
Focused Signals scout for PostHog projects using logs. Watches for volume bursts, severity-distribution shifts, service silence, fresh message patterns, and trace-correlated bursts via the logs ingestion pipeline. Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on other skills. Picked uniformly at random by the coordinator alongside `signals-scout-general` and other specialists.