Finishing a Development Branch
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.
$ npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/WindowsAppSDK worktree-manager --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/WindowsAppSDK.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/worktree-manager .claude/skills/worktree-manager && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "worktree-manager" agent skill from https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-manager into .claude/skills/worktree-manager/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-manager", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-managerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/WindowsAppSDK worktree-manager --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/WindowsAppSDK.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/worktree-manager .agents/skills/worktree-manager && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "worktree-manager" agent skill from https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-manager into .agents/skills/worktree-manager/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-manager", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/WindowsAppSDK worktree-manager --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/WindowsAppSDK.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/worktree-manager .cursor/skills/worktree-manager && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "worktree-manager" agent skill from https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-manager into .cursor/skills/worktree-manager/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-manager", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/WindowsAppSDK.git --path .github/skills/worktree-manager--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/WindowsAppSDK worktree-manager --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/WindowsAppSDK.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/worktree-manager .gemini/skills/worktree-manager && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "worktree-manager" agent skill from https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-manager into .gemini/skills/worktree-manager/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-manager", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/WindowsAppSDK worktree-managerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/WindowsAppSDK.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/worktree-manager .github/skills/worktree-manager && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "worktree-manager" agent skill from https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-manager into .github/skills/worktree-manager/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-manager", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/WindowsAppSDK worktree-manager --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/WindowsAppSDK.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/worktree-manager .opencode/skills/worktree-manager && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "worktree-manager" agent skill from https://github.com/microsoft/WindowsAppSDK/tree/main/.github/skills/worktree-manager into .opencode/skills/worktree-manager/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-manager", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
worktree-managerCreates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.
The skill is for parallel development without constant branch switching. It recommends a new worktree when several self-contained issues should not share a branch, when step-by-step work with Copilot needs its own chat history, plan and atomic commits, or when parallel items need independent build and test results. Quick one-line fixes, tightly coupled changes and read-only code browsing are listed as cases to skip.
Helper scripts cover each operation: one creates or reuses a worktree for an existing local or remote branch, with an option to skip the fetch, another starts a new work-item branch with consistent naming from an issue, and another deletes a worktree, all sharing a common library script. Prerequisites are Git, PowerShell 5.1 or PowerShell Core, VS Code for opening the workspace automatically, and a repository that is not already inside a worktree.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 0ff7257. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 4 files in scripts/ (PowerShell), which the agent can run.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Git Worktree Manager loads about 2k tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 669 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from microsoft/WindowsAppSDK at commit 0ff7257, republished under its MIT licence (© microsoft). 669 words, ~2,048 tokens.
.claude/skills/worktree-manager/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.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.
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:
Parallel work avoids branch-switching chaos — Instead of constantly switching branches (which mixes up build artifacts, test results, and Copilot context), worktrees let you:
Anti-patterns — Do NOT use worktrees when:
This skill provides focused scripts for each worktree operation.
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/nullrefStart 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/999Remove 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 -KeepBranchUse Git directly to list worktrees:
git worktree list --porcelain./scripts/New-WorktreeFromIssue.ps1 -Number 1234 -Title "Fix null reference"./scripts/Delete-Worktree.ps1 -Pattern workitem/1234./scripts/New-WorktreeFromBranch.ps1 -Branch feature/login
./scripts/New-WorktreeFromBranch.ps1 -Branch feature/dashboard| 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/).
git fetch --all --prune periodically in the primary repo, not every worktree| 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 |
# 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>-Force flagAll implementation is self-contained within this skill folder:
Scripts (master source):
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 script tools/git/Delete-Worktree.cmd — delegates to skill's master scripttools/git/Worktree-Guidelines.md — quick reference for developers© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts) in .github/skills/worktree-manager of microsoft/WindowsAppSDK.
Open the folder on GitHubat commit 0ff7257
Git Worktree Manager next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Git Worktree Manager this skillmicrosoft/WindowsAppSDK | 4.7k | — | ~2k | Automated safety check: Pass | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Git Worktree Cleanuplobehub/lobehub | 83k | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Ccmanager Configkbwo/ccmanager | 1.3k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Roo Conflict Resolutionzgsm-ai/costrict | 4.4k | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Git Worktree IsolationjnMetaCode/superpowers-zh | 8.3k | 1 repos | ~982 | Automated safety check: Pass | MIT |
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
lobehub/lobehub
Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.
kbwo/ccmanager
Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.
zgsm-ai/costrict
Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context.
jnMetaCode/superpowers-zh
Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.
tisfeng/Easydict
起草、创建或汇报 Angular-style 本地 Git 提交。用于明确的提交交付;分支集成使用 worktree-rebase-merge,不 push。
microsoft/WindowsAppSDK
Generates GitHub Feature Area Status reports for the Windows App SDK repository, scoring issues so teams can see what needs attention in each area.
microsoft/WindowsAppSDK
Prepares the triage meeting summary for WinAppSDK Needs-Triage issues, with research-backed area suggestions, draft replies and a diff since the last triage.
Works with
Categories
Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment. The skill is for parallel development without constant branch switching. It recommends a new worktree when several self-contained issues should not share a branch, when step-by-step work with Copilot needs its own chat history, plan and atomic commits, or when parallel items need independent build and test results.
Git Worktree Manager fits situations like: fixing several unrelated issues in separate branches at the same time; giving a Copilot session its own isolated worktree and chat history; running builds and tests for parallel work items independently; opening an existing branch in its own worktree.
Run `npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a claude-code`. Or copy the skill folder (.github/skills/worktree-manager in microsoft/WindowsAppSDK) into .claude/skills/worktree-manager in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a codex`. Or copy the skill folder (.github/skills/worktree-manager in microsoft/WindowsAppSDK) into .agents/skills/worktree-manager in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/WindowsAppSDK --skill worktree-manager -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree-manager, .gemini/skills/worktree-manager, .github/skills/worktree-manager and .opencode/skills/worktree-manager in your project.
Going by SKILL.md and its folder, Git Worktree Manager needs PowerShell for the scripts in its folder and the command-line tools its instructions call (git). Our summary lists: Git; PowerShell 5.1 or PowerShell Core; VS Code, for opening the worktree automatically.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Git Worktree Manager is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Git Worktree Manager: Finishing a Development Branch (obra/superpowers, 296k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars), Ccmanager Config (kbwo/ccmanager, 1.3k stars) and Roo Conflict Resolution (zgsm-ai/costrict, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/WindowsAppSDK, which has 4,697 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.
Source: microsoft/WindowsAppSDK on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.