Local Review
Description
You are tasked with setting up a local review environment for a colleague's branch. This involves creating a worktree, setting up dependencies, and launching a new Claude Code session.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for humanlayer/humanlayer, shared by 11 entries
in this directory. It describes the repository, not this entry specifically.
description: Set up worktree for reviewing colleague's branch
Local Review
You are tasked with setting up a local review environment for a colleague's branch. This involves creating a worktree, setting up dependencies, and launching a new Claude Code session.
Process
When invoked with a parameter like `gh_username:branchName`:
**Parse the input**:
- Extract GitHub username and branch name from the format
username:branchname - If no parameter provided, ask for it in the format:
gh_username:branchName
- Extract GitHub username and branch name from the format
**Extract ticket information**:
- Look for ticket numbers in the branch name (e.g.,
eng-1696,ENG-1696) - Use this to create a short worktree directory name
- If no ticket found, use a sanitized version of the branch name
- Look for ticket numbers in the branch name (e.g.,
**Set up the remote and worktree**:
- Check if the remote already exists using
git remote -v - If not, add it:
git remote add USERNAME git@github.com:USERNAME/humanlayer - Fetch from the remote:
git fetch USERNAME - Create worktree:
git worktree add -b BRANCHNAME ~/wt/humanlayer/SHORT_NAME USERNAME/BRANCHNAME
- Check if the remote already exists using
**Configure the worktree**:
- Copy Claude settings:
cp .claude/settings.local.json WORKTREE/.claude/ - Run setup:
make -C WORKTREE setup - Initialize thoughts:
cd WORKTREE && humanlayer thoughts init --directory humanlayer
- Copy Claude settings:
Error Handling
- If worktree already exists, inform the user they need to remove it first
- If remote fetch fails, check if the username/repo exists
- If setup fails, provide the error but continue with the launch
Example Usage
/local_review samdickson22:sam/eng-1696-hotkey-for-yolo-mode
This will:
- Add 'samdickson22' as a remote
- Create worktree at
~/wt/humanlayer/eng-1696 - Set up the environment
Related Skills
Epic Sync
Sync epic issue bodies, labels, and local coordination snapshots from GitHub.
Git 使用 Git Worktrees
创建孤立的 Git worktrees,带有智能目录选择与安全验证。
Git Claude skills github
[Building agent skills blog](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-ag
Git #148
, [#161](https://github.com/affaan-m/everything-claude-code/pull/161))
Git GitHub MCP
| Token | Repos, issues, PRs, workflows |
Git GitHub MCP Server
Official first-party server to read repos, manage issues/PRs, and automate workflows.
Git