-
Notifications
You must be signed in to change notification settings - Fork 27
PR skill: provide clone-and-checkout commands for testing PR branches #73
Description
Problem
When the PR skill falls back to providing a GitHub compare URL (Rung 2), the user needs to test the changes locally before creating the PR. Currently, the skill provides the compare URL and PR description but doesn't tell the user how to actually get the code onto their machine.
This led to a real mistake during a bugfix session: the user tested on main instead of the PR branch, concluded the fix didn't work, and spent significant time debugging a non-issue. The fix was actually correct — they just weren't running it.
Proposed Change
When the PR skill completes Step 6 (push to fork) and falls back to Rung 2 (manual PR via compare URL), it should also output ready-to-copy commands for the user to clone and test the branch locally. For example:
## Test locally
git clone https://github.com/FORK_OWNER/REPO.git
cd REPO
git checkout BRANCH_NAME
Or if the user already has the repo cloned:
## Test locally (existing clone)
git remote add fork https://github.com/FORK_OWNER/REPO.git # if not already added
git fetch fork BRANCH_NAME
git checkout -b BRANCH_NAME fork/BRANCH_NAME
Where to Change
.claude/skills/pr/SKILL.md— Add to the Rung 2 fallback output (Step 7 failure path) and also to Step 8 (Confirm and Report)
Context
This came up during a bugfix on sallyom/claw-installer#31. The fix was pushed to jwm4/claw-installer branch bugfix/issue-31-delete-data-no-config, but the user tested on main and reported the fix wasn't working. After significant debugging (adding console logging, re-pushing, etc.), the root cause turned out to be testing the wrong branch.