skills/diagnosing-stacktrace-symbolication/SKILL.md
Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM). The PostHog symbol-set lookup flow is universal across platforms; build-tool and artifact details live in per-platform references (JavaScript is fleshed out, others come as we encounter them). Use when stack frames stay minified or obfuscated after symbols are uploaded, PostHog symbol sets show last_used but frames are not readable, chunk IDs or dSYM UUIDs do not match, "Token not found" appears, uploaded source maps / dSYMs / Proguard mappings look empty, or bundler / symbol-upload configuration needs troubleshooting.
npx skillsauth add posthog/ai-plugin diagnosing-stacktrace-symbolicationInstall 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.
Symbolication is the cross-platform name for what JavaScript source-map lookup, Hermes function-offset resolution, Proguard / R8 demangling, and dSYM address-to-line lookup all do — turn a minified or obfuscated frame back into a readable file, function, and line.
Work through the user's build and PostHog symbol sets as one pipeline: build config -> generated symbol artifacts (JavaScript source maps, Hermes maps, Proguard mappings, or dSYM bundles) -> uploaded symbol set in PostHog -> captured error frame. Most failures become obvious once those four pieces are checked in order.
| Platform | Symbol-data type | Reference | | --------------------------- | ---------------- | ------------------------------------------- | | JavaScript / TypeScript web | source-and-map | javascript.md | | React Native (Hermes) | hermes | coming soon | | Android (Proguard / R8) | proguard | coming soon | | iOS / macOS (dSYM) | apple-dsym | coming soon |
Step 3 of the workflow (symbol-set lookup in PostHog) is identical across platforms — posthog-cli symbol-sets extract handles all four container types. Steps 1, 2, and the platform-specific failure modes live in the
per-platform reference.
Look at the app repo's build scripts and PostHog upload config. Confirm which PostHog package handles the upload
(@posthog/rollup-plugin, @posthog/webpack-plugin, @posthog/nextjs-config, @posthog/nuxt, or direct
posthog-cli) and which directory or asset it processes. See the platform reference for build-tool-specific
config inspection.
For debugging, prefer a build where symbol artifacts remain on disk after upload so you can compare local artifacts against what PostHog received. JavaScript example with the Vite plugin (the platform reference covers the equivalent setting for other build tools):
sourcemaps: {
enabled: true,
deleteAfterUpload: false,
}
Run the production build that uploads symbols, then inspect the emitted files locally. The exact files and helper invocation differ per platform — see the platform reference for the helper command, expected file shape, and common build-time pitfalls (notably empty-mappings false positives that look like upload bugs but are actually bundler config issues).
If local artifacts already look wrong, fix the build before debugging the PostHog upload.
Look up the symbol set whose ref matches the captured frame's chunk_id using the dedicated MCP tools — they
handle auth, project scoping, and pagination automatically:
posthog:error-tracking-symbol-sets-list with ref=<chunk_id> returns the matching row.posthog:error-tracking-symbol-sets-retrieve with the ID returns the same shape (and confirms permissions).posthog:error-tracking-symbol-sets-download-retrieve returns a one-hour presigned URL pointing at the uploaded
symbol-data file. Download it immediately; do not echo the URL back unless the user explicitly asks.If MCP access is not available, the same data is in Project settings > Error tracking > Symbol sets in the PostHog UI.
Interpret the row:
ref must match the captured frame chunk_id.last_used updating means PostHog found and loaded that symbol set. It does not guarantee the frame resolved.has_uploaded_file: false means the upload did not complete.failure_reason means PostHog could not parse or load the uploaded symbol data.The downloaded file is a PostHog symbol-data container (compressed Rust-encoded payload), not plain JSON. Extract
it with posthog-cli:
posthog-cli symbol-sets extract symbolset.bin -o ./extracted
# or, without installing globally:
# npx @posthog/cli symbol-sets extract symbolset.bin -o ./extracted
# bunx @posthog/cli symbol-sets extract symbolset.bin -o ./extracted
posthog-cli symbol-sets extract handles all four symbol-set types (source-and-map, hermes, proguard, dSYM) and
writes the extracted files into the output directory. Once extracted, summarize using the platform reference's
helper.
Use the failure location to decide what to compare:
Token not found: PostHog loaded the symbol data but the captured generated position did not match any token in
the uploaded artifact. Usually points to a changed binary after upload, wrong line / column capture (JavaScript)
or wrong frame offset (Hermes / dSYM), or a symbol-coverage bug.Platform-neutral fixes:
posthog-cli.ref was previously uploaded with different content.Platform-specific fixes live in the platform reference.
From an affected PostHog error event, collect one minified application frame:
filenameline or linenocolumn or colnofunctionchunk_id (or platform-equivalent symbol-set ref)resolve_failure, especially Token not foundThe frame filename should match the deployed binary URL. The chunk_id should match the symbol set ref. The
captured generated position should point into the same binary that was uploaded with the symbol data.
| Evidence | Likely cause | Next check |
| ------------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| No chunk_id on frames | Chunk ID injection missing or SDK frame parser did not map the filename | Inspect deployed binary and raw frame filenames. |
| Symbol set row missing | Upload went to another PostHog project/host or skipped this asset | Compare plugin projectId, host, and ref. |
| has_uploaded_file: false | Upload did not finish | Check build logs; compare posthog-cli output to the symbol set row. |
| Non-null failure_reason | PostHog could not parse the uploaded symbol data | Download via Step 3 and inspect the extracted contents. |
| Uploaded artifact valid, deployed binary differs | Deployment/CDN/post-build transform changed the binary after upload | Compare deployed bytes to local build output. |
| Token not found | Captured position has no token in the uploaded symbol data | Verify captured position, deployed binary identity, and symbol-data coverage. |
Platform-specific failure modes (empty mappings, missing sourcesContent, Hermes function-offset mismatch,
Proguard class-name drift, dSYM UUID mismatch) live in the platform reference.
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.