gb-setup
gb-setup
One-skill onboarding for GrowthBook Agent Skills. Walks the user through GB_API_KEY plus GB_API_URL and GB_APP_URL for self-hosted. Validates the credentials and trusted app origin, then writes ~/.config/growthbook/.env with chmod 600.
The API key is a Personal Access Token (PAT) tied to a GrowthBook user, so the API attributes any flags or experiments the write skills create to that user automatically — there's no separate owner identifier to configure.
gb-call reads this file when the corresponding environment variables aren't set, so the user gets a one-time config rather than editing their shell rc. Real environment variables always win over the file — useful for CI and one-off overrides.
Resolve the bundled helper for the current client before using it: under the Claude Code plugin it is ${CLAUDE_PLUGIN_ROOT}/scripts/gb-call; under a standalone Agent Skills install it is scripts/gb-call relative to this skill directory. Substitute that resolved command for <gb-call> below.
Workflow
-
Detect current state. Check what's already configured. Don't ask the user for values they already have unless they want to change them.
test -f ~/.config/growthbook/.env && echo "exists" || echo "missing"If the file exists, read it with the Read tool, parse the
KEY=valuelines, and surface a masked summary: