wtpr

Automate git worktree PR workflows with rebasing and GitHub PR updates.

114|12|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/OpenDCAI/leonai --skill wtpr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wtpr
Source: https://github.com/OpenDCAI/leonai/tree/main/.claude/skills/wtpr
Command: npx skills add https://github.com/OpenDCAI/leonai --skill wtpr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

wtpr automates the full PR submission workflow on git worktrees: automatically identify the active worktree, handle uncommitted changes, rebase to the latest origin/main, force-push, and create or update a GitHub PR when users submit a PR, add commits to an existing PR, or run the wtpr command.

Core Features & Use Cases

  • Automated worktree PR management: detect context, stage changes, rebase, and push with safety checks.
  • PR lifecycle handling: create new PRs or attach new commits to existing ones, with clear status updates.
  • Safe execution: guided conflict resolution and automatic messaging to keep PRs synchronized with origin/main.

Quick Start

Run wtpr in your git worktree to automatically manage PR creation and updates, including rebasing to origin/main and force-pushing when needed.

Frequently Asked Questions about wtpr

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

FAQPage Schema
How do I automate pull request creation from a git worktree?

You can automate pull request creation from a git worktree by running the wtpr command, which detects the active worktree, stages uncommitted changes, rebases onto origin/main, and force-pushes to create or update a GitHub PR automatically.

What is the best way to rebase a worktree branch onto origin/main before submitting a PR?

The best way to rebase a worktree branch onto origin/main before submitting a PR is using automated worktree PR management tools like wtpr, which handle the rebase logic and force-push operations while applying safety checks to keep your branch synchronized.

How do I add new commits to an existing GitHub PR from a separate worktree?

To add new commits to an existing GitHub PR from a separate worktree, run wtpr in your worktree directory; it detects the existing PR context, stages your new commits, rebases to origin/main, and force-pushes the updates to the current PR branch.

Does automated worktree PR management handle uncommitted changes safely?

Yes, automated worktree PR management handles uncommitted changes safely by detecting the active worktree context, staging changes appropriately, and providing guided conflict resolution messaging during the rebase process to prevent data loss.

What happens when a git rebase encounters conflicts during automated PR submission?

When a git rebase encounters conflicts during automated PR submission, the process provides guided conflict resolution and automatic messaging to help you resolve issues safely, ensuring your PR remains synchronized with origin/main before force-pushing.

Can I use automated worktree PR workflows across multiple git branches?

Yes, you can use automated worktree PR workflows across multiple git branches by running the wtpr command in any active worktree, which detects the current branch context, handles uncommitted changes, rebases to origin/main, and manages PR creation or updates accordingly.