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/khaledsaeed18/dotclaude/git-worktreesnpx skills add KhaledSaeed18/dotclaude --skill git-worktreesgit clone --depth 1 https://github.com/KhaledSaeed18/dotclaudeWhat 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.00066 | $0.01166 |
| Opus 5 | $0.00033 | $0.00583 |
| Sonnet 5 | $0.00013 | $0.00233 |
| Haiku 4.5 | $0.00007 | $0.00117 |
Grade A, and why
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 2d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Make sure the work happens somewhere isolated, without fighting whatever isolation the environment already provides. The order matters: detect what you're already in, prefer native tooling, and only reach for raw git worktree as a last resort. Creating a worktree on top of an environment that already gave you one produces phantom state the harness can't see or clean up.
Step 0: Detect existing isolation first
Before creating anything, check whether you're already isolated.
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
BRANCH=$(git branch --show-current)
If GIT_DIR != GIT_COMMON, you're likely already in a linked worktree — but the same is true inside a git submodule, so rule that out first:
git rev-parse --show-superproject-working-tree 2>/dev/null
If that prints a path, you're in a submodule: treat it as a normal repo. Otherwise, GIT_DIR != GIT_COMMON means you're already in a worktree — skip creation and go straight to setup (Step 3). Report it: "Already in an isolated workspace at <path> on branch <name>" (or note a detached HEAD, which will need a branch created at finish time).
If GIT_DIR == GIT_COMMON (or you're in a submodule), you're in a normal checkout. Unless the user has already stated a worktree preference, ask before creating one:
"Want me to set up an isolated worktree? It keeps your current branch untouched while I work."
Honor an existing stated preference without re-asking. If the user declines, work in place and skip to Step 3.
Step 1: Create the isolated workspace
Two mechanisms, tried in this order.
1a. Native worktree tooling (preferred)
Do you already have a native way to create a worktree — a tool named something like EnterWorktree or WorktreeCreate, a /worktree command, a --worktree flag? If so, use it and skip to Step 3. Native tools handle placement, branch creation, and cleanup themselves; using raw git worktree add alongside them creates state the harness can't track. Only fall through to 1b if no native tool exists.
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.
- 2d ago First seen · 84 lines · 66 tokens per session scan A 065ba2294bf5
git-worktrees is a skill published in the GitHub repository KhaledSaeed18/dotclaude (4 stars, last pushed 7d ago), licensed MIT. It adds 66 tokens to every session and 1,166 once invoked, about $0.0003 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-31.
Other skills, from other repositories
release
Cut a new playback-mcp release — version bump, changelog, dev-to-main PR, tag, and npm publish via CI. Use when asked to plan or ship a new release/version.
pr
Open a pull request from dev into main for this repo, following the repo's checklist and template. Use when asked to open/create a PR, or as part of the release flow.
pyenv-native
Manages Python runtimes and project venvs via pyenv-native and pyenv-mcp. Use when installing Python, fixing which-python/venv issues, setting .python-version, pip env problems on Windows/Linux/macOS, or when MCP pyenv-native tools are available.
rpg
Build and query semantic code graphs using RPG-Encoder. Use BEFORE grep/cat/find for any question about code structure, behavior, relationships, impact, dependencies, or cross-file patterns.
src
use when generating a doc the user will read and share — specs, roadmaps, pr explainers, research reports, plans, strategy docs. trigger words: "glyph," "spec," "roadmap," "explainer," "report," "plan," "save as a doc.".
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.