instrument-integration

Install and initialize the PostHog SDK with user identification and environment variables.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the guesswork and manual trial-and-error of adding PostHog instrumentation by guiding you through correct SDK installation, initialization, user identification, and environment setup.

Core Features & Use Cases

  • SDK installation & initialization: Installs the correct PostHog SDK for your detected stack and initializes it in the appropriate location.
  • Provider / wrapper setup: Ensures framework-specific provider or initialization patterns are followed.
  • User identification & session continuity: Adds identify() calls on login/signup and supports passing session/distinct IDs to server code via headers when applicable.
  • Environment variable configuration: Uses env vars for API key and host to avoid hardcoding secrets.

Quick Start

Add PostHog instrumentation to your current codebase using the correct framework reference, including SDK init, identify() on auth, and env var configuration.

Frequently Asked Questions about instrument-integration

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

FAQPage Schema
How do I add PostHog tracking to my app?

Add PostHog tracking by detecting your stack, installing the correct SDK, initializing it with framework-specific patterns, identifying users on login, and configuring API key and host environment variables.

Can I use PostHog SDK integration with SSR setups?

Yes, PostHog SDK integration supports SSR and client/server setups requiring session continuity by passing session and distinct IDs to server code via headers where applicable.

What's the best way to set up PostHog environment variables?

Set up PostHog environment variables by configuring API key and host entries to avoid hardcoding secrets, ensuring secure initialization across your detected stack.

How does user identification work with PostHog event tracking?

User identification with PostHog event tracking works by adding identify() calls on login and signup, linking user actions to distinct IDs for session continuity.

Does PostHog integration work for first-time setup and PR reviews?

Yes, PostHog integration applies to both first-time setup and PR reviews across many frontend and backend stacks, following an ordered workflow to ensure correct SDK initialization.

Why should I not modify existing PostHog initialization?

Modifying existing PostHog initialization is discouraged to prevent breaking current session continuity; the Skill follows an ordered workflow that preserves existing setup while adding new tracking.