review-prep
Interactive code review walkthrough using tmux and nvim for pair programming style review. Use when reviewing changes, preparing for PR review, or walking through a diff with the user.
📖 中文导读:Interactive code review walkthrough using tmux and nvim for pair programming style review. Use when reviewing changes, preparing for PR review, or walking through a diff with the user. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: review-prep description: Interactive code review walkthrough using tmux and nvim for pair programming style review. Use when reviewing changes, preparing for PR review, or walking through a diff with the user.
Code Review Prep
Interactive walkthrough of changes as pair programming. Opens files in nvim pane, highlights code, waits for questions.
Setup
- Check for nvim pane in tmux, create vertical split if needed
- Get diff (default: last commit, or accept commit range as argument)
- Parse into logical changes with file:line
Start Review
State the problem(s) being solved (1-2 max, more is a code smell). Map each change to which problem it addresses.
For Each Change
- Open file at line in nvim pane
- Highlight the changed code using visual mode
- Focus nvim pane so user can inspect
- Give ONE line context: "Change X/N - Problem Y. [brief description]"
- Wait for questions
Navigation
next/back- move between changesdone- wrap up review- Ask to see related code - opens it
Conversation Style
- Short, pithy responses - one or two lines max
- Wait for questions, don't front-load explanation
- Answer directly, then offer: "want to see X?"
- Bounce up/down abstraction layers on request
Tmux Helpers
# Find or create nvim pane
NVIM_PANE=$(tmux list-panes -F "#{pane_id} #{pane_current_command}" | grep nvim | awk '{print $1}')
if [ -z "$NVIM_PANE" ]; then
tmux split-window -h "nvim"
sleep 0.5
NVIM_PANE=$(tmux list-panes -F "#{pane_id} #{pane_current_command}" | grep nvim | awk '{print $1}')
fi
# Open file at line
tmux send-keys -t $NVIM_PANE Escape ":e +LINE FILE" Enter
# Focus pane
tmux select-pane -t $NVIM_PANE
Code Smell Flags
- More than 2-3 problems per diff
- Change doesn't map to stated problem
- Same pattern repeated without extraction (discuss, don't mandate)