Migrate Core Code to Submodules
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
A skill your agent uses when a coding task needs a concurrent checkout, unrelated dirty state blocks safe branch switching, or the user or repository explicitly requires a worktree.
$ npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install GanyuanRan/Aegis using-git-worktrees --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/GanyuanRan/Aegis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/using-git-worktrees .claude/skills/using-git-worktrees && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "using-git-worktrees" agent skill from https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees into .claude/skills/using-git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-git-worktrees", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktreesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install GanyuanRan/Aegis using-git-worktrees --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GanyuanRan/Aegis.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/using-git-worktrees .agents/skills/using-git-worktrees && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "using-git-worktrees" agent skill from https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees into .agents/skills/using-git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-git-worktrees", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install GanyuanRan/Aegis using-git-worktrees --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GanyuanRan/Aegis.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/using-git-worktrees .cursor/skills/using-git-worktrees && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "using-git-worktrees" agent skill from https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees into .cursor/skills/using-git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-git-worktrees", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/GanyuanRan/Aegis.git --path skills/using-git-worktrees--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install GanyuanRan/Aegis using-git-worktrees --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GanyuanRan/Aegis.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/using-git-worktrees .gemini/skills/using-git-worktrees && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "using-git-worktrees" agent skill from https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees into .gemini/skills/using-git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-git-worktrees", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install GanyuanRan/Aegis using-git-worktreesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/GanyuanRan/Aegis.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/using-git-worktrees .github/skills/using-git-worktrees && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "using-git-worktrees" agent skill from https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees into .github/skills/using-git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-git-worktrees", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install GanyuanRan/Aegis using-git-worktrees --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GanyuanRan/Aegis.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/using-git-worktrees .opencode/skills/using-git-worktrees && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "using-git-worktrees" agent skill from https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees into .opencode/skills/using-git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-git-worktrees", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
using-git-worktreesA skill your agent uses when a coding task needs a concurrent checkout, unrelated dirty state blocks safe branch switching, or the user or repository explicitly requires a worktree.
Using Git Worktrees is an agent 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.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Git worktrees. The repository describes itself as: Make AI coding agents architecture-aware: baseline-first, evidence-verified, drift-checked, and safe across long tasks. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4edf34e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitnpmcargopippoetryFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, npm and pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Using Git Worktrees loads about 1.9k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 1,031 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from GanyuanRan/Aegis at commit 4edf34e, republished under its MIT licence (© GanyuanRan). 1,031 words, ~1,945 tokens.
.claude/skills/using-git-worktrees/SKILL.md (or your agent's skills folder).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.
Before mutation, record the repository root, HEAD, branch/detached state,
staged/unstaged/untracked paths, active Git operations, and:
git worktree list --porcelainClassify 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
workspace fields, record the task workspace and the command's default cwd
without a per-command directory override.
Stop on unresolved conflicts, an active merge/rebase/cherry-pick/revert/bisect, or an unexplained detached HEAD. A detached HEAD is acceptable only when trusted host binding evidence identifies it as the intended state of the current managed worktree; Codex-managed worktrees, for example, start detached by default. Preserve user state: no automatic stash, reset, clean, broad staging, or commit.
Before deciding necessity or placement, read the smallest relevant project
AGENTS.md, CLAUDE.md, current authority, and existing worktree convention.
Repository policy may require or forbid isolation and owns any approved
in-repo location; do not discover that policy after creating the checkout.
Create at most one task-owned worktree only when one of these is true:
Task complexity, planning, TDD, use of subagents, or a main/master branch
name is not sufficient. Same-task subagents share one workspace; do not create
per-subagent or nested worktrees. If independent history is unnecessary, do not
create a branch either.
Record: reason, branch, exact path, creating coordinator, and expected cleanup event. If the owner or cleanup condition is unknown, stop before creation.
Use an existing repository convention only when the target directory is already
ignored (git check-ignore). Never edit or commit .gitignore solely to host a
worktree. If no safe in-repo convention exists, use a task-specific external
user-level temporary directory outside the repository. Resolve and verify the
exact path before creation; do not target a broad home, workspace, or repo root.
Prefer reusing an existing branch carrying the same goal. Create a branch only when the approved Git lifecycle requires independent history.
When the host surface declares task/chat-bound managed workspaces, use its native Worktree/Handoff lifecycle instead of shell creation. Reuse the current task only when trusted host evidence says it is already bound to the intended workspace. If the native operation creates or moves work into another task, continue only in that bound task.
After the native lifecycle operation, or immediately when entering/reusing an already-bound managed workspace, and before the first task content or Git history write, read back one joint postcondition:
cwd without a command-level directory override;HEAD and branch/detached state.All four must describe the same execution environment. git worktree list, a
managed-looking path, or a per-command workdir proves only part of that
postcondition. If native creation/handoff is unavailable, only UI-driven, or
cannot be verified, stop before shell worktree creation or task content/history
writes and give the user the host-native re-entry action. Do not silently fall
back on git worktree add.
Compare resolved path identity using host-appropriate semantics, not raw path
strings. The default cwd may equal the worktree root or be inside it; running
Git from that default cwd must resolve to the intended worktree root.
An intended host-managed detached HEAD satisfies the Git-state component; do
not create a branch merely to make that state look like a generic checkout.
If an unbound manual worktree already exists, preserve it and report its exact
path, HEAD, branch, status, and ownership evidence. Dirty, untracked, or
ownership-unknown state is not auto-migrated, deleted, stashed, reset, or
overwritten. A later commit/patch transfer follows normal Git authorization and
must be verified in the new bound task before cleanup is offered.
Use the shell path below only when trusted evidence positively classifies the
current host/CLI surface as non-managed. An unknown classification fails
closed; an absent native tool or missing binding metadata is not
generic-fallback evidence.
# Existing branch
git worktree add <exact-path> <branch>
# New independently justified branch
git worktree add -b <branch> <exact-path> <start-point>Read back git worktree list --porcelain, the new worktree's HEAD/branch, and
its status. Do not use force flags. A command-level workdir may target this
checkout on a generic host, but it never proves managed task binding.
Read the project's install docs, lockfiles, and existing setup scripts. Run
only setup the project explicitly requires. Do not infer npm install,
cargo build, pip install, poetry install, or dependency downloads merely
from manifest presence.
Run the smallest relevant baseline verification. If setup or tests fail, report the exact failure and preserve the worktree; do not hide it by mutating unrelated files.
Report the exact path, branch, start HEAD, baseline result, owner, and cleanup
trigger. The creating coordinator remains responsible until it proves cleanup
or explicitly hands ownership off.
Use finishing-a-development-branch after the task commit or integration
decision. A worktree may usually be removed while its unmerged branch remains;
an open PR does not require a permanent checkout.
Never:
.gitignore merely to make worktree creation possible;workdir as proof of
managed task binding;Called conditionally by planning/execution workflows only after the necessity
decision. Pairs with finishing-a-development-branch for evidence-led cleanup.
© GanyuanRan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/using-git-worktrees of GanyuanRan/Aegis.
Open the folder on GitHubat commit 4edf34e
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in GanyuanRan/Aegis, which our catalogue first saw on October 7, 2026.
Using Git Worktrees next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Using Git Worktrees this skillGanyuanRan/Aegis | 1.3k | 1 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Migrate Core Code to Submodulestinyhumansai/openhuman | 41k | — | ~2.6k | Automated safety check: Pass | GPL-3.0 | |
| Nagentdavidondrej/skills | 4.1k | — | ~1.7k | Automated safety check: Notes | MIT | |
| Git Worktree IsolationjnMetaCode/superpowers-zh | 8.3k | 1 repos | ~982 | Automated safety check: Pass | MIT | |
| WorktreeAgentsMesh/AgentsMesh | 2.4k | — | ~553 | Automated safety check: Notes | Custom licence | |
| Cursor Composer Task DelegateChachamaru127/claude-code-harness | 3.2k | — | ~4.4k | Automated safety check: Notes | MIT |
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
davidondrej/skills
Launch a new bb worker thread with the right project, model, worktree, and task brief.
jnMetaCode/superpowers-zh
Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.
AgentsMesh/AgentsMesh
Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.
Chachamaru127/claude-code-harness
Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.
k8zdev/k8z
Automate git worktree creation and copy private files (not tracked in git) to new workdirs.
GanyuanRan/Aegis
A skill your agent uses when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically…
GanyuanRan/Aegis
A skill your agent uses when executing a written implementation plan across sessions or with review checkpoints.
GanyuanRan/Aegis
A skill your agent uses when asked for first-principles or Occam's-razor review, or when high-risk decisions involve competing constraints, fallback growth, duplicate owners, or architecture…
GanyuanRan/Aegis
A skill your agent uses when the user explicitly sets an Aegis goal with /aegis-goal, Aegis goal:, or asks to define goal, success evidence, stop condition, or task boundaries before work.
GanyuanRan/Aegis
A skill your agent uses when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling.
GanyuanRan/Aegis
A skill your agent uses when the user asks to create, write, update, amend, supersede, or evaluate an ADR, architecture decision record, durable architecture decision, decision log, or baseline sync…
Categories
A skill your agent uses when a coding task needs a concurrent checkout, unrelated dirty state blocks safe branch switching, or the user or repository explicitly requires a worktree. Using Git Worktrees is an agent 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.
Using Git Worktrees fits situations like: A coding task needs a concurrent checkout; unrelated dirty state blocks safe branch switching; repository explicitly requires a worktree.
Run `npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a claude-code`. Or copy the skill folder (skills/using-git-worktrees in GanyuanRan/Aegis) into .claude/skills/using-git-worktrees in your project. Claude Code loads it when a task matches its description.
Run `npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a codex`. Or copy the skill folder (skills/using-git-worktrees in GanyuanRan/Aegis) into .agents/skills/using-git-worktrees in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GanyuanRan/Aegis --skill using-git-worktrees -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/using-git-worktrees, .gemini/skills/using-git-worktrees, .github/skills/using-git-worktrees and .opencode/skills/using-git-worktrees in your project.
Going by SKILL.md and its folder, Using Git Worktrees needs the command-line tools its instructions call (git, npm, cargo, pip and poetry). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Its commands use git, npm and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Using Git Worktrees is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Using Git Worktrees: Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Nagent (davidondrej/skills, 4.1k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars) and Worktree (AgentsMesh/AgentsMesh, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
GanyuanRan (a GitHub user) maintains it in GanyuanRan/Aegis, which has 1,322 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 3, 2026.
Source: GanyuanRan/Aegis on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.