跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/facebook/react/feature-flags

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.

  1. 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.
  2. 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 2026-11-13

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.

Related skills from this repository

  • Claude Code extract-errors for React Source Error Codes
  • Claude Code React Fix Skill for Formatting and Lint Checks
  • Claude Code React Feature Flags Skill for Comparing Channels
Browse Claude Code skills in the Chinese directory
词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯