Omnibus
Skill 76 of 200
Add PostHog error tracking to capture and monitor exceptions. Use after implementing features or reviewing PRs to ensure errors are tracked with stack traces and source maps.
4 minutes · 832 words · 4 sections
Install
npx skills add PostHog/skills --skill instrument-error-trackingnpx skills add PostHog/skills/plugin marketplace add PostHog/skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Use this skill to add PostHog error tracking that captures and monitors exceptions in your application. Use it after implementing features or reviewing PRs to ensure errors are tracked with full stack traces and source maps. If PostHog is not yet installed, this skill also covers initial SDK setup. Supports any platform or language.
Supported platforms: React, Next.js, Web (JavaScript), Node.js, Python, PHP, Ruby, Ruby on Rails, Go, Elixir, Angular, Svelte, Nuxt, React Native, Flutter, iOS, Android, and Hono.
Follow these steps IN ORDER:
Look for lockfiles (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb, go.sum, pubspec.lock, Podfile.lock, Package.resolved, mix.lock) to determine the package manager.
STEP 2: Research instrumentation. (Skip if PostHog is already set up.) 2.1. Find the reference file below that matches the detected platform — it is the source of truth for SDK initialization, exception autocapture, and framework-specific error tracking patterns. Read it now. 2.2. If no reference matches, fall back to your general knowledge and web search. Use posthog.com/docs as the primary search source.
STEP 3: Install and initialize the PostHog SDK. (Skip if PostHog is already set up.)
STEP 4: Enable exception autocapture.
STEP 5: Add manual error captures.
posthog.captureException() or the platform-equivalent at these locations.STEP 6: Upload source maps (frontend/mobile only).
STEP 7: Set up environment variables.
.env, .env.local, or framework-specific env files). If valid values already exist, skip this step.projects-get tool to retrieve the project’s api_token. If multiple projects are returned, ask the user which project to use. If the MCP server is not connected or not authenticated, ask the user for their PostHog project token instead.projects-get MCP response for a region field — US maps to https://us.i.posthog.com, EU maps to https://eu.i.posthog.com. If the region is not available from the MCP response or from existing project configuration, ask the user: “Are you on PostHog US Cloud or EU Cloud?” Do not assume US Cloud.STEP 8: Verify and clean up.
references/react.md - React error tracking installationreferences/web.md - Web error tracking installationreferences/nextjs.md - Next.js error tracking installationreferences/node.md - Node.js error tracking installationreferences/python.md - Python error tracking installationreferences/django.md - Djangoreferences/flask.md - Flaskreferences/php.md - Php error tracking installationreferences/laravel.md - Laravelreferences/ruby.md - Ruby error tracking installationreferences/ruby-on-rails.md - Ruby on rails error tracking installationreferences/ruby-on-rails.md - Ruby on railsreferences/go.md - Go error tracking installationreferences/dotnet.md - .net error tracking installationreferences/dotnet.md - .netreferences/elixir.md - Elixir error tracking installationreferences/angular.md - Angular error tracking installationreferences/svelte.md - Sveltekit error tracking installationreferences/nuxt-3-7.md - Nuxt error tracking installation (v3.7 and above)references/nuxt-3-6.md - Nuxt error tracking installation (v3.6 and below)references/react-native.md - React native error tracking installationreferences/flutter.md - Flutter error tracking installationreferences/ios.md - Ios error tracking installationreferences/android.md - Android error tracking installationreferences/hono.md - Hono error tracking installationreferences/fingerprints.md - Fingerprintsreferences/alerts.md - Send error tracking alertsreferences/monitoring.md - Monitor and search issuesreferences/assigning-issues.md - Assign issues to teammatesreferences/upload-source-maps.md - Upload source mapsreferences/COMMANDMENTS.md - Framework-specific rules the integration must followEach platform reference contains SDK-specific installation and manual capture patterns. Find the one matching the user’s stack.
captureException() at error boundaries and catch blocks for errors that don’t propagate to the global handler.Add PostHog error tracking to capture and monitor exceptions. Use after implementing features or reviewing PRs to ensure errors are tracked with stack traces and source maps. Also handles initial PostHog SDK setup if not yet installed.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: skills/omnibus/*/SKILL.md, skills/posthog/all/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by PostHog, declaring 6 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./PostHog/skills.md, and each skill at its own .md URL.29 files · 199 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 76.
Documentation the agent loads on demand, rather than up front.