
Feature Flags
- 1.1k installs
- 247k repo stars
- Updated July 27, 2026
- facebook/react
feature-flags is a React core skill for @gate pragmas and feature flag test maintenance.
About
The feature-flags skill guides React core contributors and framework maintainers working with React feature flag tests and @gate pragmas. It documents flag file locations, channel-specific test expectations, and procedures for adding or updating flags when tests fail across experimental channels. Agents help diagnose gate pragma mismatches, update snapshot tests, and understand which flags apply to which release channels. The skill is scoped to the facebook/react repository flag infrastructure rather than general app feature toggles. React core feature flag test debugging and updates. @gate pragma and channel-specific test failure guidance. Flag file locations and add-new-flag procedures. Scoped to facebook/react repository flag infrastructure. Helps maintainers fix experimental channel test failures. Debug and update React feature flag tests, @gate pragmas, and channel-specific flag behavior.
- React core feature flag test debugging and updates.
- @gate pragma and channel-specific test failure guidance.
- Flag file locations and add-new-flag procedures.
- Scoped to facebook/react repository flag infrastructure.
- Helps maintainers fix experimental channel test failures.
Feature Flags by the numbers
- 1,060 all-time installs (skills.sh)
- +19 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #349 of 2,277 Frontend Development skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
What feature-flags says it does
Use when feature flag tests fail, flags need updating, understanding @gate pragmas
npx skills add https://github.com/facebook/react --skill feature-flagsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.1k |
|---|---|
| repo stars | ★ 247k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | facebook/react ↗ |
Why are React feature flag tests failing for this channel or @gate pragma?
Debug and update React feature flag tests, @gate pragmas, and channel-specific flag behavior.
Who is it for?
React core contributors working on feature flags in facebook/react.
Skip if: Skip for application-level feature toggles outside React core repo.
When should I use this skill?
User debugs React feature flag tests, @gate pragmas, or channel failures.
What you get
Updated flags and tests aligned with React channel-specific expectations.
- updated flag files
- @gate-gated test updates
- channel override entries
By the numbers
- Documents 4 React feature-flag file locations across release channels
Files
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 enableViewTransition
it('supports view transitions', () => {
// This test only runs when enableViewTransition is true
// and is SKIPPED (not failed) when false
});gate() inline (assertion-level)
Use when the feature exists but behavior differs based on flag:
it('renders component', async () => {
await act(() => root.render(<App />));
if (gate(flags => flags.enableNewBehavior)) {
expect(container.textContent).toBe('new output');
} else {
expect(container.textContent).toBe('legacy output');
}
});Adding a New Flag
1. Add to ReactFeatureFlags.js with default value 2. Add to each fork file (*.www.js, *.native-fb.js, etc.) 3. If it should vary in www/RN, set to __VARIANT__ in the fork file 4. 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.
__VARIANT__ Flags (GKs)
Flags set to __VARIANT__ simulate gatekeepers - tested twice (true and false):
/test www <pattern> # __VARIANT__ = true
/test www variant false <pattern> # __VARIANT__ = falseDebugging Channel-Specific Failures
1. Run /flags --diff <channel1> <channel2> to compare values 2. Check @gate conditions - test may be gated to specific channels 3. Run /test <channel> <pattern> to isolate the failure 4. Verify flag exists in all fork files if newly added
Common Mistakes
- Forgetting both variants - Always test
wwwANDwww variant falsefor__VARIANT__flags - Using @gate for behavior differences - Use inline
gate()if both paths should run - Missing fork files - New flags must be added to ALL fork files, not just the main one
- Wrong gate syntax - It's
gate(flags => flags.name), notgate('name')
Related skills
How it compares
Use feature-flags for React monorepo channel flags and @gate tests, not for LaunchDarkly-style product feature toggles in application code.
FAQ
Which repository is this for?
The facebook/react repository feature flag system.
What is @gate?
A pragma marking tests tied to specific React feature flags and channels.
When should flags be updated?
When flag tests fail, channels change, or new flags are added to React.
Is Feature Flags safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.