ClaudeSuperPower

flag-prerequisites

Skill

Add, remove, or inspect feature-level prerequisites on a GrowthBook feature flag. Use when the user says "gate flag X on flag Y being enabled", "add a prerequisite", "flag X should only evaluate if flag Y is on", "remove the prerequisite on flag X", "what does this flag depend on", or "this flag sho

Install

git clone https://github.com/growthbook/skills.git ~/.claude/skills/flag-prerequisites

What is flag-prerequisites?

Add, remove, or inspect feature-level prerequisites on a GrowthBook feature flag. Use when the user says "gate flag X on flag Y being enabled", "add a prerequisite", "flag X should only evaluate if flag Y is on", "remove the prerequisite on flag X", "what does this flag depend on", or "this flag should require the new-checkout flag to be true first". Feature-level prerequisites gate the entire flag — when the prerequisite flag is off, this flag returns its default value for every user. The prerequisite must be a boolean flag. For prerequisites scoped to a single rule (not the whole flag), use flag-targeting. For tracing the full dependency graph, use flag-graph.

What this can do

Capabilities declared in this component's own frontmatter — not inferred.

Run shell commands

Declares Bash

~168 tokens of context used while enabled, before you invoke anything

All declared tools (1)
Bash

Documentation

README · ~3 min read

flag-prerequisites

Add, remove, or inspect feature-level prerequisites on a GrowthBook feature flag. A feature-level prerequisite is a boolean gate: if the specified prerequisite flag is off for a user, the current flag skips all its rules and returns its defaultValue for that user.

Feature-level prerequisites are boolean-flag-only. The prerequisite flag must have valueType: "boolean". The gate condition is always "prerequisite flag is on" ({"value": true}) — no custom conditions. If the user wants a more nuanced dependency (e.g. gate on a string flag's value, or gate a single rule rather than the whole flag), route to flag-targeting.

This is distinct from rule-level prerequisites (which gate a single rule and support richer conditions) — feature-level prerequisites apply to every rule on the flag simultaneously.

All API calls go through the bundled helper: ${CLAUDE_PLUGIN_ROOT}/scripts/gb-call. It needs GB_API_KEY set in env or written to ~/.config/growthbook/.env by /growthbook:gb-setup.

Workflow

Path A — Add a prerequisite

  1. Fetch the flag's current prerequisites:
    gb-call GET /api/v2/features/<flag-id>
    

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just skills.

Skillssimilar to this one

All skills