From B Pipeline
Crea un git worktree aislado para una branch. Usar cuando el usuario pida un worktree o un workspace aislado para trabajar. Requiere el nombre del worktree como argumento.
How this skill is triggered — by the user, by Claude, or both
Slash command
/b-pipeline:b1-add-worktreeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create an isolated git worktree for feature development with symlinks to shared resources and a new terminal session.
Create an isolated git worktree for feature development with symlinks to shared resources and a new terminal session.
$ARGUMENTS
Skill
context: fork: el subagente solo ve esteSKILL.md. El placeholder$ARGUMENTSes la ÚNICA vía por la que el nombre del worktree tipeado llega al fork — el harness lo sustituye.
Parse the name: Extract the worktree name from the argument. Si $ARGUMENTS llega vacío o sin sustituir (el placeholder literal no cuenta como nombre), pedir el nombre al usuario.
The name is used as-is for the branch (including any prefix like feat/, fix/, chore/). The folder under worktrees/ uses only the segment after the final /, so the worktrees directory stays flat.
Examples:
feat/83-crm-fase-1-schema → branch feat/83-crm-fase-1-schema, folder worktrees/83-crm-fase-1-schemafix/timezone-bug → branch fix/timezone-bug, folder worktrees/timezone-bugmi-feature → branch mi-feature, folder worktrees/mi-featureConfirm the branch name: Show the user the exact branch name and folder path that will be created, and ask them to confirm (or suggest a prefix like feat//fix/ if the provided name has none and it seems appropriate).
Ask the base branch: Ask the user:
Create worktree from current branch (
<current-branch>) or from la rama default? (la resuelve el script víabp_default_branch)
En los pasos siguientes, <plugin-root> es la raíz del plugin. Resolverla portable como "${CLAUDE_PLUGIN_ROOT:-$(cat "$HOME/.claude/b-pipeline.root" 2>/dev/null || ls -d "$HOME"/.claude/plugins/marketplaces/b-pipeline* 2>/dev/null | head -1)}" — funciona con el plugin instalado vía Claude Code marketplace o en el dev location. <skill-dir> es <plugin-root>/skills/b1-add-worktree.
Ensure clean working tree: Before running the script, run bash <skill-dir>/scripts/assert-clean.sh . --fix en el repo padre y actuar según exit code: 0 = continuar; 6 = código sin commitear — commitear primero (pedir confirmación al usuario); 7 = artefactos persistentes — revisarlos a mano con el usuario antes de seguir.
Env-check runtimes + DB — MANDATORY: Before creating the worktree, verify the environment blockers that make setup-worktree.sh fail late (missing pnpm/node, DB unreachable). Run only the runtime and DB checks of b7's env-check (via B_ENV_CHECKS=bin,db); it emits one B_ENV name=<check> status=ok|fail|warn hint=<action> line per check and exits 19 if any hard check fails. If it exits non-zero, stop and report — do not attempt the worktree.
B_ENV_CHECKS=bin,db bash "<plugin-root>/skills/b7-issue-to-pr/scripts/guardrails.sh" env-check
Run the script — MANDATORY: You MUST invoke setup-worktree.sh exactly as shown. Do NOT call git worktree add directly, do NOT recreate the steps inline, do NOT skip ahead by symlinking .env or running pnpm install yourself. El script aprovisiona todo lo que el worktree necesita para quedar "ready for dev/test"; el detalle vive solo en el script.
bash <skill-dir>/scripts/setup-worktree.sh "<worktree-name>"
Sin base-branch, el script resuelve la rama default vía bp_default_branch. Si el usuario eligió otra base (ej. la rama actual), pasarla como segundo argumento: bash <skill-dir>/scripts/setup-worktree.sh "<worktree-name>" "<base-branch>".
Si el usuario pide no abrir una ventana de Terminal, agregar --headless al comando.
If the script fails, report the failure to the user and stop. Do not work around it by running pieces manually — the failure usually points to real state that needs human attention (dirty tree, branch already exists, port detection failure).
Report the result: Relatar al usuario el resumen final que imprime el script: path, branch, puerto dev y la instrucción de correr ./dev.sh.
npx claudepluginhub jporre/sveltekit-verticalslices --plugin b-pipelineGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.