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 skills add saajunaid/caddis-plugin --skill using-git-worktreesgit clone --depth 1 https://github.com/saajunaid/caddis-pluginWrote 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/saajunaid/caddis-plugin/using-git-worktrees)<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/using-git-worktrees/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/using-git-worktrees.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00034 | $0.01531 |
| Opus 5.5 | $0.00014 | $0.00612 |
| Sonnet 5.5 | $0.00007 | $0.00306 |
| Haiku 4.5 | $0.00003 | $0.00153 |
Grade C, and why
using-git-worktrees scanned grade C with 1 finding 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 24d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
Do not delete a worktree folder by hand or with `rm -rf`: on Windows it can follow a junction into This is a copy
83% identical to using-git-worktrees — 243 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Using Git Worktrees
A worktree gives one branch its own folder. It shares the repository with the main checkout.
Branch in place by default. Run git switch -c <branch>. Never create a sibling repository folder.
Use a worktree only when the checkout is not safe to move.
Announce at start: "I am using the using-git-worktrees skill to set up an isolated workspace."
When to use a worktree
Use a worktree when any of these is true:
- The repo
AGENTS.mdsaysShared checkout: yes(a dev service serves from it) and your change touches served code. A change to.caddis/ordocs/only may use a branch. - Another session or agent may be live in the checkout, or you cannot tell. Codex and agy cannot detect peers. For them, "cannot tell" means not safe.
git statusshows changes you did not make. Never stash, commit, reset or carry them.- Two or more agents edit at the same time. Each editing agent gets its own worktree. The orchestrator creates and removes them. Read-only subagents share the checkout and never move HEAD.
If none is true, stop here and use git switch -c.
Create the worktree
- Fetch:
git fetch origin. - Find the default branch (
mainin most repos):git symbolic-ref --short refs/remotes/origin/HEAD. It printsorigin/main. Use the part afterorigin/as<default>. - Create the worktree from
origin/<default>, never from the local HEAD, at<worktree root>\<repo>\<short-name>. Never under%TEMP%: Windows cleanup (Storage Sense) can empty it and delete a worktree that holds unmerged work. The worktree root is$env:CADDIS_WORKTREE_ROOTwhen set, else the.worktreesfolder beside the main checkout (forE:\Projects\<repo>that isE:\Projects\.worktrees\<repo>\<short-name>).<repo>is the main checkout's folder name. The caddis scriptcaddis_worktree_root.pyprints the path; use it so the rule lives in one place:
$wt = python "<caddis scripts>\caddis_worktree_root.py" <short-name> --record --purpose "<why>" # run in the repo; prints the path
git worktree add -b <branch> $wt origin/<default>
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.
- 24d ago Changed · +17 lines 41c324bc16c6
- 1mo ago Changed · +13 lines 855ae0d69c38
- 1mo ago Changed · -123 lines scan A → C 67f7ee806bd5
- 2mo ago Changed · -1 tokens per session 7e47ca2e33ce
- 2mo ago First seen · 218 lines · 35 tokens per session scan A 796e6376ba29
using-git-worktrees is a skill published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed 3d ago), licensed MIT. It adds 34 tokens to every session and 1,531 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). It is 83% identical to using-git-worktrees, differing in 243 lines, and is treated as a copy.
using-git-worktrees compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| using-git-worktreessaajunaid/caddis-plugin | Skill | 0 | 3d ago | MIT | C | 34 | Claude Code, Codex |
| commitcongchuanling-dot/Cohort | Skill | 180 | 3mo ago | MIT | A | 59 | Claude Code |
| agent-release-swarmruvnet/ruflo | Skill | 83k | today | MIT | A | 19 | Claude Code |
| github-automationruvnet/ruflo | Skill | 83k | today | MIT | A | 61 | Claude Code |
| upgrading-core-dependenciesJetBrains/thinkrail | Skill | 8.5k | yesterday | Apache-2.0 | A | 59 | Claude Code, Codex |
| reviewing-a-prJetBrains/thinkrail | Skill | 8.5k | yesterday | Apache-2.0 | A | 56 | Claude Code, Codex |
| release-cutBlackBeltTechnology/pi-agent-dashboard | Skill | 357 | today | MIT | A | 93 | Claude Code, Codex |