gru: Skill for Claude Code

.claude/skills/git-worktrees/SKILL.md

git-worktrees is a skill for Claude Code from fotoetienne/gru. It costs 26 tokens per session (2,181 once invoked), scanned C, original, Apache-2.0.

A helper for managing Git worktrees, which are separate working folders linked to the same Git repository. It is designed around the Gru project's layout for isolated Minion workspaces.

In plain words
What is it for?
Use it to manage Gru Minion workspaces, locate their checkouts and metadata, and work with the project's shared bare repositories and branch naming.
Why use it?
It helps developers keep multiple tasks or branches separate without mixing files or changes. It also makes the project's repository, metadata, checkout, and branch locations easier to work with.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is fotoetienne/gru's own configuration. It tells Claude Code how to work on gru itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gru configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/fotoetienne/gru/main/.claude/skills/git-worktrees/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fotoetienne/gru

Made for: Claude Code.

Wrote 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.

agentmods badge for git-worktrees

README.md
[![agentmods](https://agentmods.dev/badge/skills/fotoetienne/gru/git-worktrees/github.svg)](https://agentmods.dev/skills/fotoetienne/gru/git-worktrees)
Your own site
<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.

agentmods 80×15 button for git-worktrees

Your own site · 80×15
<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>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,181 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2mo ago against content hash 5fb5809b7068, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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
.claude/skills/git-worktrees/SKILL.md · 319 lines

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

Read the full file on GitHub · 319 lines

Files

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.

Changes

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.

  1. 2mo ago First seen · 319 lines · 26 tokens per session scan C 5fb5809b7068

Subscribe to this mod's changes

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.