instrument-integration

Instrument PostHog SDKs across popular web and mobile frameworks with verified configuration.

58|5|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/PostHog/skills --skill instrument-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instrument-integration
Source: https://github.com/PostHog/skills/tree/main/skills/omnibus/instrument-integration
Command: npx skills add https://github.com/PostHog/skills --skill instrument-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Instrument PostHog across an application by providing framework-specific SDK installation and setup so teams can start collecting analytics with minimal disruption.

Core Features & Use Cases

  • Framework-aware SDK installation, initialization, and provider setup across multiple stacks (Next.js, React, Vue, Django, Flask, Laravel, Android, iOS, and more).
  • Environment-aware configuration and verification to ensure PostHog is correctly wired into existing code without invasive rewrites.
  • End-to-end guidance for validating analytics contracts, including identify() usage and event capture, in real-world PR review and onboarding scenarios.

Quick Start

Install the appropriate PostHog SDK for your framework, wire up initialization and identify calls, and verify events flow in your environment.

Frequently Asked Questions about instrument-integration

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

FAQPage Schema
How do I integrate the PostHog SDK into a Next.js or Django application?

PostHog SDK integration supports Next.js, React, Vue, Django, Flask, Laravel, Android, and iOS. The skill detects your platform, locates the framework reference, and provides tailored installation and initialization steps for each specific stack.

What is the correct way to initialize PostHog and set up environment variables?

Correct PostHog initialization requires configuring environment variables for your project credentials before setting up the provider. The skill enforces safety checks to ensure environment variables are used correctly, preventing hardcoded keys and ensuring a production-ready setup.

How do I verify PostHog analytics events and identify calls are working correctly?

You can verify PostHog analytics events by validating identify() calls and event capture within your environment. The skill provides end-to-end guidance for validating analytics contracts to ensure events flow correctly without requiring invasive code rewrites.

Does PostHog SDK setup work with both web and mobile frameworks without changing app structure?

Yes, PostHog SDK setup works with web frameworks like Next.js, React, Vue, Flask, and Laravel, as well as mobile platforms like Android and iOS. The skill ensures environment-aware configuration that wires into existing code without invasive rewrites or altering application structure.

Why is my PostHog instrumentation not capturing events after SDK installation?

PostHog instrumentation may fail to capture events if environment variables are missing or the provider was not initialized correctly. The skill enforces safety checks during setup to ensure environment variables are properly configured and identify() calls are validated before deployment.