using-git-worktrees SKILL.md skillA

using-git-worktrees from ganyuanran/aegis is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add ganyuanran/aegis/using-git-worktrees@git:20260827.661bec4

Pins git:20260827.661bec4 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
ganyuanran/aegis
Path
skills/using-git-worktrees/SKILL.md
Versions recorded
5
Latest version
git:20260827.661bec4, committed Aug 27, 2026
First version recorded
May 10, 2026
Size
7,779 bytes
Repository stars
1,417
License
MIT

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.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file 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
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add ganyuanran/aegis/using-git-worktrees@sha256:23e832a61b1b5b23

The line at the top of this page pins the label git:20260827.661bec4, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_z4e4fqdygksrlw3b.svg)](https://markdownregistry.com/a/art_z4e4fqdygksrlw3b)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 5 versions of this file, between May 10, 2026 and Aug 27, 2026, about one every 27 days.

versioncommittedcommitsizeaudit
git:20260827.661bec4 latest2026-08-27 661bec4 7,779 BA view · diff
git:20260801.2da70402026-08-01 2da7040 4,429 BA view · diff
git:20260731.818d42f2026-07-31 818d42f 4,134 BA view · diff
git:20260723.88b8ec92026-07-23 88b8ec9 5,564 BA view · diff
git:20260510.b9bb3172026-05-10 b9bb317 5,562 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the 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,417 stars · license MIT · pushed 2026-11-04 · 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 AI assistant 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.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from ganyuanran/aegis

AGENTS.md AGENTS.md file
ganyuanran/aegis · AGENTS.md
git:20261011.c8e05b4 · audit A · 1,417 stars
CLAUDE.md CLAUDE.md file
ganyuanran/aegis · CLAUDE.md
git:20260813.0c73270 · audit A · 1,417 stars
anti-entropy-governance SKILL.md skill
ganyuanran/aegis · skills/anti-entropy-governance/SKILL.md · Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or…
git:20260927.6d97ed0 · audit A · 1,417 stars
brainstorming SKILL.md skill
ganyuanran/aegis · skills/brainstorming/SKILL.md · Use when defining ambiguous or high-complexity new features, product behavior, UI/component design, architecture…
git:20261104.8dcabf5 · audit A · 1,417 stars
communicating-concisely SKILL.md skill
ganyuanran/aegis · skills/communicating-concisely/SKILL.md · Use when the user asks for caveman mode, fewer tokens, brief responses, compressed communication, or otherwise…
git:20260723.88b8ec9 · audit A · 1,417 stars
dispatching-parallel-agents SKILL.md skill
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…
git:20260920.8265b5c · audit A · 1,417 stars
establishing-project-context SKILL.md skill
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…
git:20260809.f62395b · audit A · 1,417 stars
executing-plans SKILL.md skill
ganyuanran/aegis · skills/executing-plans/SKILL.md · Use when executing a written implementation plan across sessions or with review checkpoints. Small or single-slice…
git:20261001.ed3a0a7 · audit A · 1,417 stars
finishing-a-development-branch SKILL.md skill
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…
git:20261010.8d5b88e · audit A · 1,417 stars
first-principles-review SKILL.md skill
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…
git:20261025.21787f7 · audit A · 1,417 stars
goal-framing SKILL.md skill
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…
git:20260723.88b8ec9 · audit A · 1,417 stars
long-task-continuation SKILL.md skill
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…
git:20261025.21787f7 · audit A · 1,417 stars

Every file in ganyuanran/aegis

Other files named using-git-worktrees

using-git-worktrees SKILL.md skill
obra/superpowers · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
git:20260724.bc86802 · audit A · 314,583 stars
using-git-worktrees SKILL.md skill
jnmetacode/superpowers-zh · skills/using-git-worktrees/SKILL.md · 当需要开始与当前工作区隔离的功能开发,或在执行实现计划之前使用——通过原生工具或 git worktree 回退机制确保隔离工作区存在
v1.0.0 · audit A · 8,494 stars
using-git-worktrees SKILL.md skill
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.
git:20260601.da7723a · audit A · 1,896 stars
using-git-worktrees SKILL.md skill
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 -…
git:20260802.1479e32 · audit A · 797 stars
using-git-worktrees SKILL.md skill
xu123-bob/baize · agent/skills/superpowers/5.1.0/skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
git:20260912.5e131e8 · audit A · 617 stars
using-git-worktrees SKILL.md skill
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…
git:20261024.21f0bb2 · audit A · 450 stars
using-git-worktrees SKILL.md skill
ibrahim-3d/orchestrator-supaconductor · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
git:20260312.c37221c · audit A · 381 stars
using-git-worktrees SKILL.md skill
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 -…
git:20260204.611bfd1 · audit A · 253 stars

Browse by kind, by grade A, or by owner.