원클릭으로
eval-pr
Set up a git worktree to run and evaluate an upstream Pull Request locally in a flat worktree bare clone repository layout.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Set up a git worktree to run and evaluate an upstream Pull Request locally in a flat worktree bare clone repository layout.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | eval-pr |
| description | Set up a git worktree to run and evaluate an upstream Pull Request locally in a flat worktree bare clone repository layout. |
This skill helps an AI assistant set up a clean, isolated git worktree to evaluate an upstream pull request (PR) locally. This ensures your active development workspace is completely unaffected while testing community contributions or colleague PRs.
Invoke this skill when the user asks to:
The local repo must have a triangle workflow configured with:
origin pointing to the user's fork (e.g. jimbojw/deliberate-lab)upstream pointing to the canonical repo (PAIR-code/deliberate-lab)Verify with git remote -v.
It also assumes a bare repository layout with flat worktrees (e.g. main/, feature branches, and .bare/ reside under a single parent directory). Verify this layout with:
git worktree list
Intent: Fetch the pull request branch directly from upstream without adding the contributor's remote.
Run the following command from the repo root:
git fetch upstream pull/<PR-NUMBER>/head:pr-<PR-NUMBER>
This fetches the head of PR <PR-NUMBER> and creates a local branch named pr-<PR-NUMBER>.
Intent: Add a new worktree directory as a sibling to the existing worktree directories.
/path/to/checkout/deliberate-lab/main, the parent is /path/to/checkout/deliberate-lab/.../pr-<PR-NUMBER>).git worktree add ../pr-<PR-NUMBER> pr-<PR-NUMBER>
Once the worktree is created, inform the user that it is ready and provide the path to switch to. The user will handle installing dependencies, building, and running the project from their IDE/terminal.
If the PR author has pushed new commits and the user wants to refresh their local copy, follow this procedure instead of Steps 1–3.
Before running the initial setup steps, check whether a worktree for the PR already exists:
git worktree list
If a worktree named pr-<PR-NUMBER> already exists, skip Steps 1–3 and continue with the update procedure below.
From inside the existing PR worktree directory (e.g. ../pr-<PR-NUMBER>):
# 1. Fetch the latest PR head from upstream
git fetch upstream pull/<PR-NUMBER>/head
# 2. Reset the local branch to match
git reset --hard FETCH_HEAD
[!IMPORTANT] Why
git reset --hard FETCH_HEAD? This is someone else's PR — we should not rebase or merge. We want our local branch to be an exact mirror of whatever the PR author has pushed.reset --hardachieves this cleanly.
[!WARNING] If the user has made local modifications to the PR branch (e.g. experimental changes while testing),
git reset --hardwill discard them. Warn the user before running this command ifgit statusshows uncommitted changes or ifgit logshows local commits beyond the PR's original commits.
After the reset, the user will likely need to reinstall dependencies and rebuild (e.g. npm ci, npm run build -w utils, etc.).
If the user asks to clean up the PR worktree later, or for their reference:
git worktree remove ../pr-<PR-NUMBER>
git branch -d pr-<PR-NUMBER>
git worktree add to create a directory inside an existing worktree directory. Always place it as a sibling under the main checkout directory.-D to delete branches: Always use git branch -d (lowercase) so git can confirm there are no unmerged commits before deletion.git reset --hard, check git status and git log for local modifications or commits that would be lost.Read GitHub issues and pull requests via the REST API instead of scraping HTML pages.
Sync a fork's main branch with upstream and rebase local feature branches. Designed for the triangle workflow where development happens in fork feature branches and PRs go to the upstream repo.