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/6bnbn/flowpilot/using-git-worktreesnpx skills add 6BNBN/FlowPilot --skill using-git-worktreesgit clone --depth 1 https://github.com/6BNBN/FlowPilotWhat 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.00035 | $0.01331 |
| Opus 5 | $0.00017 | $0.00665 |
| Sonnet 5 | $0.00007 | $0.00266 |
| Haiku 4.5 | $0.00003 | $0.00133 |
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 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 — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Using Git Worktrees
Overview
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."
Directory Selection Process
Follow this priority order:
1. Check Existing Directories
# Check in priority order
ls -d .worktrees 2>/dev/null # Preferred (hidden)
ls -d worktrees 2>/dev/null # Alternative
If found: Use that directory. If both exist, .worktrees wins.
2. Check AGENTS.md
grep -i "worktree.*director" AGENTS.md 2>/dev/null
If preference specified: Use it without asking.
3. Ask User
If no directory exists and no AGENTS.md preference:
No worktree directory found. Where should I create worktrees?
1. .worktrees/ (project-local, hidden)
2. ~/.codex/worktrees/<project-name>/ (global location)
Which would you prefer?
Safety Verification
For Project-Local Directories (.worktrees or worktrees)
MUST verify directory is ignored before creating worktree:
# Check if directory is ignored (respects local, global, and system gitignore)
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
If NOT ignored:
If the worktree directory is not ignored yet:
- Add appropriate line to .gitignore
- Commit the change
- Proceed with worktree creation
Why critical: Prevents accidentally committing worktree contents to repository.
For Global Directory (~/.codex/worktrees)
No .gitignore verification needed - outside project entirely.
Creation Steps
1. Detect Project Name
project=$(basename "$(git rev-parse --show-toplevel)")
2. Create Worktree
# Determine full path
case $LOCATION in
.worktrees|worktrees)
path="$LOCATION/$BRANCH_NAME"
;;
~/.codex/worktrees/*)
path="~/.codex/worktrees/$project/$BRANCH_NAME"
;;
esac
# Create worktree with new branch
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
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 · 219 lines · 35 tokens per session scan A aee4770ed432
using-git-worktrees is a skill published in the GitHub repository 6BNBN/FlowPilot (133 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 1,331 once invoked, about $0.0002 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
coding-agents-farm
To orchestrate parallel coding-agent farms (Claude, Codex, Copilot, Gemini, etc.) on isolated git worktrees.
agent-orchestration-multi-agent-optimize-v2
Multi-Agent Optimization Toolkit workflow skill. Use this skill when the user needs Optimize multi-agent systems with coordinated profiling, workload distribution, and cost-aware orchestration. Use when improving agent performance, throughput, or reliability and the operator should preserve the upstream workflow…
nobrainer-ultra
Use when the owner says nb-ultra, nb-flow, nb-workflow, ultracode, or asks to set up, upgrade, or reconcile a project's agent workflow; or wants one non-trivial task taken from brief requirements through a complete skill-routed plan, guarded autonomous execution, useful multi-session work and final evidence audit.
nobrainer-dispatcher
Use when the owner says nb-dispatcher or nobrainer-dispatcher, or when an approved execution map has multiple queued work units that require ready-set selection, dependency-aware ordering, bounded parallel batches, retry scheduling, or routing audited results to the next queued unit; do not use for one coherent task…
nobrainer-autoimprove
Use when the owner says nb-autoimprove, deep-autoresearch, code-autoresearch, nobrainer-capture-lesson, or nobrainer-continuous-improvement; asks to improve a skill or prompt; or wants a measurable bounded baseline-variant-evaluation loop instead of one subjective rewrite.
nobrainer-writing
Use when the owner says nb-write, nobrainer-writing, nobrainer-style, or nobrainer-human-like, or asks to draft, rewrite, compress, humanize, edit, or review user-facing prose such as a message, comment, document, README, report, summary, email, post, or release note; maximize useful information per word without…