Omnibus
200 skills · 1230 min
Omnibus
Skill 77 of 200
Add PostHog feature flags to gate new functionality. Use after implementing features or reviewing PRs to ensure safe rollouts with feature flag controls.
3 minutes · 703 words · 4 sections
Install
npx skills add PostHog/skills --skill instrument-feature-flagsnpx skills add PostHog/skills/plugin marketplace add PostHog/skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Use this skill to add PostHog feature flags that gate new or changed functionality. Use it after implementing features or reviewing PRs to ensure safe rollouts with feature flag controls. If PostHog is not yet installed, this skill also covers initial SDK setup. Supports any platform or language.
Supported platforms: React, Next.js, React Native, Web (JavaScript), Node.js, Python, PHP, Ruby, Go, Java, Rust, .NET, Elixir, Android, iOS, Flutter, and the REST API.
Follow these steps IN ORDER:
Look for lockfiles (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb, go.sum, pubspec.lock, Podfile.lock, Package.resolved, mix.lock) to determine the package manager.
STEP 2: Research instrumentation. (Skip if PostHog is already set up.) 2.1. Find the reference file below that matches the detected platform — it is the source of truth for SDK initialization, flag evaluation methods, and framework-specific patterns. Read it now. 2.2. If no reference matches, fall back to your general knowledge and web search. Use posthog.com/docs as the primary search source.
STEP 3: Create or find the feature flag.
STEP 4: Plan release conditions.
STEP 5: Instrument the feature.
STEP 6: Set up environment variables.
.env, .env.local, or framework-specific env files). If valid values already exist, skip this step.projects-get tool to retrieve the project’s api_token. If multiple projects are returned, ask the user which project to use. If the MCP server is not connected or not authenticated, ask the user for their PostHog project token instead.projects-get MCP response for a region field — US maps to https://us.i.posthog.com, EU maps to https://eu.i.posthog.com. If the region is not available from the MCP response or from existing project configuration, ask the user: “Are you on PostHog US Cloud or EU Cloud?” Do not assume US Cloud.references/react.md - React feature flags installationreferences/react-native.md - React native feature flags installationreferences/web.md - Web feature flags installationreferences/nodejs.md - Node.js feature flags installationreferences/python.md - Python feature flags installationreferences/django.md - Djangoreferences/flask.md - Flaskreferences/php.md - Php feature flags installationreferences/laravel.md - Laravelreferences/ruby.md - Ruby feature flags installationreferences/ruby-on-rails.md - Ruby on railsreferences/go.md - Go feature flags installationreferences/java.md - Java feature flags installationreferences/rust.md - Rust feature flags installationreferences/dotnet.md - .net feature flags installationreferences/dotnet.md - .netreferences/elixir.md - Elixir feature flags installationreferences/android.md - Android feature flags installationreferences/ios.md - Ios feature flags installationreferences/usage.md - Ios SDK usagereferences/flutter.md - Flutter feature flags installationreferences/api.md - API feature flags installationreferences/next-js.md - Next.jsreferences/adding-feature-flag-code.md - Adding feature flag codereferences/best-practices.md - Best practices for production-ready flagsreferences/COMMANDMENTS.md - Framework-specific rules the integration must followEach platform reference contains SDK-specific installation, flag evaluation, and code examples. Find the one matching the user’s stack. If unlisted, use the API reference as a fallback.
Add PostHog feature flags to gate new functionality. Use after implementing features or reviewing PRs to ensure safe rollouts with feature flag controls. Also handles initial PostHog SDK setup if not yet installed.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: skills/omnibus/*/SKILL.md, skills/posthog/all/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by PostHog, declaring 6 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./PostHog/skills.md, and each skill at its own .md URL.25 files · 317 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 77.
Documentation the agent loads on demand, rather than up front.