git-compare-worktrees

Compare files and directories between Git worktrees or branches.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers quickly identify and understand differences in code across various Git worktrees, streamlining code reviews and feature development.

Core Features & Use Cases

  • Worktree Comparison: Compares files and directories between different Git worktrees.
  • Branch Comparison: Can also compare branches directly using git diff.
  • Summary Statistics: Provides a concise overview of changes, including added, deleted, and modified files.
  • Use Case: After creating a new feature branch in a separate worktree, use this Skill to compare your changes against the main branch before merging.

Quick Start

Use the git-compare-worktrees skill to compare the 'src/' directory between the 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?

Comparing files between git worktrees involves running directory diffs across detected worktrees. This process identifies file differences and provides summary statistics for added, deleted, and modified files.

What is the best way to compare code across git branches before merging?

Comparing code across git branches is best done using `git diff` to identify changes. This approach provides a concise overview of modifications, additions, and deletions before you merge a feature branch into the main branch.

Can I get summary statistics of modified files when comparing git branches?

You can get summary statistics of modified files when comparing git branches. The comparison evaluates differences and outputs a concise overview detailing added, deleted, and modified files.

Does the git worktree comparison support interactive selection of comparison targets?

Yes, git worktree comparison supports interactive selection of comparison targets. This allows you to dynamically choose which worktrees or branches to compare rather than being limited to predefined comparison scopes.

Do I need to manually specify paths to compare directories between git worktrees?

You do not need to manually specify paths to compare directories between git worktrees. The process utilizes `git worktree list` for automatic worktree detection and allows interactive selection of comparison targets.