Ship a feature branch from a worktree, with awareness of other worktrees in the same parallel batch.
$ARGUMENTS should identify the target PR (e.g., "prC"). If omitted, the skill infers the PR from the current worktree's branch name and the active sprint doc.
Phase 1: Overlap analysis
Detect the repository layout. This project uses a git-bare layout:
- Bare repo: find it by reading the
.gitfile in the current worktree (it containsgitdir: <path>) or by checking common locations like../.git-bare. - Worktrees directory:
../worktrees/relative to the primary worktree.
- Bare repo: find it by reading the
Identify sibling worktrees. List all worktrees under the worktrees directory (excluding the primary
main/worktree). These are the parallel batch.Compute actual file overlap. For each sibling worktree:
- Run
git diff main --name-onlyin this worktree and each sibling. - Compute the intersection — files changed by both.
- Run
Classify overlapping files. For each overlapping file:
Auto-generated artifacts (strip from this PR, defer to follow-up):
docs/diagrams/uml/diagram-detailed.svgdocs/diagrams/uml/diagram-modules.d2docs/diagrams/uml/diagram-modules.svgdocs/diagrams/uml/modules/*.d2docs/diagrams/uml/modules/*.svg
Hand-edited source/docs (warn the user, proceed if they confirm):
- Any file not in the auto-generated list above.
Report overlap findings before proceeding:
- List auto-generated files that will be stripped (unstaged via
git checkout main -- <file>to revert them to the main version). - List any hand-edited overlap with a note about which sibling worktree also changed that file.
- If no overlap, say so.
- List auto-generated files that will be stripped (unstaged via
Strip auto-generated artifacts. For files classified as auto-generated, revert them to the
mainversion so they are not included in the commit:git checkout main -- <file>This removes the diff for those files without affecting anything else.
Phase 2: Ship (same as /ship, adapted for worktree context)
- Run
git status(no -uall flag),git diff(staged + unstaged), andgit log --oneline -5to understand the current state. - Stage all relevant changed/new files (prefer naming files explicitly
over
git add -A). Do NOT stage files that likely contain secrets. Do NOT stage files that were stripped in Phase 1. - Write a concise commit message (1-2 sentences) focusing on the "why".
End the message with:
Use a HEREDOC to pass the commit message.Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> - Push the branch to the remote with
-u. - Create a PR with
gh pr create. The PR body must include:## Summary(1-3 bullet points)## Test plan(bulleted checklist)- If auto-generated artifacts were stripped, add a note: "Diagram re-render deferred — will be included after all parallel PRs in this batch are merged."
- Footer:
Generated with [Claude Code](https://claude.com/claude-code)Use a HEREDOC for the body.
- Print the PR URL when done.
If $ARGUMENTS includes additional context, use it for the commit message.