git-wtpr
/git-wtpr
Opens or deletes a git-wt worktree for a GitHub pull request. Use when creating, switching to, or removing a PR worktree.
- Author
- ryoppippi ↗
- Repository
- dotfiles ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Opens or deletes a git-wt worktree for a GitHub pull request. Use when creating, switching to, or removing a PR worktree.
Original author description
Opens or deletes a git-wt worktree for a GitHub pull request. Use when creating, switching to, or removing a PR worktree.
How it works
- Usage
- Behaviour
- Workflow for agents
- Related
SKILL.md preview
--- name: git-wtpr description: Opens or deletes a git-wt worktree for a GitHub pull request. Use when creating, switching to, or removing a PR worktree. --- # Git Worktrees for Pull Requests (git-wtpr) Use `git wtpr` to create or switch to a worktree checked out at a PR head. Builds on `git-wt` — prefer this over `gh pr checkout` when isolation in a worktree is needed. ## Usage ```sh git wtpr <number|url> [git-wt flags...] git wtpr <number|url> -d | -D ``` Examples: ```sh git wtpr 25 git wtpr https://github.com/owner/repo/pull/3984 git wtpr 25 -D # remove that PR worktree ``` Interactive use (with `git-wtpr --init fish`) **cds into the worktree**, same as `git wt`. Do not pass `--nocd` unless you only need the path. Confirm availability with `command -v git-wtpr` or `git-wtpr --help`. ## Behaviour 1. Resolves the PR with `gh pr view` (number or URL). 2. Ensures the current clone matches the PR repository. 3. Fetches `pull/<n>/head` from the remote. 4. Creates or switches a worktree via `git wt` on the PR head branch name. 5. If the head branch is `main`/`master`, uses `pr-<number>` instead. 6. Shell integration cds into that worktree (unless `--nocd` / `wt.nocd`). Status goes to stderr. The worktree path is the last stdout line. With `-d` (safe) or `-D` (force) the PR worktree and its branch are deleted instead — the PR is still resolved to get the branch name, but step 3 is skipped. ## Workflow for agents 1. Run from the correct repository clone (not a random directory). 2. Use `git wtpr --nocd <pr>` — shell `cd` does not persist across tool calls, so capture the printed path and use it as the working directory. 3. Verify inside the worktree: `git branch --show-current` and `git status --short`. 4. To clean up afterwards, run `git wtpr <pr> -D` from the same clone (or `git wt -D <branch>`). For other lifecycle operations (list, rename), use the `git-wt` skill. ## Related - `git-wt` skill for worktree create/switch/delete/rename - `agents/shared/git-worktrees.md` for when not to create a new worktree
Versions
The database has no other skills named git-wtpr.
Database snapshot: 13.11.2026 · package version 426e0ca0c333 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100worktree
Manages git worktrees with git-wt, including PR checkouts. Use when the user asks to create, switch, or delete a worktree, or check out a PR. - 95git-worktree
This skill should be used when managing Git worktrees for isolated parallel development. It handles creating, listing, switching, and cleaning up worktrees with a simple interactive interface. - 100cleanup-github-worktree
清理长时间未使用的 git worktree(GitHub 版)。仅在用户明确要求清理 worktree 时使用,不自动触发。 关键词:清理 worktree、删除 worktree、移除旧分支、worktree 回收。 - 100git-worktree-finish
Use when the user asks to finish, land, or merge back a feature worktree created with /git-worktree. - 90git-github-workflows
Use when committing, opening a PR, driving it to merge, answering reviewer or AI-bot feedback, working in a worktree, cutting a release, or cleaning up branches. Not for command flags (git worktree, gh pr: working-with-git, working-with-github), CI workflow YAML… - 100worktree
Creates new git worktree with symlinked/copied assets and independent environment setup. Triggers on keywords: worktree, create worktree, new worktree, git worktree