Claude Code Feature Flags Skill for React Channel Tests
Trace a React flag across the shared configuration and channel forks, then decide how to test the feature. This is useful when a component test behaves differently on canary and www.
中文Install in Claude Code
Use Claude Code in the React checkout that contains the pinned skill. Follow the checkout's contribution instructions to prepare its development dependencies before running tests.
- Open the pinned React checkout and confirm `.claude/skills/feature-flags/SKILL.md` is present. Keep the sibling `flags` and `test` skills for channel-specific checks.
- Start Claude Code in the React repository root and call `/feature-flags` with the failing test, the affected channel, and the expected output.
Example task
Suppose `enableDraftBadge` displays Draft when enabled and empty text otherwise. Ask `/feature-flags` to compare the canary and www values, propose both assertions for the component test, and identify the www variants to cover.What to check
The answer should identify the shared and www configuration files, show the two expected strings, and list both true and false runs if the flag uses `__VARIANT__`. Use actual test output to confirm the change.
Original SKILL.md on GitHub · Updated
Frequently asked question
How do I choose between `@gate` and `gate()`?
Use the `@gate` pragma when the entire test is unavailable with the feature disabled. Use inline `gate()` when both flag states have expected behavior worth testing.