Feature flags let you turn parts of your React app on or off without changing code. They help you test new features safely before releasing them to everyone. This guide shows how to add, check, and debug feature flags in React.
You will learn about @gate pragmas for skipping tests when a flag is off. The gate() inline function lets you run different test code based on the flag value. You can also use __VARIANT__ to simulate flags that change behavior.
Common mistakes include forgetting to add flags to all file forks or using the wrong gate syntax. The /flags command helps you compare flag values across different channels.
Global
mkdir -p ~/.claude/skills/feature-flagsProject
mkdir -p .claude/skills/feature-flagsSource Repository
Grill Memattpocock/skills
Stress-test your plan with relentless questions until we both understand
Tddmattpocock/skills
Write one test at a time then code to make it pass
Test Driven Developmentobra/superpowers
Write a failing test first then code just enough to pass
Qamattpocock/skills
Turn bug reports into GitHub issues through natural conversation without technical fuss
Migrate To Shoehornmattpocock/skills
Replace unsafe as assertions with type-safe partial test data easily
Webapp Testinganthropics/skills
Test your local web apps quickly with Playwright automation and screenshots
Playwright Best Practicescurrents-dev/playwright-best-practices-skill
Master Playwright testing with best practices for reliable and fast tests
Google Agents Cli Evalgoogle/agents-cli
Run evaluations on your AI agent, find failures, and improve its quality step by step