More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Git Agent Lock — Part 3: Isolated Worktree Manager

    1

    Dynamic Git worktree provisioning and branch isolation for parallel subagents with zero workspace collisions.

    Free

    Security scanned
    Git Agent Lock — Part 3: Isolated Worktree Manager

    Git Agent Lock — Part 3: Isolated Worktree Manager

    Example session with this skill installed

    Create an isolated git worktree for subagent-stripe-worker on branch feat/stripe-checkout.

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

    ✅ Worktree created at /Users/developer/project/.agent_worktrees/subagent-stripe-worker (branch: feat/stripe-checkout, base: HEAD)

    ==================================================
    🌿 GIT WORKTREE MANAGER — Active Subagent Worktrees (v1.0.0)

    Active Agent Worktrees: 1

    🌿 #1 Agent: [subagent-stripe-worker]
    Branch: refs/heads/feat/stripe-checkout
    Path: /Users/developer/project/.agent_worktrees/subagent-stripe-worker

    =================================================

    Next Steps:

    Subagent is isolated in its private worktree with dedicated Git index. Main working copy remains completely clean and unaffected.

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

    About this skill

    Git Agent Lock — Part 3: Isolated Worktree Manager

    When running multiple subagents in parallel (Claude Code subagents, Cursor background composers, Antigravity swarms), sharing a single working directory causes constant merge collisions, corrupted files, and fatal .git/index.lock errors.

    Git Agent Lock Part 3 provisions dynamic, isolated Git worktrees (.agent_worktrees/<agent-id>) with dedicated branches, enabling flawless multi-agent parallelism.

    ⚡ Key Capabilities:

    • Dynamic Worktree Allocation: Spins up isolated working directories and dedicated branches for subagents in milliseconds.
    • Index Lock Elimination: Each subagent operates on its own private Git staging index, preventing .git/index.lock collisions.
    • Safe Lifecycle & Pruning: Automated cleanup commands safely dismantle scratch worktrees without leaving dangling branches.
    • JSON Registry: Full JSON output for orchestrator scripts to monitor active subagent workspaces.

    📦 What's Included:

    • scripts/git_worktree_manager.py — Worktree management CLI and API
    • scripts/test_git_worktree_manager.py — Automated unit test suite (100% pass)
    • references/multi_agent_worktree_guide.md — Architectural guide for multi-agent worktrees
    • Universal SKILL.md — Lean Core architecture (< 40 lines)

    🚀 Upgrade Path to Git Agent Lock Pro Suite:

    Part 3 provides worktree isolation. For unified atomic locking, pre-commit staging gates, deadlock graph detection, and causal forensics integration, check out the Git Agent Lock Pro Suite ($29) on Agensi.

    🔒 100% Local-First & Zero Telemetry

    Runs 100% locally on your machine via standard Git and Python. Zero network calls, zero tracking.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Requires Git 2.5+. Requires filesystem permissions to create directories. Does not handle remote branch synchronization automatically.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 16 days ago

    • Free with an Agensi account

    Software
    GitPython 3

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Allocates local git worktrees in .agent_worktrees with zero cloud network calls.

    Listed16 days ago
    Updated11 days ago

    What's inside

    Frequently Asked Questions

    This skill eliminates `.git/index.lock` errors and file collisions by provisioning dedicated, isolated worktree directories for each parallel subagent, allowing them to work concurrently without interfering with each other's git state.

    It is compatible with any agent framework or CI/CD pipeline that runs on Python 3 and has access to a local filesystem with Git 2.5+ installed.

    You receive the complete Python-based CLI wrapper, the integration logic for git worktree primitives, and documentation on how to incorporate the 'create', 'list', and 'cleanup' commands into your agent's workflow.

    No, the skill includes automated cleanup and metadata pruning functions that safely remove temporary directories and detach worktrees once a subagent completes its task, keeping your repository clean.

    Yes, as long as the subagent has the necessary filesystem permissions to create directories outside the primary repository root, it can manage worktrees across any branch or release tag.

    New in Agents & Orchestration

    Free