A collection of PostHog skills for enhancing AI-assisted workflows. Add this repo as a Claude Code plugin marketplace to get access to all PostHog skills: Then install individual plugins: Or browse available plugins: Copy any skill directory to .claude/skills/ in your project: Any directory under skills/ that contains a .claude-plugin/plugin.json is automatically discovered and added to the market
Add this skill
npx mdskills install PostHog/diagnosing-stacktrace-symbolication@PostHog? Sign in with GitHub to claim this listing.Comprehensive cross-platform stack-trace symbolication debugging with clear workflow and tool-specific references
1---2name: diagnosing-stacktrace-symbolication3description: >4 Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript5 web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM). The PostHog symbol-set lookup flow is6 universal across platforms; build-tool and artifact details live in per-platform references (JavaScript is fleshed7 out, others come as we encounter them). Use when stack frames stay minified or obfuscated after symbols are8 uploaded, PostHog symbol sets show last_used but frames are not readable, chunk IDs or dSYM UUIDs do not match,9 "Token not found" appears, uploaded source maps / dSYMs / Proguard mappings look empty, or bundler /10 symbol-upload configuration needs troubleshooting.11---1213# Diagnosing stack-trace symbolication1415Symbolication is the cross-platform name for what JavaScript source-map lookup, Hermes function-offset resolution,16Proguard / R8 demangling, and dSYM address-to-line lookup all do — turn a minified or obfuscated frame back into a17readable file, function, and line.1819Work through the user's build and PostHog symbol sets as one pipeline: build config -> generated symbol artifacts20(JavaScript source maps, Hermes maps, Proguard mappings, or dSYM bundles) -> uploaded symbol set in PostHog ->21captured error frame. Most failures become obvious once those four pieces are checked in order.2223## Platforms2425| Platform | Symbol-data type | Reference |26| --------------------------- | ---------------- | ------------------------------------------- |27| JavaScript / TypeScript web | source-and-map | [javascript.md](./references/javascript.md) |28| React Native (Hermes) | hermes | _coming soon_ |29| Android (Proguard / R8) | proguard | _coming soon_ |30| iOS / macOS (dSYM) | apple-dsym | _coming soon_ |3132Step 3 of the workflow (symbol-set lookup in PostHog) is identical across platforms — `posthog-cli symbol-sets33extract` handles all four container types. Steps 1, 2, and the platform-specific failure modes live in the34per-platform reference.3536## Workflow3738### Step 1 - Find how symbol data is produced and uploaded3940Look at the app repo's build scripts and PostHog upload config. Confirm which PostHog package handles the upload41(`@posthog/rollup-plugin`, `@posthog/webpack-plugin`, `@posthog/nextjs-config`, `@posthog/nuxt`, or direct42`posthog-cli`) and which directory or asset it processes. See the platform reference for build-tool-specific43config inspection.4445For debugging, prefer a build where symbol artifacts remain on disk after upload so you can compare local46artifacts against what PostHog received. JavaScript example with the Vite plugin (the platform reference covers47the equivalent setting for other build tools):4849```ts50sourcemaps: {51 enabled: true,52 deleteAfterUpload: false,53}54```5556### Step 2 - Build and inspect local artifacts5758Run the production build that uploads symbols, then inspect the emitted files locally. The exact files and helper59invocation differ per platform — see the platform reference for the helper command, expected file shape, and common60build-time pitfalls (notably empty-mappings false positives that look like upload bugs but are actually bundler61config issues).6263If local artifacts already look wrong, fix the build before debugging the PostHog upload.6465### Step 3 - Check symbol sets in PostHog6667Look up the symbol set whose `ref` matches the captured frame's `chunk_id` using the dedicated MCP tools — they68handle auth, project scoping, and pagination automatically:6970- `posthog:error-tracking-symbol-sets-list` with `ref=<chunk_id>` returns the matching row.71- `posthog:error-tracking-symbol-sets-retrieve` with the ID returns the same shape (and confirms permissions).72- `posthog:error-tracking-symbol-sets-download-retrieve` returns a one-hour presigned URL pointing at the uploaded73 symbol-data file. Download it immediately; do not echo the URL back unless the user explicitly asks.7475If MCP access is not available, the same data is in **Project settings > Error tracking > Symbol sets** in the76PostHog UI.7778Interpret the row:7980- `ref` must match the captured frame `chunk_id`.81- `last_used` updating means PostHog found and loaded that symbol set. It does not guarantee the frame resolved.82- `has_uploaded_file: false` means the upload did not complete.83- A non-null `failure_reason` means PostHog could not parse or load the uploaded symbol data.8485The downloaded file is a PostHog symbol-data container (compressed Rust-encoded payload), not plain JSON. Extract86it with `posthog-cli`:8788```bash89posthog-cli symbol-sets extract symbolset.bin -o ./extracted90# or, without installing globally:91# npx @posthog/cli symbol-sets extract symbolset.bin -o ./extracted92# bunx @posthog/cli symbol-sets extract symbolset.bin -o ./extracted93```9495`posthog-cli symbol-sets extract` handles all four symbol-set types (source-and-map, hermes, proguard, dSYM) and96writes the extracted files into the output directory. Once extracted, summarize using the platform reference's97helper.9899### Step 4 - Compare local, uploaded, and served files100101Use the failure location to decide what to compare:102103- Local artifact empty and uploaded artifact empty: build tool emitted unusable symbols.104- Local artifact valid but uploaded artifact empty: upload processing selected or packed the wrong data.105- Uploaded artifact valid but production stack stays minified or obfuscated: compare deployed binary bytes to the106 binary that was uploaded with the symbols.107- `Token not found`: PostHog loaded the symbol data but the captured generated position did not match any token in108 the uploaded artifact. Usually points to a changed binary after upload, wrong line / column capture (JavaScript)109 or wrong frame offset (Hermes / dSYM), or a symbol-coverage bug.110111### Step 5 - Fix the most likely layer112113Platform-neutral fixes:114115- Upload symbols after the final build output exists, not before a later step rewrites it.116- Use the latest PostHog build plugin and `posthog-cli`.117- Re-upload changed assets intentionally when the same `ref` was previously uploaded with different content.118- Remove deployment-time transforms (CDN minify, edge rewrites, compression) that change the served binary after119 upload.120121Platform-specific fixes live in the platform reference.122123## Captured frame checks124125From an affected PostHog error event, collect one minified application frame:126127- `filename`128- `line` or `lineno`129- `column` or `colno`130- `function`131- `chunk_id` (or platform-equivalent symbol-set ref)132- any `resolve_failure`, especially `Token not found`133134The frame `filename` should match the deployed binary URL. The `chunk_id` should match the symbol set `ref`. The135captured generated position should point into the same binary that was uploaded with the symbol data.136137## Failure matrix (cross-platform)138139| Evidence | Likely cause | Next check |140| ------------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------- |141| 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. |142| Symbol set row missing | Upload went to another PostHog project/host or skipped this asset | Compare plugin `projectId`, `host`, and `ref`. |143| `has_uploaded_file: false` | Upload did not finish | Check build logs; compare `posthog-cli` output to the symbol set row. |144| Non-null `failure_reason` | PostHog could not parse the uploaded symbol data | Download via Step 3 and inspect the extracted contents. |145| Uploaded artifact valid, deployed binary differs | Deployment/CDN/post-build transform changed the binary after upload | Compare deployed bytes to local build output. |146| `Token not found` | Captured position has no token in the uploaded symbol data | Verify captured position, deployed binary identity, and symbol-data coverage. |147148Platform-specific failure modes (empty `mappings`, missing `sourcesContent`, Hermes function-offset mismatch,149Proguard class-name drift, dSYM UUID mismatch) live in the platform reference.150
Full transparency — inspect the skill content before installing.