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
npx skills add PostHog/skills --skill feature-flags-nodejs -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/feature-flags-nodejs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/feature-flags-nodejs/
1Skills CLI (Vercel)
npx skills add PostHog/skills --skill feature-flags-nodejs -a codex2Manually: put the files in place
.agents/skills/feature-flags-nodejs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/skills --skill feature-flags-nodejs -a cursor2Manually: put the files in place
.cursor/skills/feature-flags-nodejs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/skills skills/posthog/all/skills/feature-flags-nodejs2Manually: put the files in place
.github/skills/feature-flags-nodejs/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/skills --skill feature-flags-nodejs -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/skills --path skills/posthog/all/skills/feature-flags-nodejsManually: put the files in place
.devin/skills/feature-flags-nodejs/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/skills --skill feature-flags-nodejs -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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