Borrowing it
Nothing to install: this file belongs to fotoetienne/gru. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/fotoetienne/gru/main/.claude/skills/git-worktrees/SKILL.mdgit clone --depth 1 https://github.com/fotoetienne/gruWrote 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/fotoetienne/gru/git-worktrees)<a href="https://agentmods.dev/skills/fotoetienne/gru/git-worktrees"><img src="https://agentmods.dev/badge/skills/fotoetienne/gru/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/fotoetienne/gru/git-worktrees"><img src="https://agentmods.dev/badge/skills/fotoetienne/gru/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.00026 | $0.02181 |
| Opus 5.5 | $0.00010 | $0.00872 |
| Sonnet 5.5 | $0.00005 | $0.00436 |
| Haiku 4.5 | $0.00003 | $0.00218 |
Grade C, and why
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 2mo 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.
rm -rf ~/.gru/work/owner/repo/minion/issue-42-M042/checkout How it starts
The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a git worktree management assistant for the Gru project. You help users work with git worktrees in the context of Gru's filesystem structure.
Understanding Gru's Filesystem Structure
Gru uses git worktrees to isolate work for each Minion. The structure is:
~/.gru/
├── repos/ # Bare repository mirrors
│ └── owner/
│ └── repo.git/ # Bare clone (shared)
├── work/ # Active Minion workspaces
│ └── owner/
│ └── repo/
│ └── minion/
│ ├── issue-42-M042/ # Minion M042's workspace
│ │ ├── events.jsonl # Stream events log
│ │ └── checkout/ # Git worktree (repo files)
│ │ ├── .git
│ │ └── <repo files>
│ └── issue-43-M043/ # Minion M043's workspace
Key concepts:
- Bare repo: Shared git repository at
~/.gru/repos/owner/repo.git/ - Minion dir: Metadata directory at
~/.gru/work/owner/repo/minion/issue-<number>-<minion-id>/ - Checkout path: Actual git worktree at
minion_dir/checkout/ - Branch naming:
minion/issue-<number>-<minion-id>(e.g.,minion/issue-42-M042) - One worktree per Minion: Each Minion gets its own isolated workspace
- Shared object store: All worktrees share the same git objects (efficient!)
Common Tasks
1. List All Worktrees
To see all worktrees for a repository:
cd ~/.gru/repos/owner/repo.git
git worktree list
This shows:
- The bare repo location
- All active worktrees
- Which branch each worktree is on
- Whether the worktree is locked or prunable
2. Create a Worktree for a New Minion
When creating a new Minion workspace:
# From the bare repo
cd ~/.gru/repos/owner/repo.git
# Create worktree for Minion M042 working on issue 42
git worktree add ~/.gru/work/owner/repo/minion/issue-42-M042/checkout -b minion/issue-42-M042
Important:
- Worktree path:
~/.gru/work/owner/repo/minion/issue-<number>-<minion-id>/checkout/ - Branch naming:
minion/issue-<number>-<minion-id> - Create from the bare repo directory
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago First seen · 319 lines · 26 tokens per session scan C 5fb5809b7068
git-worktrees is a skill published in the GitHub repository fotoetienne/gru (11 stars, last pushed 27d ago), licensed Apache-2.0. It adds 26 tokens to every session and 2,181 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
deployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.
mem0-test-integration
Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…
resolve-handoff
Emit the complete Resolve handoff with exact modes, outcomes, test evidence, and publication state.
otto-pr-review-loop
Run Polly and OCR on a PR until all findings settle.
baby-sit
Monitor a GitHub pull request until CI is green, diagnose failures, and rerun only evidence-backed flaky GitHub Actions jobs.
merge-drive
Carry a long-running conflicted merge of origin/main into a branch that restructured the tree: read the merge state from the index, resolve by class, and hand it to the next session without losing work. Covers the classes git reports as already-resolved (silent resurrections, directory-rename ports, half-landed…