Your job is to compare files and directories between git worktrees, helping users understand differences in code across branches or worktrees.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiongit:compare-worktreesExecute the skills CLI command in your project's root directory to begin installation:
Fetches git:compare-worktrees from neolabhq/context-engineering-kit and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate git:compare-worktrees. Access via /git:compare-worktrees in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
765
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
765
stars
Your job is to compare files and directories between git worktrees, helping users understand differences in code across branches or worktrees.
CRITICAL: Perform the following steps exactly as described:
Current state check: Run git worktree list to show all existing worktrees and their locations
Parse user input: Classify each provided argument:
--stat: Show summary statistics of differences (files changed, insertions, deletions)git worktree listDetermine comparison targets (worktrees to compare):
a. If user provided worktree paths: Use those as comparison targets
b. If user specified branch names: Find the worktrees for those branches from git worktree list
c. If only one worktree exists besides current: Use current and that one as comparison targets
d. If multiple worktrees exist and none specified: Present list and ask user which to compare
e. If no other worktrees exist: Offer to compare with a branch using git diff
Determine what to compare (files/directories within worktrees): a. If user specified file(s) or directory(ies) paths: Compare ALL of them b. If no specific paths given: Ask user:
Execute comparison:
For specific files between worktrees:
diff <worktree1>/<path> <worktree2>/<path>
# Or for unified diff format:
diff -u <worktree1>/<path> <worktree2>/<path>
For directories between worktrees:
diff -r <worktree1>/<directory> <worktree2>/<directory>
# Or for summary only:
diff -rq <worktree1>/<directory> <worktree2>/<directory>
For branch-level comparison (using git diff):
git diff <branch1>..<branch2> -- <path>
# Or for stat summary:
git diff --stat <branch1>..<branch2>
For comparing with current working directory:
diff <current-file> <other-worktree>/<file>
Format and present results:
| Mode | Description | Command Pattern |
|---|---|---|
| File diff | Compare single file between worktrees | diff -u <wt1>/file <wt2>/file |
| Directory diff | Compare directories recursively | diff -r <wt1>/dir <wt2>/dir |
| Summary only | Show which files differ (no content) | diff -rq <wt1>/ <wt2>/ |
| Git diff | Use git's diff (branch-based) | git diff branch1..branch2 -- path |
| Stat view | Show change statistics | git diff --stat branch1..branch2 |
The command finds worktrees using git worktree list:
/home/user/project abc1234 [main]
/home/user/project-feature def5678 [feature-x]
/home/user/project-hotfix ghi9012 [hotfix-123]
From this output, the command extracts:
Compare specific file between worktrees:
> /git:compare-worktrees src/app.js
# Prompts to select which worktree to compare with
# Shows diff of src/app.js between current and selected worktree
Compare between two specific worktrees:
> /git:compare-worktrees ../project-main ../project-feature src/module.js
# Compares src/module.js between the two specified worktrees
Compare multiple files/directories:
> /git:compare-worktrees src/app.js src/utils/ package.json
# Shows diffs for all three paths between worktrees
Compare entire directories:
> /git:compare-worktrees src/
# Shows all differences in src/ directory between worktrees
Get summary statistics:
> /git:compare-worktrees --stat
# Shows which files differ and line counts
Interactive mode:
> /git:compare-worktrees
# Lists available worktrees
# Asks which to compare
# Asks for specific paths or entire worktree
Compare with branch worktree by branch name:
> /git:compare-worktrees feature-x
# Finds worktree for feature-x branch and compares
Compare specific paths between branch worktrees:
> /git:compare-worktrees main feature-x src/ tests/
# Compares src/ and tests/ directories between main and feature-x worktrees
File Comparison Header:
Comparing: src/app.js
From: /home/user/project (main)
To: /home/user/project-feature (feature-x)
---
[diff output]
Summary Output:
Worktree Comparison Summary
===========================
From: /home/user/project (main)
To: /home/user/project-feature (feature-x)
Files only in main:
- src/deprecated.js
Files only in feature-x:
+ src/new-feature.js
+ src/new-feature.test.js
Files that differ:
~ src/app.js
~ src/utils/helpers.js
~ package.json
Statistics:
3 files changed
2 files added
1 file removed
# See what changed in a feature branch
> /git:compare-worktrees --stat
> /git:compare-worktrees src/components/
# Compare how two features implemented similar functionality
> /git:compare-worktrees ../project-feature-1 ../project-feature-2 src/auth/
# Check if a specific file differs
> /git:compare-worktrees package.json
# Review all changes before merging (compare src and tests together)
> /git:compare-worktrees --stat
> /git:compare-worktrees src/ tests/
# Both src/ and tests/ directories will be compared
Argument detection: The command auto-detects argument types by comparing them against git worktree list output:
Multiple paths: When multiple file/directory paths are provided, ALL of them are compared between the selected worktrees (not just the first one).
Worktree paths: When specifying worktrees, use the full path or relative path from current directory (e.g., ../project-feature)
Branch vs Worktree: If you specify a branch name, the command looks for a worktree with that branch checked out. If no worktree exists for that branch, it suggests using git diff instead.
Large diffs: For large directories, the command will offer to show a summary first before displaying full diff output.
Binary files: Binary files are detected and reported as "Binary files differ" without showing actual diff.
File permissions: The diff will also show changes in file permissions if they differ.
No worktrees: If no other worktrees exist, the command will explain how to create one and offer to use git diff for branch comparison instead.
Use /git:create-worktree first to set up worktrees for comparison:
# Create worktrees for comparison
> /git:create-worktree feature-x, main
# Created: ../project-feature-x and ../project-main
# Now compare
> /git:compare-worktrees src/
"No other worktrees found"
/git:create-worktree <branch>git diff for branch-only comparison without worktrees"Worktree for branch not found"
git worktree list to see available worktrees/git:create-worktree <branch>"Path does not exist in worktree"
Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
mattpocock/skills
git:compare-worktrees reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: git:compare-worktrees is the kind of skill you can hand to a new teammate without a long onboarding doc.
We added git:compare-worktrees from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
We added git:compare-worktrees from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
git:compare-worktrees fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
git:compare-worktrees reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend git:compare-worktrees for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added git:compare-worktrees from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
git:compare-worktrees is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
git:compare-worktrees reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 70