Git Worktree
Creates isolated Git worktrees to safely experiment with branches without affecting the main repository.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add kimny1143-git-worktree npx -- -y @trustedskills/kimny1143-git-worktree
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"kimny1143-git-worktree": {
"command": "npx",
"args": [
"-y",
"@trustedskills/kimny1143-git-worktree"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill enables AI agents to utilize Git worktrees, allowing them to maintain multiple working directories for a single repository simultaneously. It facilitates parallel development by letting agents check out different branches or commits in separate folders without cluttering the main workspace.
When to use it
- Parallel Feature Development: Develop new features on one branch while keeping the
mainbranch stable and untouched in another directory. - Bug Isolation: Create a temporary worktree from a specific commit to reproduce and fix bugs without affecting the current active branch.
- Experimentation: Test multiple experimental changes or alternative implementations side-by-side before deciding which to merge.
- Code Review Prep: Prepare distinct branches for review in separate directories while maintaining a clean primary workspace.
Key capabilities
- Creates new worktrees from existing branches or specific commits
- Manages multiple working directories linked to the same repository
- Allows independent file modifications across different worktrees
- Supports switching between worktrees without losing local changes
Example prompts
- "Create a new git worktree at
./feature-authbased on the current branch so I can develop authentication logic separately." - "Check out a worktree from commit
abc123to investigate why a specific build is failing without modifying my current code." - "List all available worktrees for this repository and show me which branches they are tracking."
Tips & gotchas
Ensure your local Git configuration supports worktrees if you encounter initialization errors. Always commit changes in a worktree before switching away to prevent accidental loss of untracked modifications when the parent directory is cleaned up.
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.