using-git-worktrees is agent-read markdown (skill) from ganyuanran/aegis: Use when a coding task needs a concurrent checkout, unrelated dirty state blocks safe branch switching, or the user or repository explicitly requires a worktree..
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# Using Git Worktrees
## Overview
A worktree is an exception for simultaneously checking out another Git history,
not a general safety badge. Prefer the current workspace and reuse an existing
suitable worktree. A branch decision and a worktree decision are separate.
**Core principle:** create only with necessity and ownership evidence; pair every
created worktree with a cleanup path.
**Announce at start:** explain which concrete checkout conflict requires a
worktree.
## Step 0: Environment Detection
Before mutation, record the repository root, `HEAD`, branch/detached state,
staged/unstaged/untracked paths, active Git operations, and:
```bash
git worktree list --porcelain
```
Classify the current host surface's task/chat-bound managed workspace semantics
as `managed`, `non-managed`, or `unknown`. Use trusted host/session context, an
explicit host contract, or a host-native lifecycle result; do not infer the
classification from a product name, directory prefix, command-level `workdir`,
missing tool, or absent metadata. `non-managed` requires positive evidence that
the current surface lacks task-bound managed semantics. When the host exposes
…
Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
A 17 of 17 checks passed. Deterministic, no model, same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (7779 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
ganyuanran/aegis · 1,280 stars · license MIT · pushed 2026-09-24 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_z4e4fqdygksrlw3b
GET https://markdownregistry.com/api/v1/resolve?ref=ganyuanran/aegis/using-git-worktrees
GET https://markdownregistry.com/api/v1/blob/23e832a61b1b5b236e1b499fda4f184e72bce6c133c18d2977649bd3b443367f
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
ganyuanran/aegis · skills/brainstorming/SKILL.md · Use when defining ambiguous or high-complexity new features, product behavior, UI/component design, architecture…
ganyuanran/aegis · skills/communicating-concisely/SKILL.md · Use when the user asks for caveman mode, fewer tokens, brief responses, compressed communication, or otherwise…
ganyuanran/aegis · skills/dispatching-parallel-agents/SKILL.md · Use when facing 2+ independent tasks without a written plan, with no conflicting shared mutable state or sequential…
ganyuanran/aegis · skills/establishing-project-context/SKILL.md · Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or…
ganyuanran/aegis · skills/executing-plans/SKILL.md · Use when executing a written implementation plan across sessions or with review checkpoints. Small or single-slice…
ganyuanran/aegis · skills/finishing-a-development-branch/SKILL.md · Use when verified work needs integration or cleanup of an existing task-created branch/worktree, or the user explicitly…
ganyuanran/aegis · skills/first-principles-review/SKILL.md · Use when asked for first-principles or Occam's-razor review, or when high-risk decisions involve competing constraints…
ganyuanran/aegis · skills/goal-framing/SKILL.md · Use when the user explicitly sets an Aegis goal with /aegis-goal, Aegis goal:, or asks to define goal, success…
ganyuanran/aegis · skills/long-task-continuation/SKILL.md · Use when a task is multi-step, may span context resets or sessions, uses subagents, or risks losing state before…
obra/superpowers · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
a5c-ai/babysitter · library/methodologies/superpowers/skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans.
coco-research/coco · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
jamditis/claude-skills-journalism · superjawn/skills/using-git-worktrees/SKILL.md · Creates isolated git worktrees with smart directory selection and safety checks. Use when starting isolated feature…
ed3dai/ed3d-plugins · plugins/ed3d-plan-and-execute/skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
arbiterforge/codearbiter · core/surface/skills/using-git-worktrees/SKILL.md · OPTIONAL per-task isolation for autonomous parallel work. Routed to only on explicit opt-in by…
arbiterforge/codearbiter · plugins/ca/skills/using-git-worktrees/SKILL.md · OPTIONAL per-task isolation for autonomous parallel work. Routed to only on explicit opt-in by…