Agent skill · marketing growth · jeremylongshore
posthog-core-workflow-b
Implement a safe PostHog feature-flag and experiment lifecycle with defaults, exposure integrity, rollout ownership, and cleanup. Use when releasing behind flags or running controlled experiments. Trigger with "PostHog feature flag", "PostHog experiment", or "A/B test".
Why this skill is useful
Provides specific PostHog API commands for feature flag management and A/B testing that the AI wouldn't reliably generate on its own.
What it needs
Requires posthog account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
PostHog Core Workflow B — Feature Flags & Experiments Overview Feature flag management, A/B experiment evaluation, and cohort analysis with PostHog. Covers boolean and multivariate flags, local evaluation for performance, experiment setup and statistical significance, and cohort creation via the API. Prerequisites Completed posthog-install-auth setup Familiarity with posthog-core-workflow-a (event capture) Personal API key (phx...) for flag management API Instructions Tool discipline Use Read to inspect the relevant configuration and implementation before proposing changes. Use Grep to locate initialization, capture, flag, and credential boundaries. 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: Evaluate Feature Flags (Browser) Step 2: Evaluate Feature Flags (Server — posthog-node) Step 3: Create Feature Flags via API Step 4: Set Up an Experiment Step 5: Query Experiment Results via API Step 6: Manage Cohorts via API Error Handling Error Cause Solution ------- ------- ---------- Flag always returns undefined Flags not loaded yet Use posthog.onFeatureFlags() callback Flag returns default on server Secure flag key or targeting context missing Verify the feature flags secure key and evaluation properties Experiment not tracking Goal event name mismatch Verify event name matches experiment config Cohort stuck iscalculating Large dataset Wait for calculation; check PostHog status getAllFlags slow Local cache unavailable or remote fallback Pass the secure flag key through personalApiKey and inspect cache readiness Output Feature flag evaluation (boolean and multivariate) Server-side local evaluation for low-latency flag checks A/B experiment setup with goal metric tracking Cohort creation and management via API Experiment results with statistical significance Examples For a checkout redesign, define an owned flag, choose a safe default, evaluate it o …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/posthog-core-workflow-b