# feature-flags

> Claude/Codex skill by [@facebook](https://omgskills.com/library/facebook/index.md) · 248k stars · Updated 2026-08-28

Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.

Tags: declarative, frontend, javascript, library, react, ui

## Install

```sh
git clone https://github.com/react/react /tmp/react && ln -s /tmp/react/.claude/skills/feature-flags ~/.claude/skills/feature-flags
```

## From README

React Feature Flags Flag Files | File | Purpose | |------|---------| | packages/shared/ReactFeatureFlags.js | Default flags (canary), EXPERIMENTAL overrides | | packages/shared/forks/ReactFeatureFlags.www.js | www channel, VARIANT overrides | | packages/shared/forks/ReactFeatureFlags.native-fb.js | React Native, VARIANT overrides | | packages/shared/forks/ReactFeatureFlags.test-renderer.js | Test renderer | Gating Tests @gate pragma (test-level) Use when the feature is completely unavailable without the flag: gate() inline (assertion-level) Use when the feature exists but behavior differs based on flag: Adding a New Flag Add to ReactFeatureFlags.js with default value Add to each fork file (.www.js, .native-fb.js, etc.) If it should vary in www/RN, set to VARIANT in the fork file Gate tests with @gate flagName or inline gate() Checking Flag States Use /flags to view states across channels. See the flags skill for full command options.

## Links

- HTML page: https://omgskills.com/skills/facebook/react/feature-flags/
- GitHub: https://github.com/facebook/react
- Author: [@facebook](https://omgskills.com/library/facebook/index.md)

## More from this repo

- [extract-errors](https://omgskills.com/skills/facebook/react/extract-errors/index.md) — Used when adding new error messages to React, or seeing "unknown error code" warnings.
   - [@facebook](https://omgskills.com/library/facebook/index.md) · 250k stars
- [flags](https://omgskills.com/skills/facebook/react/flags/index.md) — Used when you need to check feature flag states, compare channels, or debug why a feature behaves differently across...
   - [@facebook](https://omgskills.com/library/facebook/index.md) · 248k stars
- [flow](https://omgskills.com/skills/facebook/react/flow/index.md) — Used when you need to run Flow type checking, or when seeing Flow type errors in React code.
   - [@facebook](https://omgskills.com/library/facebook/index.md) · 248k stars
