cross-worktree-spec-handoff-via-checkout-paths

Transfers committed files between parallel git worktrees using checkout path restoration.

3|Updated May 8, 2026
One-click install
npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill cross-worktree-spec-handoff-via-checkout-paths-wan-huiyan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cross-worktree-spec-handoff-via-checkout-paths
Source: https://github.com/wan-huiyan/agent-traffic-control/tree/main/plugins/agent-traffic-control/skills/cross-worktree-spec-handoff-via-checkout-paths
Command: npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill cross-worktree-spec-handoff-via-checkout-paths-wan-huiyan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When two Claude Code sessions run in parallel worktrees of the same repo, a consumer session on a fresh branch cannot see design specs, handoff prompts, or mockups committed by a producer session on another branch, and reports "the file doesn't exist." Merging to main first requires a slow PR review cycle. ## Core Features & Use Cases - Cross-branch file transfer: Uses git checkout <branch> -- <paths> to stage files from a producer branch into the consumer's working tree without switching branches or merging. - Read-only diagnostics: Locates which branch and commit introduced a missing file via git log --all --diff-filter=A and git branch --contains, then reads it with git show <branch>:<path>. - Clean PR extraction: Spins up a throwaway worktree off origin/main to pull a mergeable subset out of a shared or DO-NOT-MERGE branch without disturbing a parallel session. - Use Case: Session B's frontend pass fails because the design spec lives on session A's worktree branch; run the checkout-path command to stage the spec, mockups, and a .gitignore exception, then commit them on B's branch. ## Quick Start Ask the agent to pull the missing design spec files from the producer session's branch into the current worktree using git checkout with path arguments, then commit them on the current branch.

Frequently Asked Questions about cross-worktree-spec-handoff-via-checkout-paths

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I copy files from another git branch without merging?▼

Use git checkout <branch> -- <paths> to pull specific files or directories from another branch into your working tree. It stages the changes without switching branches, creating merge commits, or touching any other files.

How do I find which branch contains a missing file in git?▼

Run git log --all --oneline --diff-filter=A -- <path> to find commits that introduced the file, then git branch -a --contains <commit> to list branches holding it. Read the content directly with git show <branch>:<path> without modifying your working tree.

Does git checkout from another branch work across worktrees without pushing?▼

Yes. Worktrees of the same repository share a single .git directory, so local-only branches are visible to every worktree. You can checkout paths from a producer branch without pushing it to origin first.

Why does git log return empty for a file I know is committed?▼

The pathspec in git log -- <path> resolves relative to your current directory, so a repo-root-relative path queried from a subdirectory matches nothing. Use git -C <repo-root> log, or grep the repo-root-relative output of git log --all --name-only.

How do I open a clean PR from a branch shared with another session?▼

Create a throwaway worktree off origin/main with git worktree add, then checkout only the safe file subset from the shared branch into it. Commit, push, and open the PR from the throwaway branch so the parallel session's worktree is never disturbed.

What happens when the transferred file is gitignored?▼

The checkout still brings the bytes into the working tree, but the file appears as a staged add despite being ignored. Run git check-ignore -v to find the rule, add a scoped exception like !docs/plans/**/*.html to .gitignore, and commit it with the files.