git-worktree-pr

Automate the Git worktree PR lifecycle for Legion-managed tasks.

13|1|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/Thrimbda/legion-mind --skill git-worktree-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-pr
Source: https://github.com/Thrimbda/legion-mind/tree/main/skills/git-worktree-pr
Command: npx skills add https://github.com/Thrimbda/legion-mind --skill git-worktree-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

## What problem does it solve? Legion-managed tasks require a disciplined Git worktree PR lifecycle to isolate changes, enforce audits, and ensure a clean main workspace after delivery.

## Core Features & Use Cases

  • Isolation: each task runs in its own .worktrees/<task-id> to avoid main branch contention.
  • PR-driven delivery: automatically open/update PRs, rebase before push, enable auto-merge where allowed, and follow checks/reviews to closure.
  • Workspace synchronization: refresh the main workspace baseline after PR merge or abandonment.

### Quick Start Initialize a Legion task by entering the git-worktree-pr envelope to create a worktree, push a PR, and follow the checks and reviews to completion.

Frequently Asked Questions about git-worktree-pr

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

FAQPage Schema
How do I automate the Git worktree PR lifecycle for isolated task development?

Automating the Git worktree PR lifecycle involves creating isolated .worktrees/<task-id> directories, rebasing on origin/master before push, opening PRs, enabling auto-merge, and cleaning up workspaces after closure. This isolates changes and ensures a clean main workspace.

Why use Git worktrees for isolated task development instead of a single working branch?

Git worktrees provide isolation by assigning each task its own .worktrees/<task-id> directory, avoiding main branch contention. This PR-driven approach enforces audits, synchronizes the main workspace after delivery, and maintains a clean baseline.

Can I enable auto-merge for Git worktree PRs and follow checks to closure?

Yes, the Git worktree PR workflow supports enabling auto-merge where allowed. It automatically opens and updates PRs, follows checks and reviews to closure, and refreshes the main workspace baseline after the PR is merged or abandoned.

What's the best way to rebase on origin/master before pushing a PR from a worktree?

The best way to rebase before pushing a PR is through an automated workflow that rebases your .worktrees/<task-id> branch on origin/master, pushes the PR, and follows reviews to closure, ensuring synchronized delivery and workspace cleanup.

Do I need a Legion-managed repository to use a PR-driven worktree workflow?

Yes, this PR-driven worktree workflow applies specifically to Legion-managed repositories. It requires isolated worktrees for task development, PR-driven delivery, and synchronized main workspace management after PRs are merged or abandoned.

How do I clean up Git worktrees and refresh the main baseline after a PR merge?

Cleaning up Git worktrees after a PR merge involves automatically removing the .worktrees/<task-id> directory and refreshing the main workspace baseline. This synchronization happens after the PR is either merged or abandoned.