git:compare-worktrees

Compare files and directories across git worktrees with unified diffs.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/luicabref97/sushi-jungle-web --skill git-compare-worktrees-luicabref97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git:compare-worktrees
Source: https://github.com/luicabref97/sushi-jungle-web/tree/main/.agents/skills/git-compare-worktrees
Command: npx skills add https://github.com/luicabref97/sushi-jungle-web --skill git-compare-worktrees-luicabref97

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand code differences across multiple git worktrees or between a worktree and the current branch so they can perform accurate reviews and pre-merge checks without manually juggling copies of the repository.

Core Features & Use Cases

  • Discover all local worktrees and their branches using git worktree list and present clear comparison targets.
  • Compare specific files or entire directories between two worktrees with recursive or unified diffs, or produce concise summary statistics with --stat.
  • Use Case: Inspect changes introduced by a feature branch checked out in a separate worktree to validate behavior and identify added, removed, or modified files before merging.

Quick Start

Use the git:compare-worktrees skill to compare the src/ directory between your current worktree and the feature-x worktree.

Frequently Asked Questions about git:compare-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare files between git worktrees without manually copying the repository?

To compare files between git worktrees, you can use a tool that discovers local worktrees via git worktree list and outputs unified diffs. This allows you to review code differences across branches without juggling multiple repository copies.

What is the best way to review code changes in a feature branch checked out in a separate worktree?

The best way to review code changes in a separate worktree is to compare the specific file or directory paths against your current branch. This produces unified diffs or summary statistics to validate behavior before merging.

Can I generate diff summary statistics for an entire directory across git worktrees?

Yes, you can generate diff summary statistics for an entire directory across git worktrees. By comparing directory paths between worktrees, the tool outputs concise statistics showing added, removed, and modified files.

Does comparing branches across worktrees work for local git repositories only?

Comparing branches across worktrees applies to local git repositories with multiple worktrees. You need existing local worktrees set up for tasks like code review, pre-merge inspection, and cross-branch implementation comparisons.

How do I find all available worktrees and their branches for a pre-merge inspection?

To find all available worktrees and their branches for a pre-merge inspection, you can run a discovery process using git worktree list. This presents clear comparison targets by showing all local worktrees and their associated branch names.