git:compare-worktrees

Compare Git worktrees and branches by executing path-level or full-worktree diffs.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/dalawwa/labor-methods --skill git-compare-worktrees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git:compare-worktrees
Source: https://github.com/dalawwa/labor-methods/tree/main/.cek/plugins/git/skills/compare-worktrees
Command: npx skills add https://github.com/dalawwa/labor-methods --skill git-compare-worktrees

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compare files and directories between git worktrees or a worktree and the current branch to understand changes across branches and worktrees.

Core Features & Use Cases

  • Compare specific files or directories across worktrees or against the current branch.
  • Generate summary statistics of differences with --stat and support for -r recursive diffs.
  • Detect which worktrees relate to particular branches and present interactive prompts when needed.
  • Adapt to multiple worktrees and handle path inputs.

Quick Start

Compare specific files or entire directories between two git worktrees or against the current branch.

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?

To compare files between git worktrees, the skill detects worktree roots via git worktree list and executes directory diffs to identify path-level differences across branches.

Can I generate a recursive diff for a specific directory across git branches?

Yes, you can generate a recursive diff for directories across git branches by applying the -r option, while using --stat to produce summary statistics of the file differences.

How do I find which git worktree corresponds to a specific branch?

You can find which git worktree corresponds to a specific branch because the skill resolves branches to worktrees automatically and presents interactive prompts when needed.

What is the best way to diff an entire git worktree against the current branch?

The best way to diff an entire worktree against the current branch is executing a full-worktree diff, which compares directories and files to identify all changes across the version control system.

Does this worktree comparison require any special git dependencies?

No special dependencies are required, as the skill operates by detecting worktree roots and executing standard git diff commands with appropriate options natively.

Why use a worktree diff instead of a standard branch diff?

A worktree diff compares actual filesystem paths across multiple checked-out directories, whereas a standard branch diff only compares commit history without resolving physical file states on disk.