Using Git Worktrees
Zenobi-US efficiently manages parallel development branches using Git worktrees for streamlined backend workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add zenobi-us-using-git-worktrees npx -- -y @trustedskills/zenobi-us-using-git-worktrees
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"zenobi-us-using-git-worktrees": {
"command": "npx",
"args": [
"-y",
"@trustedskills/zenobi-us-using-git-worktrees"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
The using-git-worktrees skill enables AI agents to manage parallel development branches within a single repository without cluttering the main directory structure. It automates the creation, switching, and cleanup of worktrees, allowing seamless context isolation for distinct tasks or experiments.
When to use it
- Isolate experimental feature development from stable production code in the same project.
- Run multiple concurrent workflows on different versions of a codebase simultaneously.
- Maintain clean primary branches while testing hotfixes or alternative implementations.
- Streamline CI/CD pipelines by managing temporary build environments via worktrees.
Key capabilities
- Automatically creates new git worktrees based on specified branch names.
- Switches between existing worktrees to change the active working directory.
- Cleans up and removes unused or completed worktrees to free up space.
- Manages the lifecycle of parallel development contexts within a single repository.
Example prompts
- "Create a new worktree named
feature-authbased on the current branch for testing login logic." - "Switch to the
hotfix-securityworktree to apply emergency patches without affecting other tasks." - "List all active worktrees and remove any that haven't been modified in over 24 hours."
Tips & gotchas
Ensure you have write permissions to the target repository before attempting to create or modify worktrees. Be mindful of disk space usage, as each worktree maintains a full copy of the working directory files alongside the shared object database.
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.