prepare-pr-diff-worktree

Community

Isolate PR code, export diffs, get metadata fast.

AuthorD3Hunter
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Manually setting up an isolated git worktree for a GitHub pull request, checking out the PR code, and exporting the PR diff is time-consuming and error-prone, especially when you don't have the gh CLI authenticated or are working outside the target repository.

Core Features & Use Cases

  • Isolated PR Worktree Creation: Automatically creates a unique, isolated git worktree under the target repository's worktrees/ directory to avoid disrupting your main working copy.
  • Flexible PR Checkout: Supports checking out PRs via authenticated gh pr checkout or a public git fetch fallback for unauthenticated use cases.
  • Automatic Diff Export: Saves the PR diff as a <pr-number>.diff file in the worktree root, using gh pr diff or a direct GitHub URL fallback.
  • Use Case: A software engineer needs to review changes in a large open source PR without cloning the entire repo or affecting their local feature branch, even if they don't have a GitHub auth token configured.

Quick Start

Use this skill to create an isolated worktree for the GitHub pull request at https://github.com/tidb/tidb/pull/12345, export its diff, and get the worktree path and metadata for your review workflow.

Dependency Matrix

Required Modules

gitghcurl

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: prepare-pr-diff-worktree
Download link: https://github.com/D3Hunter/ai-engineer/archive/main.zip#prepare-pr-diff-worktree

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.