<!--
- [INPUT]: 依赖 React 源码的 flags 实现机制
- [OUTPUT]: 对外提供 flags 检查技能说明，包含跨渠道对比、清理状态分组、CSV 输出等能力
- [POS]: notes/skill/flags/ 的技能定义文档 (L3)，与 SKILL-zh.md 构成双语技能组
- [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
-->

---

name: flags description: Use when you need to check feature flag states, compare
channels, or debug why a feature behaves differently across release channels.

---

# Feature Flags

Arguments:

- $ARGUMENTS: Optional flags

## Options

| Option               | Purpose                              |
| -------------------- | ------------------------------------ |
| (none)               | Show all flags across all channels   |
| `--diff <ch1> <ch2>` | Compare flags between channels       |
| `--cleanup`          | Show flags grouped by cleanup status |
| `--csv`              | Output in CSV format                 |

## Channels

- `www`, `www-modern` - Meta internal
- `canary`, `next`, `experimental` - OSS channels
- `rn`, `rn-fb`, `rn-next` - React Native

## Legend

✅ enabled, ❌ disabled, 🧪 `__VARIANT__`, 📊 profiling-only

## Instructions

1. Run `yarn flags $ARGUMENTS`
2. Explain the output to the user
3. For --diff, highlight meaningful differences

## Common Mistakes

- **Forgetting `__VARIANT__` flags** - These are tested both ways in www; check
  both variants
- **Comparing wrong channels** - Use `--diff` to see exact differences
