一键导入
create-feature-toggle
Add a new feature toggle backed by Firebase Remote Config. Use when the user asks to create a new feature toggle.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a new feature toggle backed by Firebase Remote Config. Use when the user asks to create a new feature toggle.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | create-feature-toggle |
| description | Add a new feature toggle backed by Firebase Remote Config. Use when the user asks to create a new feature toggle. |
Ask the user for:
true or falseThe remote config key will be derived as enable_<snake_case_name> and the toggle spec name as is<PascalCaseName>Enabled.
src/modules/remote-config/remote-config.ts)Add the new key to the RemoteConfig type (keep alphabetical order among enable_* keys):
enable_<name>: boolean;
src/modules/remote-config/remote-config.ts)Add to defaultRemoteConfig (keep alphabetical order):
enable_<name>: <default_value>,
src/modules/remote-config/remote-config.ts)In the getConfig() function, add a variable that reads the value with fallback to default (keep alphabetical order among similar declarations):
const enable_<name> =
values['enable_<name>']?.asBoolean() ??
defaultRemoteConfig.enable_<name>;
Then add enable_<name> to the returned object in getConfig() (keep alphabetical order).
src/modules/feature-toggles/toggle-specifications.ts)Add a new entry to the toggleSpecifications array (keep alphabetical order):
{
name: 'is<PascalCaseName>Enabled',
remoteConfigKey: 'enable_<name>',
},
Run yarn tsc to check for type errors, then run yarn prettier --write on changed files followed by yarn prettier to verify formatting.