بنقرة واحدة
bip-epic-handoff
Worker self-spawns a follow-up issue and hands off to a new slot
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Worker self-spawns a follow-up issue and hands off to a new slot
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Check remote server CPU, memory, and GPU availability via SSH
Cold-start into a worktree/clone from a fresh conversation — read the PR, issue, and any status files, figure out where things stand, then STOP and ask the user what to do next. Use for a fresh conversation dropped into a bip-spawn or bip-epic-spawn worktree/clone that already has history (a PR, an in-progress phase, or a stalled worker).
Quick poll of tracked EPICs and code repos for new manuscript-relevant results
Persist manuscript session state before context reset
Cold-start for a manuscript session — the paper is the source of truth and shared context; discuss results, orchestrate research through issues/PRs, and update the paper as threads complete
Spawn a Claude session in a clone for an EPIC issue
| name | bip-epic-handoff |
| description | Worker self-spawns a follow-up issue and hands off to a new slot |
Hand off work from a finishing worker session to a new slot. Run this from a worker (not the conductor) when your current issue is done and you know what should happen next.
Do not run this skill until you have a clear next direction.
If you have just finished an issue and are unsure what comes next:
This skill is for execution, not ideation. The thinking happens before you invoke it.
/bip-epic-handoff [issue-number]
/bip-issue-next first to create the follow-up issueBefore handing off, verify:
.epic-status.json phase is completed or quality-gateIf not, finish the current work first.
If no issue number was provided:
/bip-issue-next
This drafts and creates the follow-up issue. Record the new issue
number as <N>.
Add the new issue to the EPIC dashboard so the conductor sees it.
Follow the EPIC body update pattern from /bip-epic:
updatedAt)If the conflict check fails, report it and continue — the conductor will reconcile on next poll.
Read .epic-config.json from the repo root.
Finding the config: In clone mode, .epic-config.json is in each
clone's repo root. In worktree mode, it's in the main checkout
(the conductor's working directory, not the worktree). To find it:
# Worktree mode: find the main checkout
MAIN_CHECKOUT=$(git worktree list | head -1 | awk '{print $1}')
cat "$MAIN_CHECKOUT/.epic-config.json"
Then select or create a slot:
Clone mode (local_worktrees absent or false):
CLONE_ROOT=$(jq -r .clone_root .epic-config.json)
# Find an idle clone (on main, clean worktree)
for name in $(jq -r '.clone_names[]' .epic-config.json); do
branch=$(git -C "$CLONE_ROOT/$name" branch --show-current 2>/dev/null)
[ "$branch" = "main" ] && echo "$name"
done
Pick the first idle clone that is not the current clone. The
handoff should move work to a different slot so the current session
can wind down cleanly. If all other clones are busy, use the current
clone as a last resort (after confirming with the user). If all clones
including current are busy, offer to create a new clone using a name
from new_clone_names in the config.
Worktree mode (local_worktrees: true):
CLONE_ROOT=$(jq -r .clone_root "$MAIN_CHECKOUT/.epic-config.json")
SLOT="$CLONE_ROOT/issue-<N>"
SLUG=$(gh issue view <N> --json title -q '.title' | tr '[:upper:]' '[:lower:]' | awk '{for(i=1;i<=4&&i<=NF;i++) printf "%s%s",$i,(i<4&&i<NF?"-":"")}')
if [ -d "$SLOT" ]; then
echo "Worktree exists — will resume"
else
# Clean up leftover branches from previous attempts
git -C "$MAIN_CHECKOUT" branch --list "<N>-*" | tr -d ' ' | xargs -r git -C "$MAIN_CHECKOUT" branch -D
# Create worktree from the main checkout
git -C "$MAIN_CHECKOUT" worktree add "$SLOT" -b "<N>-$SLUG"
fi
Clone mode:
SLUG=$(gh issue view <N> --json title -q '.title' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9 ]//g' | awk '{for(i=1;i<=4&&i<=NF;i++) printf "%s%s",$i,(i<4&&i<NF?"-":"")}')
cd "$CLONE_ROOT/<clone-name>"
git checkout main && git pull --ff-only origin main
git checkout -b "<N>-$SLUG"
rm -f .epic-status.json .epic-worklog.md
The branch must be created before spawning. If the spawn starts
on main, any uncommitted work lands on main and is hard to rescue.
Worktree mode — just clear stale status files:
rm -f "$SLOT/.epic-status.json" "$SLOT/.epic-worklog.md"
Follow /bip-epic-spawn Steps 3-4 to compose the prompt:
gh issue view <N>IMPORTANT: Before doing any work, verify you are on branch <N>-<slug> (run "git branch --show-current"). If you are on main, run "git checkout -b <N>-<slug>" first. Never commit directly to main./bip-issue-work <N> as the core instruction.epic-status.json fields, worklog format)/tmp/spawn-<N>.txt with the
full prompt (do NOT use shell redirection — complex prompts break
zsh expansion)Then launch with the correct flags for your mode:
CLONE_ROOT=$(jq -r .clone_root .epic-config.json)
# Clone mode: --name is NNN-clone (e.g. "281-cedar")
bip spawn --prompt-file /tmp/spawn-<N>.txt \
--dir "$CLONE_ROOT/<clone-name>" \
--name "<N>-<clone-name>"
# Worktree mode: --name is NNN-issue-NNN (e.g. "281-issue-281")
bip spawn --prompt-file /tmp/spawn-<N>.txt \
--dir "$CLONE_ROOT/issue-<N>" \
--name "<N>-issue-<N>"
IMPORTANT: Always use --prompt-file, never --prompt "$(cat ...)".
Always use --dir and --name — without them the tmux window gets
a wrong name and the session runs in the wrong directory.
Do NOT use raw tmux new-window / tmux send-keys / claude.
Always go through bip spawn.
If the current issue's PR is merged:
git checkout main && git pull --ff-onlyDon't force-remove your own worktree while you're in it — just let the conductor handle cleanup.
## Handoff Complete
- Finished: i<current> — <title>
- Spawned: i<N> — <title> → <slot-name>
- EPIC updated: i<epic-number> ✓ (or ✗ conflict, conductor will reconcile)
Same as /bip-epic: iN/pN prefixes, full URLs on first mention.
Tmux windows named NNN-YYY where NNN is the issue number and YYY is the
clone/slot name (e.g. 281-cedar in clone mode, 281-issue-281 in worktree mode).
.epic-config.json keeps working. The newer global layout: block in
~/.config/bip/config.yml configures worktree mode for non-EPIC bip spawn; see docs/guides/layout.md.