No slash command · from bitfab
Switch Org phase of the Bitfab Setup flow. Invoked by the setup flow; not run directly
Ships in bitfab. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run only when mode is switch-org.
Switch which Bitfab organization the plugin reads and writes. Triggered explicitly by /bitfab:setup switch-org (or natural-language asks like "switch org" / "change org" / "switch to the org" / "I'm in the wrong org"). The plugin's org is set by the API key in ~/.config/bitfab/credentials.json; this lists the user's orgs, switches to the chosen one, and replaces that local key. Requires authentication. Does not open Bitfab.
The live browser does not follow on its own. Switching persists the new active org server-side (so future sign-ins default to it) and replaces the plugin's key, but a browser tab that's already signed in keeps showing the old org until its session is re-minted. The org actually flips in the browser on the next Bitfab open (a fresh session whose org check sets the active organization in the browser) or when the user picks the org from the in-app org switcher.
The plugin key and the app's runtime key are separate. Switching replaces only the plugin's credential in ~/.config/bitfab/credentials.json. The BITFAB_API_KEY your application reads at runtime (from a .env-style file) is untouched, so traces your code sends keep landing in the old org until that key is updated too. The last step offers to do that.
Switching orgs requires an authenticated plugin. Run the status check:
node "${CLAUDE_PLUGIN_ROOT}/dist/commands/status.js"
If already authenticated, continue to step 2. If not authenticated, tell the user to sign in first with /bitfab:setup login, then stop; do NOT run the login flow as part of switching.
Next:
switch-org): invoke the setup-cleanup skill with mode switch-org, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).Call mcp__plugin_bitfab_Bitfab__list_organizations to list the organizations the signed-in user belongs to. Each entry has a name, the user's role, an id: (the authOrganizationId), and the org the plugin uses now is marked [current].
Choose the target org:
id. If the name matches none, or matches more than one, fall through to asking.AskUserQuestion which org to switch to. List each org by name and role, and mark the current one. Use the chosen org's id.Only ever use an id value returned by mcp__plugin_bitfab_Bitfab__list_organizations; never invent one. Carry the chosen id into the next step.
Next:
switch-org): invoke the setup-cleanup skill with mode switch-org, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).Switch to the chosen org by passing its authOrganizationId:
node "${CLAUDE_PLUGIN_ROOT}/dist/commands/switchOrg.js" <authOrganizationId>
The command prints one JSON line; act on it:
{"event":"switched","status":"switched"|"already-aligned","authOrganizationId":"...","organizationName":"...","apiKey":"..."}: success. The plugin now reads and writes that org and its API key has been replaced locally. Tell the user in one line: the plugin is now connected to . Then tell them to select with the in-app org switcher to align their browser with the plugin. Opening a plugin page link does not change the browser's active organization. Hold on to the apiKey value from this JSON; the next step uses it to sync the app's local key, and you must never echo that value to the user.{"event":"not-member","authOrganizationId":"..."}: the user isn't a member of that org. Report it; do not retry.{"event":"error","reason":"..."}: report the reason.Do not print or ask for the API key, and do not surface the apiKey value to the user; the command replaces the plugin's copy for you and hands you that value solely for the next step.
{"event":"switched"} (or "already-aligned"): sync the app's local API key next → step 4{"event":"not-member"} or {"event":"error"}: the plugin key was not replaced, so there is nothing local to sync → the setup-cleanup skillNext:
{"event":"not-member"} or {"event":"error"} (mode switch-org): invoke the setup-cleanup skill with mode switch-org, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).This step is reached only when the switch reported {"event":"switched"} (or "already-aligned"); a not-member or error result already routed to cleanup with nothing to sync.
The switch replaced the plugin's key (in ~/.config/bitfab/credentials.json). It did not touch the BITFAB_API_KEY your own application reads at runtime, so traces your code sends still land in the old org until that key is updated too.
Check whether this project sets BITFAB_API_KEY locally: grep for BITFAB_API_KEY across .env-style files (.env, .env.local, .env.development, and similar) the app loads. Collect every file that assigns it, not just the first.
AskUserQuestion whether to update it to the new org's key, naming all the files (absolute paths) that hold it. If the user declines, leave them and stop.If the user agrees, use the apiKey value from the switch step's JSON output as the new key (use it directly, do not call any get_*_api_key tool here: that resolves a BITFAB_API_KEY process-env override ahead of the just-switched credential and can hand back the stale pre-switch key). Rewrite that value in place in every file you found, replacing the old value, so no loaded env file keeps a stale key. Do not print the key value. Then name each file (absolute path) you updated and note that an already-running dev server, REPL, or test runner may need a restart to pick up the new env value, since most file watchers reload code on save but not env files.
Next:
switch-org: invoke the setup-cleanup skill with mode switch-org, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub project-white-rabbit/bitfab-claude-plugin --plugin bitfab19 skills in this plugin
/assistantBitfab Assistant (retired)Retired. Only use when the user explicitly types the bitfab assistant command by name; it tells them the assistant has been retired. Never use it for requests about traces, datasets, labels, verdicts, replays, experiments, or improving a traced function: handle those directly with the Bitfab MCP tools/setupBitfab SetupSet up and maintain Bitfab tracing, replay registries, and cloud replay. Use for instrumenting AI/LLM code, adding observability or evaluation, tracing another workflow, changing captured inputs/outputs, re-instrumenting a function, moving side effects across trace boundaries, inspecting missing traces, explaining Bitfab, login, organization switching, session-log consent, database snapshots, templates, or read-only repo instrumentation recommendations (analyze-repo). Also use for 'setup cloud', 'set up cloud replay', or 'replay on GitHub'. Re-enter this skill for each additional function to instrument, even after earlier setup. Do not use for improving output quality, pass rates, verdicts (labeling), or experiments (the agent does those directly with the Bitfab MCP tools), or upgrading SDK/plugin versions (use bitfab:update)