Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Git Worktree Agent

    1

    Safely manage isolated Git worktrees for parallel development, branch integration, and risk-free repository cleanup.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Git Worktree Agent

    Git Worktree Agent

    Example session with this skill installed

    I need to start a new feature called 'api-refactor' based on the 'main' branch, but I want to keep my current work in this directory running. Set up a worktree for it.

    • Read your context and instructions
    • Compiled the git worktree agent

    I have inspected the repository state. There are no existing worktrees at the proposed path, and the branch name is available. I have prepared a plan to isolate the api-refactor work.

    Git Worktree Plan

    ActionCommandTarget PathBranchStatus
    Inspectgit worktree listN/AN/ACOMPLETED
    Creategit worktree add ../api-refactor main -b api-refactor../api-refactorapi-refactorPENDING APPROVAL
    Verifycd ../api-refactor && git status../api-refactorapi-refactorNOT RUN
    Auditgit branch -vvN/Aapi-refactorNOT RUN

    Safety Check:

    • Path ../api-refactor does not exist: Confirmed
    • Branch api-refactor does not exist: Confirmed
    • Current directory state: Dirty (stashed changes not required due to worktree)

    Next steps

    1. Run the git worktree add command listed above to initialize the new workspace.
    2. Navigate to the new directory to begin the refactor without affecting your current process.
    3. Run git worktree list to verify both environments are tracking correctly.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Managing parallel features in a single repository often leads to messy stashes or risky branch switching that breaks build artifacts. This skill manages isolated Git worktrees, allowing for concurrent development without context switching overhead or directory collisions.

    What it does

    • Parallel workspace management isolates features or bug fixes into dedicated directories to avoid git stash cycles.
    • Safety-first cleanup prevents the accidental deletion of unmerged branches or worktrees containing dirty files.
    • Conflict detection analyzes merge-bases and compares branches to surface potential integration issues before they happen.
    • Command planning generates step-by-step Git execution plans for approval to ensure no destructive operations occur.
    • State auditing tracks worktree paths, branch associations, and pending changes across the entire local repository.

    How it works

    1. Inspection of the current repository state including git status, branch list, and existing worktree paths.
    2. Conflict checking to ensure the target branch and directory name do not collide with existing assets.
    3. Plan generation where the agent proposes specific git worktree add commands for user verification.
    4. Execution and validation of the worktree setup, checking that the environment is ready for isolated development.
    5. Integration and pruning to safely merge changes and remove directories only after verifying the work is committed.

    Frameworks & tools

    This skill works with any standard Git installation. It relies on git worktree subcommands and is compatible with terminal-based workflows, CI environments, and IDEs like VS Code or Cursor.

    Why this beats prompting it yourself

    Generic prompts often suggest risky flags like --force or forget to check for untracked files before pruning. This skill follows a strict safety protocol that verifies merge status and directory availability, preventing accidental data loss during complex parallel workflows.

    Use cases

    • Manage a hotfix in a separate directory while keeping a long-running feature build intact.
    • Run multiple versions of an application side-by-side for manual comparison or testing.
    • Isolate an automated AI agent's workspace to prevent it from overwriting your local staging area.
    • Perform safe repository audits to find and prune abandoned feature branch directories.

    Known limitations

    Requires Git 2.5 or newer. It will not execute commands without explicit shell access and user approval. It does not manage submodules unless specifically instructed.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scanned

    Verified clean 2 days ago

    • Passed all security checks, Safe to install

    Requires

    Git

    Listed2 days ago

    What's inside

    Frequently Asked Questions