instrument-error-tracking

Instrument repositories with PostHog SDKs to capture exceptions and upload source maps.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/FrekiManagarm/dunlo --skill instrument-error-tracking-frekimanagarm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instrument-error-tracking
Source: https://github.com/FrekiManagarm/dunlo/tree/main/.agents/skills/instrument-error-tracking
Command: npx skills add https://github.com/FrekiManagarm/dunlo --skill instrument-error-tracking-frekimanagarm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you add reliable error tracking so exceptions are captured in PostHog with stack traces and (where applicable) source maps, making production issues diagnosable instead of mysterious.

Core Features & Use Cases

  • SDK installation & initialization: Detects your platform, installs the correct PostHog SDK, and initializes it using framework-specific guidance.
  • Exception autocapture enablement: Turns on automatic unhandled exception capture without requiring you to wire every handler manually.
  • Manual exception capture for critical paths: Adds targeted capture calls at error boundaries and catch blocks for errors that don’t reach global handlers.
  • Source map uploads (frontend/mobile): Configures source map uploading so PostHog can resolve minified stack traces back to original source.
  • Environment variable setup & verification: Ensures PostHog API key/host are stored in environment variables and validates the integration via checks and build/lint scripts.

Quick Start

Use the instrument-error-tracking skill to add PostHog error tracking to your codebase, automatically enabling exception autocapture, uploading source maps when needed, and configuring environment variables.

Frequently Asked Questions about instrument-error-tracking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add PostHog error tracking to capture unhandled exceptions automatically?

PostHog error tracking captures unhandled exceptions automatically by detecting your platform, installing the correct SDK, and initializing it to enable exception autocapture. This ensures production errors are diagnosable instead of mysterious without requiring manual handler wiring.

What's the best way to resolve minified stack traces in PostHog for frontend frameworks?

The best way to resolve minified stack traces in PostHog is by configuring source map uploads for frontend and mobile platforms. This maps minified production code back to original source files, making stack traces readable and production issues diagnosable.

Does PostHog error tracking work with Node and mobile SDKs or only web frameworks?

PostHog error tracking works across multi-platform stacks including web frameworks, Node, and mobile platforms. The instrumentation detects your existing platform and PostHog setup to install and initialize the correct framework-specific SDK.

How do I capture exceptions at error boundaries that don't reach global handlers?

To capture exceptions at error boundaries that miss global handlers, you add manual exception capture calls targeted at critical paths and catch blocks. This ensures errors bypassing global handlers are still sent to PostHog with full stack traces.

Do I need environment variables to configure PostHog API keys for SDK integration?

Yes, you need environment variables to store PostHog API keys and host addresses for SDK integration. The instrumentation wires these environment variables into your setup and validates the connection using build, type, and lint checks.