worktree-manager
Skill4.7k starsChanged 11 months agoMITView on GitHub
Create and manage Git worktrees for parallel development workflows. Use when multiple self-contained issues should NOT be fixed in a single branch, when human-Copilot iteration requires isolated environments with separate chat history and commits, or when parallel work items need independent build/test results. Triggers on requests involving branch isolation, work item separation, parallel development, or avoiding messy branch switching.
6 other projects use a version of this.
Trending
Quiet this year.about the whole repository
Most recently taken up by
- kopp0510/claude-ddtheir own version, first seen Oct 5, 2026
- IGTA-Tech/claude-skills-researchtheir own version, first seen Oct 3, 2026
- kanopi/cms-cultivatortheir own version, first seen Jul 7, 2026
- miptah21/skillstheir own version, first seen May 26, 2026
- vlting/claude-skillstheir own version, first seen Mar 19, 2026
- Wirasm/worktree-manager-skilltheir own version, first seen Jan 7, 2026
Who's talking about microsoft/WindowsAppSDK
- microsoft/microsoft-ui-xaml“Discussion: WinUI 3.0 XAML Designer”GitHub · Sep 19, 2021 · 376 reactions
- dotnet/maui“Make MAUI into 1 workload and lots of NuGets instead of a full workload”GitHub · Nov 9, 2022 · 59 reactions
- dotnet/maui“Windows Unpackaged support in .NET MAUI ”GitHub · Oct 8, 2022 · 27 reactions
- dotnet/maui“After updating Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps …”GitHub · Nov 13, 2024 · 25 reactions
- dotnet/maui“Add Support for WinUI Unpackaged Apps”GitHub · Oct 28, 2021 · 16 reactions
The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 17
Talked about on GitHub, Hacker News and Bluesky (17 times).
On GitHub · 13
- Sep 19, 2021Discussion: WinUI 3.0 XAML Designer — microsoft/microsoft-ui-xaml376 reactions · 427 comments
- Nov 9, 2022Make MAUI into 1 workload and lots of NuGets instead of a full workload — dotnet/maui59 reactions · 7 comments
- Oct 8, 2022Windows Unpackaged support in .NET MAUI — dotnet/maui27 reactions · 4 comments
- Nov 13, 2024After updating Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS — dotnet/maui25 reactions · 57 comments
- Oct 28, 2021Add Support for WinUI Unpackaged Apps — dotnet/maui16 reactions · 18 comments
8 more on GitHub
- Sep 10, 2025Update Win2D to Support WinAppSDK v1.8 Meta Package — microsoft/Win2D13 reactions · 1 comment
- Nov 6, 2021Proposal: Include WinUI 3 test projects (as already exist for standard UWP apps) — microsoft/microsoft-ui-xaml13 reactions · 17 comments
- Sep 26, 2021[Bug] Maui Essentials WebAuthenticator not working in WinUI — dotnet/maui11 reactions · 50 comments
- Sep 14, 2024When the WinUI3 window of Windows App SDK 1.6 is launched, it will cause any window with the TOPMOST style of any other process to lose the TOPMOST effect — microsoft/microsoft-ui-xaml10 reactions · 1 comment
- Dec 12, 2023Moving mouse wheel and click hangs WinUI application — microsoft/microsoft-ui-xaml10 reactions · 14 comments
- Sep 7, 2022Simplify and make more robust the process for Single-instance WinUI apps — dotnet/maui10 reactions · 21 comments
- Apr 11, 2022Unable to run Windows application from command line — dotnet/maui9 reactions · 21 comments
- Mar 1, 2025Proposal: Set owner for Microsoft.UI.Xaml.Window — microsoft/microsoft-ui-xaml8 reactions
On Hacker News · 3
- Oct 19, 2021UWP won't get new features. Is moved to bugfix only mode3 points
- Nov 19, 2021Windows App SDK version 1.0 (first stable release)1 point
- Nov 17, 2021Windows App SDK (Previously Known as Project Reunion)1 point
On Bluesky · 1
- Jan 26, 2025I didn't. Should I file an issue here? github.com/microsoft/Wi... — @peymanr34.bsky.social0 likes and reposts · 1 reply
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- Wirasm/worktree-manager-skill★ 139same name
- kanopi/cms-cultivator★ 17same name
- kopp0510/claude-dd★ 12same name
- IGTA-Tech/claude-skills-research★ 2same name
- miptah21/skills★ 2same name
- vlting/claude-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- issue-triage-reportSkill
- triage-meeting-prepSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 12 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Keep each VS Code window focused on one task
- Distinctive: line 23
Run builds/tests independently without cross-contamination
- Distinctive: line 44
Create or reuse a worktree for an existing local or remote branch.
- Distinctive: line 70
Start a new work item branch with consistent naming and create a worktree for it.
- Distinctive: line 102
Remove a worktree and optionally its associated branch.
- Distinctive: line 132
Use Git directly to list worktrees:
- Distinctive: line 143
Create work item branch and worktree:
- Distinctive: line 148
Commit, push, and open PR
- Distinctive: line 149
Delete worktree when PR is merged:
- Distinctive: line 156
Create worktrees for each feature:
- Distinctive: line 162
Keep ≤ 3 active worktrees to manage cognitive load
- Very specific: line 212
No destructive operations without explicit -Force flag
- Distinctive: line 216
All implementation is self-contained within this skill folder:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Worktree Manager
This skill provides helper scripts and workflows for creating and managing Git worktrees, enabling parallel development across multiple branches without cloning the repository multiple times.
When to Use This Skill
Primary triggers — Create a new worktree when:
- Multiple self-contained issues exist — Different problems should NOT be fixed together in a single branch. Each issue deserves its own branch with isolated commits, separate PR, and independent review.
- Human-Copilot iteration is needed — Step-by-step collaboration requires an isolated environment where:
- Each worktree has its own Copilot chat history and context
- Plan and TODO progress stays scoped to that specific issue
- Commits are atomic and traceable to one problem
- Parallel work avoids branch-switching chaos — Instead of constantly switching branches (which mixes up build artifacts, test results, and Copilot context), worktrees let you:
- Keep each VS Code window focused on one task
- Run builds/tests independently without cross-contamination
- Resume work instantly without stashing or context loss
Anti-patterns — Do NOT use worktrees when:
- A quick one-liner fix can be committed directly
- Changes are tightly coupled and belong in the same PR
- You're just reading code (no commits planned)
Prerequisites
- Git installed and configured
- PowerShell 5.1+ (Windows) or PowerShell Core (cross-platform)
- VS Code installed (for automatic workspace opening)
- Repository must be a Git repository (not inside a worktree already)
Available Scripts
This skill provides focused scripts for each worktree operation.
New-WorktreeFromBranch.ps1
Create or reuse a worktree for an existing local or remote branch.
Location: ./scripts/New-WorktreeFromBranch.ps1
./scripts/New-WorktreeFromBranch.ps1 -Branch <branch-name> [-NoFetch]| Parameter | Required | Default | Description |
-Branch | Yes | - | Branch name (local or origin/<name> form) |
-NoFetch | No | $false | Skip remote fetch if branch missing locally |
Examples:
# From a local or remote branch
./scripts/New-WorktreeFromBranch.ps1 -Branch feature/login
# From origin remote (normalizes automatically)
./scripts/New-WorktreeFromBranch.ps1 -Branch origin/bugfix/nullrefNew-WorktreeFromIssue.ps1
Start a new work item branch with consistent naming and create a worktree for it.
Location: ./scripts/New-WorktreeFromIssue.ps1
./scripts/New-WorktreeFromIssue.ps1 -Number <workitem-number> [-Title <description>] [-Base <ref>]| Parameter | Required | Default | Description |
-Number | Yes | - | Azure DevOps work item number for branch naming |
-Title | No | - | Descriptive title (slugified into branch name) |
-Base | No | origin/main | Base ref to branch from |
Examples:
# Work item branch with title
./scripts/New-WorktreeFromIssue.ps1 -Number 1234 -Title "Crash on launch"
# Creates: workitem/1234-crash-on-launch
# Work item branch from different base
./scripts/New-WorktreeFromIssue.ps1 -Number 42 -Base origin/develop
# Simple work item branch (no title slug)
./scripts/New-WorktreeFromIssue.ps1 -Number 999
# Creates: workitem/999Delete-Worktree.ps1
Remove a worktree and optionally its associated branch.
Location: ./scripts/Delete-Worktree.ps1
./scripts/Delete-Worktree.ps1 -Pattern <pattern> [-Force] [-KeepBranch]| Parameter | Required | Default | Description |
-Pattern | Yes | - | Partial branch name or path to match |
-Force | No | $false | Force removal even with uncommitted changes |
-KeepBranch | No | $false | Don't delete the local branch |
Examples:
# Delete worktree by branch pattern
./scripts/Delete-Worktree.ps1 -Pattern feature/perf-tweak
# Force delete with uncommitted changes
./scripts/Delete-Worktree.ps1 -Pattern workitem/1234 -Force
# Delete worktree but keep the branch
./scripts/Delete-Worktree.ps1 -Pattern feature/ui -KeepBranchList Worktrees
Use Git directly to list worktrees:
git worktree list --porcelainStep-by-Step Workflows
Workflow 1: Work on an Azure DevOps Work Item
- Note the work item number and title
- Create work item branch and worktree:
./scripts/New-WorktreeFromIssue.ps1 -Number 1234 -Title "Fix null reference" - Build, test, and develop as normal
- Commit, push, and open PR
- Delete worktree when PR is merged:
./scripts/Delete-Worktree.ps1 -Pattern workitem/1234
Workflow 2: Parallel Feature Development
- Create worktrees for each feature:
./scripts/New-WorktreeFromBranch.ps1 -Branch feature/login ./scripts/New-WorktreeFromBranch.ps1 -Branch feature/dashboard - Work on each independently (different VS Code windows)
- Keep ≤ 3 active worktrees to manage cognitive load
Worktree Naming & Locations
| Source | Local Branch Name | Worktree Folder |
| Local/remote branch | Same as branch | <RepoName>-<hash>/ |
| Work item | workitem/<number>-<slug> | <RepoName>-<hash>/ |
Worktrees are created as sibling folders to the repository root (e.g., MyRepo/ and MyRepo-ab12/).
Best Practices
- Keep ≤ 3 active worktrees per developer to reduce cognitive load
- Delete stale worktrees early — each adds file watchers and build churn
- Avoid editing the same file across multiple worktrees simultaneously
- Run
git fetch --all --pruneperiodically in the primary repo, not every worktree - Use targeted builds inside worktrees instead of full builds
Troubleshooting
| Symptom | Solution |
| Cannot lock ref (*.lock error) | Run git worktree prune or delete stale .lock file manually |
| Worktree already exists | Use git worktree list to find existing path; reuse that folder |
| Local branch missing for remote | Run git branch --track <name> origin/<name> then retry |
| Submodules not initialized | Run git submodule update --init --recursive in the worktree |
Common Commands Reference
# List all worktrees
git worktree list --porcelain
# List local branches with tracking info
git branch -vv
# List remotes
git remote -v
# Prune stale worktree references
git worktree prune
# Force remove a worktree with uncommitted changes
git worktree remove --force <path>Security Notes
- Scripts do not store credentials — they rely on your existing Git credential helper
- No destructive operations without explicit
-Forceflag
Script Locations
All implementation is self-contained within this skill folder:
Scripts (master source):
- New-WorktreeFromBranch.ps1 — create worktree from branch
- New-WorktreeFromIssue.ps1 — create worktree for work item
- Delete-Worktree.ps1 — remove worktree and branch
- WorktreeLib.ps1 — shared helper functions
Human-friendly wrappers (in tools/git/):
tools/git/New-WorktreeFromBranch.cmd— delegates to skill's master scripttools/git/New-WorktreeFromIssue.cmd— delegates to skill's master scripttools/git/Delete-Worktree.cmd— delegates to skill's master scripttools/git/Worktree-Guidelines.md— quick reference for developers
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

