Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ganyuanran/aegis/using-git-worktreesnpx skills add GanyuanRan/Aegis --skill using-git-worktreesgit clone --depth 1 https://github.com/GanyuanRan/AegisWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ganyuanran/aegis/using-git-worktrees)<a href="https://agentmods.dev/skills/ganyuanran/aegis/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/ganyuanran/aegis/using-git-worktrees.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00035 | $0.01643 |
| Opus 5 | $0.00017 | $0.00822 |
| Sonnet 5 | $0.00007 | $0.00329 |
| Haiku 4.5 | $0.00003 | $0.00164 |
Grade A, and why
using-git-worktrees scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
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
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.
Step 1: Necessity Decision
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 173 lines · 35 tokens per session scan A 23e832a61b1b
using-git-worktrees is a skill published in the GitHub repository GanyuanRan/Aegis (1,154 stars, last pushed 5d ago), licensed MIT. It adds 35 tokens to every session and 1,643 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
rulesync
Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations.
autoprompt
Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.
loongsuite-pilot-insight
基于 LoongSuite Pilot / AI Coding Agent 日志生成事件洞察、组织洞察、数据质量、研发效能和 AI Native 使用类 SLS 报表时使用;包含 AI Coding 事件表语义,以及团队报表可选的部门维表、deptuser 组织关系、指标口径和公共 CTE,通常与 sls-dashboard-builder 一起使用。.
map-fast
Minimal workflow for small, low-risk changes — no planning, no learning.
alipay-webhooks
Receive and verify Alipay (Antom / Alipay+) webhook notifications. Use when setting up Alipay webhook handlers, debugging RSA256 Signature header verification, or handling payment events like notifyPayment, notifyCapture, notifyRefund, notifyAuthorization, and notifyDispute.
clio-webhooks
Receive and verify Clio (Clio Manage) webhooks. Use when setting up Clio webhook handlers, debugging X-Hook-Signature verification, completing the X-Hook-Secret handshake, or handling legal practice events like matter.created, contact.updated, activity.created, or bill events.