feature-flags-nodejs

Evaluate PostHog feature flags and capture flag context in Node.js events.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/FrekiManagarm/dunlo --skill feature-flags-nodejs-frekimanagarm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flags-nodejs
Source: https://github.com/FrekiManagarm/dunlo/tree/main/.agents/skills/feature-flags-nodejs
Command: npx skills add https://github.com/FrekiManagarm/dunlo --skill feature-flags-nodejs-frekimanagarm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PostHog feature flags for Node.js help you safely control and gradually roll out functionality without redeploying, while ensuring your flag logic is consistently evaluated on the server.

Core Features & Use Cases

  • Evaluate feature flags in Node.js: Check boolean and multivariate flags per distinctId and optionally fetch payloads to drive behavior.
  • Send flag context with events: Include feature flag information using $feature/<flag-key> properties or sendFeatureFlags so analytics can attribute results correctly.
  • Follow best practices for reliable rollouts: Use environment variables for PostHog keys, minimize code changes, prefer server-side evaluation to avoid UI flicker, and support safe fallbacks for unexpected flag values.
  • Reference-based implementation guidance: Use included reference docs for Node.js installation, adding flag checks, and best practices.

Quick Start

Use the feature-flags-nodejs skill to add PostHog feature flag evaluation to your Node.js service by installing the PostHog Node library and wiring boolean flag checks using environment-provided project tokens.

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 application?

To evaluate PostHog feature flags in Node.js, initialize the PostHog Node SDK using environment-based credentials, then check boolean or multivariate flags per distinct user ID to drive server-side behavior.

How do I capture feature flag context in PostHog events for Node.js?

You capture feature flag context in PostHog events by including `$feature/feature-flag-name` properties or by enabling the `sendFeatureFlags` option when capturing events for accurate analytics attribution.

What is the best way to safely roll out new functionality without redeploying a Node.js service?

Using PostHog feature flags for server-side gating lets you safely roll out new functionality progressively without redeploying, ensuring consistent flag evaluation and safe fallbacks for unexpected values.

Does PostHog support multivariate feature flag payloads for Node.js?

Yes, PostHog supports checking multivariate flags per distinct user in Node.js, allowing you to optionally fetch payloads to drive dynamic server-side behavior and power analytics insights.

Why should I evaluate feature flags on the server side in Node.js instead of the client?

Server-side feature flag evaluation in Node.js avoids UI flicker, minimizes code changes, and uses correct evaluation patterns with environment variables for reliable rollouts and safe fallbacks.

How do I set up the PostHog Node SDK for feature flag evaluation?

You set up the PostHog Node SDK by installing the library, initializing it with environment-provided project tokens, and wiring boolean flag checks to enable server-side gating and event attribution.