Agent skill · marketing growth · jeremylongshore
posthog-hello-world
Verify a minimal PostHog integration with one controlled event, one identified test user, and one feature-flag fallback. Use when proving a new setup before broader instrumentation. Trigger with "PostHog smoke test", "verify PostHog setup", or "first PostHog event".
Why this skill is useful
Provides specific examples and patterns for integrating with PostHog's API that the AI wouldn't reliably generate on its own.
What it needs
Requires posthog-js, posthog-node installed locally. Requires posthog account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
PostHog Hello World Overview Minimal working examples demonstrating the three core PostHog operations: capturing events, identifying users, and evaluating feature flags. Covers both browser (posthog-js) and server (posthog-node) SDKs. Prerequisites Completed posthog-install-auth setup Project API key (phc...) configured posthog-js and/or posthog-node installed Instructions Tool discipline Use Read to inspect the relevant configuration and implementation before proposing changes. Use Write only for a new, explicitly requested artifact inside the target project. Use Edit for minimal changes to existing project files after the evidence pass. Step 1: Capture Your First Event (Node.js) Step 2: Browser Hello World (posthog-js) Step 3: Python Hello World Step 4: Raw HTTP API (No SDK) Error Handling Error Cause Solution ------- ------- ---------- Events not in dashboard Not flushed Call await posthog.shutdown() or posthog.flush() posthog.init silently fails Wrong API host Use us.i.posthog.com (not app.posthog.com) Feature flag returns undefined Flag not created yet Create flag in PostHog dashboard first identify not linking Different distinctid Frontend and backend must use the same distinctid Python events missing No flush before exit posthog.shutdown() or posthog.flush() at end Output Working event capture in PostHog Activity tab User identified with properties in Persons view Feature flag evaluation result logged Console output confirming each operation Examples In a disposable test environment, initialize the official SDK with the project token and selected region, capture one namespaced smoke event, verify its arrival in PostHog, and exercise a flag with an explicit fallback. Record the test distinct ID so the evidence can be removed or filtered later. Resources See official PostHog references for current authority and verification boundaries. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/posthog-hello-world--59b448