Skip to content

/local_review

Set up a worktree to review a branch

Set up a local review environment for a colleague’s branch using git worktrees. Creates an isolated checkout and hands you the path to open a review session in.

/local_review feature-branch

Or with a PR number:

/local_review 123
  1. Parse input. Resolves PR numbers to branch names via gh pr view
  2. Extract ticket info. Looks for ticket numbers in the branch name
  3. Create worktree. git worktree add at ~/hyprlayer/worktrees/<repo>/<short-name> on a fresh review/<branch> branch, copying .claude/settings.local.json if present
  4. Install dependencies and init thoughts. Runs the first matching setup command (make setup, npm install, cargo build, …) then hyprlayer thoughts init inside the worktree
  5. Report. Prints the worktree path, the review/<branch> branch it tracks, and which setup command ran, so you can open a new session there