posthog-core-workflow-b

Featured

Implement PostHog feature flags, A/B experiments, and cohort management. Use when rolling out features with flags, running A/B tests, creating cohorts, or evaluating multivariate experiments with PostHog. Trigger: "posthog feature flag", "posthog experiment", "posthog A/B test", "posthog cohort", "feature rollout posthog", "posthog multivariate".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ### Step 1: Evaluate Feature Flags (Browser) ```typescript import posthog from 'posthog-js'; // Boolean flag if (posthog.isFeatureEnabled('new-checkout-flow')) { renderNewCheckout(); } else { renderLegacyCheckout(); } // Multivariate flag (returns string variant name) const variant = posthog.getFeatureFlag('pricing-page-experiment'); switch (variant) { case 'control': renderOriginalPricing(); break; case 'annual-first': renderAnnualFirstPricing(); break; case 'social-proof': renderSocialProofPricing(); break; default: renderOriginalPricing(); // Fallback if flag not loaded yet } // Get flag payload (JSON data attached to a flag variant) const payload = posthog.getFeatureFlagPayload('banner-config'); // payload: { text: "Spring sale!", color: "#ff6b35", discount: 20 } // React: Wait for flags to load before rendering posthog.onFeatureFlags(() => { // Flags are now loaded and ready const enabled = posthog.isFeatureEnabled('new-feature')...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

posthog-performance-tuning

Optimize PostHog performance: local flag evaluation, client batching config, event sampling, efficient HogQL queries, and serverless flush patterns. Trigger: "posthog performance", "optimize posthog", "posthog latency", "posthog caching", "posthog slow", "posthog batch", "posthog fast".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-hello-world

Create a minimal working PostHog example with event capture, identify, and feature flags. Use when starting a new PostHog integration, testing your setup, or learning basic posthog-js and posthog-node patterns. Trigger: "posthog hello world", "posthog example", "posthog quick start", "simple posthog code", "first posthog event".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-observability

Monitor PostHog integration health: event ingestion rates, feature flag evaluation latency, billing volume tracking, and Prometheus/Grafana alerting. Trigger: "posthog monitoring", "posthog metrics", "posthog observability", "monitor posthog", "posthog alerts", "posthog dashboard".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-core-workflow-a

Implement PostHog product analytics: event capture, user identification, group analytics, and property management using posthog-js and posthog-node. Trigger: "posthog analytics", "capture events", "track users posthog", "posthog identify", "posthog group analytics", "product analytics".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-upgrade-migration

Upgrade posthog-js and posthog-node SDKs with breaking change detection. Covers v4 to v5 posthog-node migration (sendFeatureFlags change), posthog-js autocapture API changes, and version-specific gotchas. Trigger: "upgrade posthog", "posthog breaking changes", "update posthog SDK", "posthog version", "posthog migration".

2,266 Updated today
jeremylongshore