Git Worktree

🌐Community
by kimny1143 · vlatest · Repository

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.

1

Run in terminal (recommended)

terminal
claude mcp add kimny1143-git-worktree npx -- -y @trustedskills/kimny1143-git-worktree
2

Or manually add to ~/.claude/settings.json

~/.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 main branch 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-auth based on the current branch so I can develop authentication logic separately."
  • "Check out a worktree from commit abc123 to 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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
kimny1143
Installs
30

🌐 Community

Passed automated security scans.