feature-flags-nextjs

Official

PostHog feature flags for Next.js apps

AuthorPostHog
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Enable Next.js applications to reliably manage and evaluate PostHog feature flags across client and server environments.

Core Features & Use Cases

  • Server-side flag evaluation and bootstrapping for Next.js pages and app router.
  • Guidance for initializing PostHog in Next.js (instrumentation-client.ts/js) and preventing UI flicker through pre-render flag values.
  • Framework-specific guidance for Next.js 15.3+ server components using posthog-node and server-side flag propagation to the client.

Quick Start

Install PostHog, configure environment, and ensure flag evaluation happens before rendering to avoid flicker.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: feature-flags-nextjs
Download link: https://github.com/PostHog/skills/archive/main.zip#feature-flags-nextjs

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.