使い方
- インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
- 必要なツール、認証情報、対応環境を原文で確認します。
- 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill comparing-branches-visually開始前の確認
- 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
- スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。
Comparing Branches Visually
Create a visual before/after comparison of UI changes between two branches.
Workflow
1. Set Up Two Worktrees
Use best-of-n-runner subagents or git worktrees to run both branches simultaneously:
# Create a worktree for the base branch
git worktree add /tmp/branch-compare-base main
# The current working directory has the feature branch2. Start Both Servers
Start the base branch server on a different port:
# In the base worktree
cd /tmp/branch-compare-base && PORT=3001 npm run dev
# Current branch is already on the default port (3000)3. Identify Pages to Compare
Determine which pages are affected by the changes:
git diff main --name-only | grep -E '\.(tsx?|jsx?|vue|svelte|css)'Map changed files to their routes (e.g. app/dashboard/page.tsx → /dashboard).
4. Screenshot Both Versions
For each affected page:
browser_navigatetohttp://localhost:3001/<page>(base branch)browser_take_screenshot→ save as "before"browser_navigatetohttp://localhost:3000/<page>(feature branch)browser_take_screenshot→ save as "after"
5. Report
Present the comparison:
Visual Diff: feature/redesign-header vs main
/dashboard:
Before: [screenshot from main]
After: [screenshot from feature branch]
Changes: Header height reduced, nav links repositioned, new avatar dropdown
/settings:
Before: [screenshot]
After: [screenshot]
Changes: No visual differences detected6. Clean Up
# Stop the base branch server
# Remove the worktree
git worktree remove /tmp/branch-compare-baseTips
- Test at a consistent viewport size (1280×800 is a good default)
- For mobile-first changes, also compare at 375px width
- If the app requires auth, log in on both ports first
- This pairs well with
screenshotting-changelogfor PR descriptions



