← ClaudeAtlas

cross-worktree-spec-handoff-via-checkout-pathslisted

Pass design specs, handoff prompts, or any other shared artefact between two parallel Claude Code sessions that are working in different git worktrees on different branches — without merging the producing branch to main first. Use when: (1) session A produced design docs / a handoff prompt / a mockup file on branch X, (2) session B (different cwd / different worktree, on branch Y branched from main) reports "the file doesn't exist" or "I can't find the design spec you mentioned", (3) you want B unblocked NOW without a PR review cycle, (4) both worktrees are local checkouts of the same repo (share `.git`). The unblock: `git checkout <producing-branch> -- <paths>` from inside B's worktree pulls the files in as staged additions, no merge needed. Also covers the related gitignore-exception trick when the artefact files are blanket-ignored (e.g., `*.html` in a repo that produces HTML deliverables but also keeps design mockups under `docs/`). v1.1.0 (2026-05-26) adds the diagnostic-search variant: when the user say
wan-huiyan/agent-traffic-control · ★ 2 · AI & Automation · score 79
Install: claude install-skill wan-huiyan/agent-traffic-control
# Cross-worktree spec handoff via `git checkout <branch> -- <paths>` ## Problem You ran a brainstorming / design session in Claude Code session A. Output: design spec doc, a handoff prompt, a vibe mockup HTML. You committed them on branch `worktree-spec-A` in `.claude/worktrees/spec-A/`. You then started Claude Code session B in a different worktree, on a fresh branch `feat/something-B` branched from `main`. Session B is supposed to consume the design spec — but the spec doc, handoff prompt, and mockup files **don't exist** in B's working tree, because B's branch was cut from main before A's commits landed and the commits never made it to main. Session B reports: "the referenced design spec files don't exist in the handover. Let me look at what's available." → it's blocked. The naive fix is "merge A's branch into main, then B pulls main". That needs a PR review cycle. Slow. ## Context / Trigger Conditions All of: - Two (or more) Claude Code sessions are running in parallel, in **different worktrees** of the same repo. (`git worktree list` shows multiple paths.) - Session A (the producer) committed artefacts — design docs, plans, spec files, mockups, fixtures, prompts — on a branch that is **not** the base branch of session B. - Session B (the consumer) is on a branch branched from `main` (or any ancestor that predates A's commits) and cannot see A's files via `ls` or Read. - B reports a "file not found" / "doesn't exist" / "can't see the spec" symptom re