Using Git Worktrees
Efficiently manages multiple parallel development branches using Git worktrees for faster experimentation and reduced conflicts.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add sickn33-using-git-worktrees npx -- -y @trustedskills/sickn33-using-git-worktrees
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"sickn33-using-git-worktrees": {
"command": "npx",
"args": [
"-y",
"@trustedskills/sickn33-using-git-worktrees"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill enables an AI agent to manage multiple Git worktrees, allowing users to work on different branches or repositories simultaneously from a single working directory. It provides the ability to clone, switch between, and manage separate Git environments efficiently without needing to navigate through multiple directories.
When to use it
- You need to work on multiple branches of a project at the same time.
- You're collaborating on several related projects and want isolated Git environments for each.
- You are debugging or testing changes across different versions of a codebase simultaneously.
Key capabilities
- Clone and manage multiple Git repositories in parallel.
- Switch between worktrees without changing directories.
- Isolate branch-specific changes to avoid conflicts.
Example prompts
- "Set up separate worktrees for the
mainandfeature-xbranches of my project." - "Clone a new repository into a worktree so I can test it alongside my current code."
- "Switch to the
devworktree to review recent changes without affecting themainbranch."
Tips & gotchas
- Ensure Git version 2.23 or higher is installed, as worktrees require this feature.
- Worktrees are tied to a specific repository; avoid using them across unrelated projects to prevent confusion.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.