/bitfab:setup [wizard|explain|login|session-logs|instrument|modify|inspect|switch-org|replay|cloud|db-snapshot|templates|analyze-repo] [what to do]from bitfab
Set 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)
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.
Always use AskUserQuestion when asking questions or presenting choices (one exception: a step that explicitly says its answer is free-form, such as asking which file or function to instrument once the user has said they know, asks in plain chat and waits, because a menu there would stand between the user and the answer only they hold). Never print a question as text and wait. Rules:
Execution style (applies to every phase). Default to terse, action-first turns:
;, not && (a no-match grep exits non-zero and would abort an && chain, skipping later probes)), and read multiple files in a single batch rather than one file per turn. Adaptive follow-up greps that depend on a prior result are expected and fine; the goal is to collapse only the fixed, independent probes.This skill has twelve phases: explain, login, session-logs, instrument, modify, inspect, switch-org, replay, db-snapshot, templates, analyze-repo, and cloud. The cloud mode configures direct GitHub Actions replay without Bitfab login or a repository connection. Run individually or through setup (wizard runs login → instrument; explain is a standalone read-only overview that requires no login; session-logs is standalone and does not require login; modify is only invoked explicitly or as a branch from Instrument's existing-SDK-usage menu; inspect is a standalone diagnostic (with optional one-shot fixes) invoked explicitly; switch-org is a standalone account action (requires auth) invoked explicitly; db-snapshot is only invoked explicitly; templates is only invoked explicitly; analyze-repo is a standalone, non-interactive batch action (requires auth) invoked explicitly: it scans, picks the top few candidates, and reports source locations and replay dependencies, asking nothing and editing no code).
Natural-language aliases: "set up cloud replay" / "replay on GitHub" → cloud; "explain Bitfab" → explain; "trace a new workflow" / "instrument another function" → instrument; "adjust what is captured" / "re-instrument" → modify; "why are my traces missing" → inspect; "switch org" → switch-org; "set up database snapshots" → db-snapshot; "analyze the repo" → analyze-repo (read-only source recommendations).
When instrumenting a workflow, its instrumentation and replay pipeline are written together in the same cycle after the workflow is selected (see Instrument's write-instrumentation step). The standalone replay mode remains available for coverage-verification and backfill.
Preserve the project's capture opt-out. When initialization sets captureEnabled: false / capture_enabled=False, keep framework handlers, processors, callbacks, middleware, and wrappers installed so the application continues to run normally, but verify that ordinary execution produces no client-owned records, including local BAML calls. Replay and seed modes are explicit recording operations and continue to produce records. Never "fix" an opt-out by removing an integration or preventing the wrapped framework call from running.
SDK reference: https://docs.bitfab.ai is the source of truth for SDK install, initialization, API surface, and replay. Every docs path below ends in .md: that suffix returns the page as plain markdown (no HTML chrome), so fetch the URLs exactly as written. Fetch in this order before writing any code, do not improvise from memory:
/reference/typescript.md, /reference/python.md, /reference/ruby.md, /reference/go.md. These list every public export, signature, type, default, and error semantic, no tutorials, no prose. Read these first.withTrace/trace root records only itself, so a replay records and mocks nothing beneath the root and runs every read and write there for real. Wire the matching @bitfab/sdk/transform build adapter included with the SDK without being asked, then use withTrace/trace for the workflow root and withNode/node only where a discovered call needs naming, typing, capture, finalization, or replay-mocking policy. For Python 3.12+, use @client.trace and @client.node the same way. Opt-in withSpan/span remains supported, but setup chooses it only when opt-out is technically impossible: Ruby, Go, Python before 3.12, a TypeScript build path for which the documented transform adapters truly cannot be wired, or a live streaming root whose output opt-out tracing cannot finalize without changing behavior. Framework handlers, processors, and their generated spans are compatible descendants of an opt-out root and are never by themselves a reason to choose spans. Keep the framework integration and use withNode/node for first-party calls that need explicit policy. Existing manual spans in the selected call stack are also not a reason to fall back. Convert that whole call stack to one opt-out surface. Before converting a span-bearing helper in place, inspect every production caller and confirm each caller belongs to the same opt-out surface; a helper shared with an opt-in caller requires a disjoint trace boundary or explicit refactor confirmation. Remove redundant span wrappers and replace policy-bearing spans with nodes. Preserve their names, types, capture controls, finalizers, and replay-mocking behavior. TypeScript withNode requires a named function, so preserve an existing name or use an additive named function form; stop for refactor confirmation if naming it would require a non-additive rewrite. Never put withSpan beneath withTrace. The SDK raises MixedTracingError. Name all three primitives when fetching a reference page so the fetched guidance cannot collapse back to spans alone./reference/overview.md (invariants), /reference/span-types.md (the SpanType enum), /reference/http.md (wire protocol)./frameworks/langgraph.md, /frameworks/deep-agents.md, /frameworks/openai-agents.md, /frameworks/claude-agent-sdk.md, /frameworks/baml.md, /frameworks/vercel-ai-sdk.md, /frameworks/pi.md, /frameworks/livekit-agents.md. Each page documents the SDK's native handler/processor/wrapper for that framework, which is usually preferable to hand-wrapping every node/agent call with withSpan/@span./typescript-sdk.md, /python-sdk.md, /ruby-sdk.md, /go-sdk.md). Use these for the copy-pasteable replay registry module and the replay output contract. During Instrument, fetch the Replay section before Instrument's write-instrumentation step so the replay registry module can be written alongside the instrumentation in the same cycle without re-fetching.MCP tools: Use the plugin tools for authentication, trace functions, trace search, organizations, database connection status, and templates as specified by each step.
Product pages: Link to the existing app pages for experiments, datasets, and other dashboard features. Use /plugin only for automatic-close login and template previews. Page commands print one JSON line with event: "link" and url, then exit. Relay the URL in chat. The user reports review decisions in chat; fetch current saved state with MCP before continuing. Never treat printing a link or closing a browser tab as approval.
CLI commands available via Bash (all paths relative to ${CLAUDE_PLUGIN_ROOT}/dist/commands/):
| Command | Description |
|---|---|
pageLink.js <path> | Print a clickable product page URL and exit. |
openExperiments.js <experimentIds> | Print a link to experiments. |
startDataset.js <key> <datasetId> | Print a dataset link. |
status.js | Check plugin authentication and connection status |
login.js | Open a sign-in window and wait for authentication. Relay the printed sign-in link as a fallback. |
switchOrg.js [<authOrganizationId>] | List the user's Bitfab orgs (no args), or switch the plugin's active org and replace the local API key (with a arg) |
startTemplatePreview.js <functionKey> | Print a template preview link and exit. |
update.js <mode> | Check plugin + SDK versions and install the latest (used by inspect to detect and fix staleness) |
| `sessionLogConsent.js [get | set true |
Read $ARGUMENTS first. If its first token is exactly one of the mode names below, run that mode. Otherwise, when this skill documents how to route the remaining arguments (see its intro), follow that; if it doesn't, run wizard and treat $ARGUMENTS as its input. Follow only the selected mode's path below.
| Mode | Trigger | What it does |
|---|---|---|
wizard | wizard (default) | Run login, then instrument workflows until the user is done. |
explain | explain | Explain what Bitfab is and what each mode does (read-only, no login). |
login | login | Authenticate for setup and instrumentation. |
session-logs | session-logs | Opt in or out of session log collection (no login required). |
instrument | instrument | Instrument AI workflows with Bitfab tracing. |
modify | modify | Modify an existing trace setup (add context, change depth, or move the root). |
inspect | inspect | Diagnose (and offer to fix) your tracing setup: auth, what's instrumented, plugin/SDK freshness, replay coverage, trace arrival. |
switch-org | switch-org | Switch which Bitfab org the plugin reads and writes (replaces the local API key). |
replay | replay | Create or update replay registry modules for instrumented workflows. |
cloud | cloud | Run your normal replay on your own GitHub Actions by adding --cloud: same options and exit code, with a short summary of the result. One workflow file in the repository; no Bitfab repository connection or GitHub CLI required. |
db-snapshot | db-snapshot | Set up per-trace database snapshots so replay runs against the DB state at trace time (TypeScript, Python, Ruby). |
templates | templates | Iterate on the span-rendering templates for one trace function. |
analyze-repo | analyze-repo | Read-only discovery: scan source, rank the top workflows to instrument, and report recommendations without creating artifacts or changing code. |
wizard or login or instrument: invoke the setup-login skill with the current mode (wizard or login or instrument), forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).explain: invoke the setup-explain skill with mode explain, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).session-logs: invoke the setup-session-logs skill with mode session-logs, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).modify: invoke the setup-modify skill with mode modify, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).inspect: invoke the setup-inspect skill with mode inspect, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).switch-org: invoke the setup-switch-org skill with mode switch-org, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).replay: invoke the setup-replay skill with mode replay, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).cloud: invoke the setup-cloud skill with mode cloud, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).db-snapshot: invoke the setup-db-snapshot skill with mode db-snapshot, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).templates: invoke the setup-templates skill with mode templates, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).analyze-repo: invoke the setup-analyze-repo skill with mode analyze-repo, forwarding $ARGUMENTS minus the leading mode keyword (if the user typed one).Read function signatures and bodies before instrumenting. Instrument the real production path. Keep additions behavior-preserving; preserve call order, argument and return types, error handling, streaming, and time-to-first-token. Use framework-native handlers/processors where documented. Keep one trace function key per coherent workflow, and implement its replay callable during the same cycle. Mock external reads and unsafe side effects using the SDK replay controls; keep model calls live. For non-additive refactors, follow the refactor-confirmation appendix. No persisted planning document or extra approval is required for authorized additive instrumentation.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub project-white-rabbit/bitfab-claude-plugin --plugin bitfabOther plugins' skills for the same job
19 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/setup-analyze-repoAnalyze Repo phase of the Bitfab Setup flow. Invoked by the setup flow; not run directly/setup-approachApproach phase of the Bitfab Setup flow. Invoked by the setup flow; not run directly