feature-flags-nodejs

Evaluate and apply PostHog feature flags in Node.js applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PostHog feature flags integration for Node.js apps, enabling safe, dynamic feature control and observability with PostHog flags.

Core Features & Use Cases

  • Evaluate boolean feature flags via isFeatureEnabled and optional payloads.
  • Retrieve and apply multivariate flags with getFeatureFlag and payloads.
  • Enrich events with feature flag data using sendFeatureFlags and payloads.
  • Override evaluation context with person or group properties for accurate flag outcomes.
  • Works across server-side Node.js backends and services to coordinate feature rollouts.

Quick Start

Install the Node.js library, initialize the client, and check a flag to control flow.

Frequently Asked Questions about feature-flags-nodejs

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

FAQPage Schema
How do I evaluate PostHog feature flags in a Node.js backend?

To evaluate PostHog feature flags in Node.js, install the PostHog library, initialize the client, and call isFeatureEnabled for boolean flags or getFeatureFlag for multivariate flags to control backend logic.

Can I override evaluation context for PostHog feature flags in server-side Node.js?

Yes, you can override evaluation context by passing person or group properties into the PostHog Node.js client API calls to ensure accurate flag outcomes for specific user segments.

How do I enrich PostHog events with feature flag data in Node.js?

Enrich PostHog events with feature flag data in Node.js by using the sendFeatureFlags method, which attaches flag evaluations and payloads to events for enhanced observability.

What is the difference between boolean and multivariate feature flags in PostHog Node.js?

Boolean feature flags return true or false values via isFeatureEnabled, while multivariate flags return variable string payloads via getFeatureFlag to support complex rollout strategies.

Does PostHog Node.js feature flag evaluation support payload delivery?

Yes, PostHog Node.js feature flag evaluation supports payload delivery, allowing boolean and multivariate flags to carry additional configuration data via optional payload parameters.