In short.
Using Git Worktrees is a workspace-management skill for coding assistants and their users, but its strict workspace checks can stop a task before changes begin. It separates the need for a branch from the need for another checkout, requires host-native workspace handling on managed hosts, and permits shell creation only on positively identified non-managed hosts. Its procedures are documented; execution, host compatibility and cleanup outcomes remain untested.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete selected folder skills/using-git-worktrees at commit ab3e7710496e638823162d6aa46c3ca525b0acd2, containing SKILL.md, plus the repository-root LICENSE outside that folder. Other Aegis skills, including finishing-a-development-branch, and external host implementations are excluded. Installation, Git commands, native handoffs, baseline verification and cleanup behavior remain untested.
The overview
identity
Using Git Worktrees is the using-git-worktrees skill in GanyuanRan/Aegis, located at skills/using-git-worktrees/SKILL.md. A Git worktree is another working directory for the same repository. This document tells a coding assistant when another checkout is justified, how to verify its relationship to the current task, and who must handle cleanup.
assessment
The skill is most useful when concurrent branch work, unrelated local changes or repository requirements make checkout ownership important. Its distinctive strength is checking both Git state and the host's task-to-workspace relationship. The tradeoff is additional inspection and recordkeeping, with mandatory stops when ownership or host binding cannot be established. Practical effectiveness is unassessed.
users
The intended users are coding assistants and the developers directing them. It applies when another branch must remain checked out, unrelated changes prevent safe branch switching, or the user or repository requires a worktree. Beginners will need some familiarity with branches, detached HEAD states and local changes; experienced developers get detailed rules for managed workspaces and cleanup ownership.
capabilities
The skill covers repository inspection, worktree necessity, safe placement, creation or reuse, project-specific setup, baseline verification and handoff. It limits creation to one task-owned worktree and keeps assistants working on the same task in a shared workspace.
It prohibits automatic stashing, resetting, cleaning, broad staging and committing during initial inspection. An in-repository location must already be ignored; the assistant must not edit .gitignore merely to accommodate a worktree. Cleanup responsibility stays with the creating coordinator until cleanup is proved or ownership is explicitly transferred.
Using it
requirements
The procedure assumes a Git repository and an assistant able to inspect Git state, repository instructions and trusted host information. Managed environments need verifiable task binding and, when creating or moving workspaces, a native worktree or handoff capability. Missing host metadata or tools do not establish permission to use shell creation. Minimum Git versions, supported assistant versions and model requirements are unspecified.
mechanism
The assistant first classifies the host as managed, non-managed or unknown using trusted evidence. Only positive evidence of non-managed semantics permits the generic git worktree add path. Unknown classification blocks that fallback; a directory name, missing tool or command-specific working directory is insufficient evidence.
On managed hosts, the skill permits reuse with trusted binding evidence or requires the native workspace lifecycle. Before task-content or Git-history writes, the trusted task workspace, default command working directory, intended Git root and intended HEAD plus branch state must agree. A host-intended detached HEAD is acceptable. Path comparison must account for the host's path semantics.
setup
The file does not provide an installation command or host-specific skill-loading instructions. Before mutations, its procedure records repository state, local changes, active Git operations and git worktree list --porcelain, then reads relevant AGENTS.md, CLAUDE.md and repository conventions. Conflicts, active Git operations or an unexplained detached HEAD require a stop.
Once workspace verification is complete, setup follows the project's own documentation and scripts. A package manifest alone does not justify dependency installation. The skill calls for the smallest relevant baseline verification and requires preserving the worktree and reporting the exact failure if setup or verification fails.
example
Suppose a release branch must remain checked out while an assistant fixes a bug on an existing fix-login branch. On a positively identified non-managed host, the procedure would establish ownership and an exact safe path, use git worktree add <exact-path> fix-login, then inspect the new checkout's HEAD, branch and status and perform the project-required baseline check. On a managed host, native creation or handoff and binding verification replace shell creation. This is a hypothetical example; no commands were executed.
Assessment & evidence
limitations
The resource supplies written instructions; following its safeguards depends on the assistant and host. It cannot provide missing native workspace capabilities or prove task binding from Git output alone. Runtime behavior, installation success, host compatibility and cleanup success are untested.
The document refers to finishing-a-development-branch for later integration and cleanup decisions. That companion skill is outside the selected folder and has not been assessed here. The available evidence contains no measured reliability, speed or error-reduction results.
reasoning
The central design choice is separating a valid Git checkout from a checkout correctly assigned to the assistant's task. Git can identify a worktree without proving that the host will run the task there. Requiring the task workspace, default working directory, Git root and HEAD to agree addresses that gap. A reduction in misplaced edits is a plausible benefit of this design, but it has not been demonstrated.
alternatives
The document's preferred alternatives are continuing in the current workspace or reusing a suitable existing worktree. Creating a branch is a separate decision and needs its own justification. Task complexity, planning, additional assistants or a main/master branch name do not justify another checkout. Other worktree skills and products are unassessed.
evidence
The original resource folder is [https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees]. The assessed document is pinned to commit ab3e7710496e638823162d6aa46c3ca525b0acd2 at [https://raw.githubusercontent.com/GanyuanRan/Aegis/ab3e7710496e638823162d6aa46c3ca525b0acd2/skills/using-git-worktrees/SKILL.md].
The complete selected folder contains one SKILL.md in this snapshot, accompanied by the repository-root LICENSE. These sources establish the documented procedure and redistribution terms. They do not establish successful execution or behavior on any particular host.
Access & freshness
costs
The MIT License grants its permissions free of charge. The skill specifies no assistant subscription, model usage, hosting or execution prices, so total operating cost is unknown. It also provides no measurements of time, storage or token overhead.
rights
The accompanying repository MIT License permits use, modification, redistribution, sublicensing and sale, provided its copyright and permission notices remain in copies or substantial portions. It names Jesse Vincent for 2025 and Ganyuan Ran for 2025–2026, and disclaims warranties and liability. The notice is available at [https://raw.githubusercontent.com/GanyuanRan/Aegis/ab3e7710496e638823162d6aa46c3ca525b0acd2/LICENSE].
freshness
The source snapshot is timestamped 17 November 2026 at 02:21:08 UTC and identifies commit ab3e7710496e638823162d6aa46c3ca525b0acd2. That timestamp does not establish the document's last modification date. Later revisions, current maintenance activity and compatibility with later host changes are unknown.
actions
Before adoption, check how your assistant loads skills, whether its host exposes trusted workspace binding, and whether the referenced finishing-a-development-branch skill is available. Review repository instructions and identify who will own cleanup. A first evaluation should verify workspace agreement, preservation of existing changes and cleanup behavior in a disposable repository; those outcomes remain unassessed.
