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/alexei-led/cc-thingz/using-git-worktreesnpx skills add alexei-led/cc-thingz --skill using-git-worktreesgit clone --depth 1 https://github.com/alexei-led/cc-thingzWrote 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/alexei-led/cc-thingz/using-git-worktrees)<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/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.00058 | $0.00852 |
| Opus 5 | $0.00029 | $0.00426 |
| Sonnet 5 | $0.00012 | $0.00170 |
| Haiku 4.5 | $0.00006 | $0.00085 |
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 3d 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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktrees
Use one sibling worktree root per project: <project>.worktrees/<branch-slug>. Keep the main worktree clean on the integration branch by default. Trivial solo one-liners may stay in the main worktree when a worktree would add pointless ceremony.
Treat a worktree as a disposable branch folder. Remove it and its branch after the PR merges.
Scope
Use this skill when:
- starting a feature, fix, or experiment that should not disturb current work
- working on multiple branches at once
- trying competing approaches
- the current worktree has uncommitted changes and the user wants to start something else
Do not use this skill for:
- simple branch switching with no parallel work
- bulk branch or stale worktree cleanup — use
cleanup-git - git hook, Gitleaks,
.gitignore, or config setup — useconfiguring-git-hygiene
Create Workflow
Check state before any git worktree add:
git status --short
git branch --show-current
git worktree list
If the current worktree is dirty, ask whether to commit, stash, or proceed anyway. Do not stash silently.
Use the helper when available:
scripts/setup-worktree.sh <branch> [--base <ref>]
The helper creates <project>.worktrees/<branch-slug> from the main worktree root, handles existing local/remote branches, refuses path conflicts, and refuses dirty state unless --allow-dirty is passed after user approval.
Manual fallback lives in workflow.md.
Naming
- Root: sibling
<project>.worktrees/directory. - Directory: branch slug only; replace
/with-. - Examples:
fix-cron,feature-auth,bugfix-issue-123.
Cleanup Workflow
For one named worktree after PR merge:
scripts/cleanup-worktree.sh [branch]
The helper refuses unless gh confirms the PR is MERGED. Pass --force only after the user confirms the merge without gh or confirms the branch should be abandoned.
For bulk cleanup, stale worktrees, gone upstreams, or merged local branches, use cleanup-git.
What ships with it
4 files 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.
- 3d ago First seen · 101 lines · 58 tokens per session scan A 695fa96c973a
using-git-worktrees is a skill published in the GitHub repository alexei-led/cc-thingz (35 stars, last pushed 1mo ago), licensed MIT. It adds 58 tokens to every session and 852 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-30.
Other skills, from other repositories
peekaboo
Provides runtime observation and interaction for native macOS interfaces through accessibility state and screenshots. Use when the task depends on visible or interactive state in a running SwiftUI/AppKit app: what is rendered, focused, selected, enabled, reachable through menus/windows/dialogs, or experienced across a…
seam-probe
This skill should be used when testing or debugging an embedded-runtime boundary exposed through a dynamically loaded C-ABI library or Unix-domain socket, including requests to inspect exports, exercise FFI callbacks, send framed messages, reproduce seam crashes or hangs, fuzz a boundary, or correlate probe output…
electron-playwright-validator
This skill should be used when a user asks to launch, inspect, automate, test, validate, or debug an Electron desktop UI through Playwright/CDP, including blank renderers, runtime import failures, accessibility snapshots, layout defects, click-through flows, or post-change checks. Not for native macOS or mobile apps…
mobile-flows-maestro
This skill should be used when Maestro is explicitly requested or already present and the task is to author, run, or debug iOS/Android Maestro flows; use Maestro MCP; or handle Maestro selectors, system UI, permissions, Keychain, JavaScript, waits, device state, flakiness, or CI. Evidence includes a .maestro directory…
validate-mobile
Run a Maestro flow on an explicitly selected iOS or Android device and report behavioral evidence.
validate-api
Run the project's Hurl scenarios with an OIDC access token passed as a secret variable.