Skip to main content
skill CX Codex

feature-flags-nodejs skill for Claude Code

The feature-flags-nodejs skill helps add PostHog feature flags to Node.js applications. Use it when new behavior needs controlled server-side rollout.

MIT 113 installs ★ 80 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add PostHog/skills --skill feature-flags-nodejs -a claude-code
Open on GitHub

What feature-flags-nodejs does

The skill guides an agent through adding PostHog feature flags beside existing Node.js logic. Its reference material covers Node.js setup, adding flag checks, and flag-handling practices in references/nodejs.md, references/adding-feature-flag-code.md, and references/best-practices.md.

It recommends boolean checks unless a multivariate flag is requested, with server-side evaluation preferred to avoid UI flicker. PostHog keys must come from environment variables rather than hardcoded values. When a PostHog MCP server is connected, the skill can use its tools to create, list, update, or delete flags.

What it helps with

  • add a PostHog flag to a Node.js application
  • gate new behavior beside existing code
  • evaluate a boolean flag on the server
  • read PostHog keys from environment variables
  • manage flags through a PostHog MCP server

Example prompts for the agent

  • Add a boolean PostHog flag beside the existing logic in this Node.js application.
  • Show how to evaluate this feature flag on the server without restructuring the current code.
  • If a PostHog MCP server is connected, create and configure the required flag with its tools.

How to install feature-flags-nodejs

1Skills CLI (Vercel)

npx skills add PostHog/skills --skill feature-flags-nodejs -a claude-code

2Manually: put the files in place

~/.claude/skills/feature-flags-nodejs/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/feature-flags-nodejs/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about feature-flags-nodejs

How do I install feature-flags-nodejs in Claude Code?

Run npx skills add PostHog/skills --skill feature-flags-nodejs -a claude-code, then check ~/.claude/skills/feature-flags-nodejs/SKILL.md.

What does feature-flags-nodejs do?

It guides changes that add PostHog feature flags to Node.js applications. The skill favors small additions beside existing logic and server-side flag evaluation.

What flag type does the skill use by default?

It recommends boolean checks unless the request specifically calls for multivariate flags. PostHog keys should be supplied through environment variables.

Source text

SKILL.md · MIT
---
name: feature-flags-nodejs
description: PostHog feature flags for Node.js applications
metadata:
  author: PostHog
  version: 1.9.4
---

# PostHog feature flags for Node.js

This skill helps you add PostHog feature flags to Node.js applications.

## Reference files

- `references/nodejs.md` - Node.js feature flags installation - docs
- `references/adding-feature-flag-code.md` - Adding feature flag code - docs
- `references/best-practices.md` - Feature flag best practices - docs

Consult the documentation for API details and framework-specific patterns.

## Key principles

- **Environment variables**: Always use environment variables for PostHog keys. Never hardcode them.
- **Minimal changes**: Add feature flag code alongside existing logic. Don't replace or restructure existing code.
- **Boolean flags first**: Default to boolean flag checks unless the user specifically asks for multivariate flags.
- **Server-side when possible**: Prefer server-side flag evaluation to avoid UI flicker.

## PostHog MCP tools

Check if a PostHog MCP server is connected. If available, look for tools related to feature flag management (creating, listing, updating, deleting flags). Use these tools to manage flags directly in PostHog rather than requiring the user to do it manually in the dashboard.

## Framework guidelines

_No specific framework guidelines._

© PostHog · MIT · PostHog/skills

Similar skills

All skills for Backend and APIs →

From the same set112

The whole set →
experiment-audit The experiment-audit Claude Code skill checks a PostHog experiment's setup, variant data, attribution, and metrics. It runs on requests to review or validate an A/B test. CX Codex +1 118installs error-tracking-web error-tracking-web adds PostHog error tracking to a JavaScript web app: exception capture, source maps, alerts and issue triage, with the agent editing your code. CX Codex +1 116installs monthly-to-annual The monthly-to-annual Claude Code skill evaluates a PostHog customer’s move from monthly billing to an annual prepaid credit plan. It produces a discount briefing and a plain-text Slack draft. CX Codex +1 115installs feature-flags-web The feature-flags-web skill helps add PostHog feature flags to JavaScript web apps. Use it for boolean checks, server-side evaluation, and flag management through MCP. CX Codex +1 114installs integration-expo The integration-expo skill adds PostHog analytics to Expo apps and guides the setup in stages. Use it for events, user identification, screens, and errors. CX Codex +1 112installs feature-flags-ios feature-flags-ios adds PostHog feature flags to iOS apps, manages SPM dependencies cleanly, and enforces environment variable handling in Xcode. CX Codex +1 112installs feature-flags-react feature-flags-react adds PostHog feature flag checks to a React app and keeps them clear of the code that already works. CX Codex +1 112installs feature-flags-api The feature-flags-api skill guides agents through adding PostHog feature flag checks to API applications. Use it when you want to introduce flags without restructuring existing code. CX Codex +1 111installs

Project sponsors

Companies that keep this analytics open