Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/andreaswasita/copilot-agents-dojonpx agentmods add skills/andreaswasita/copilot-agents-dojo/using-git-worktreesWrote 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/andreaswasita/copilot-agents-dojo/using-git-worktrees)<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/using-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/andreaswasita/copilot-agents-dojo/using-git-worktrees"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/using-git-worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00020 | $0.01097 |
| Opus 5.5 | $0.00008 | $0.00439 |
| Sonnet 5.5 | $0.00004 | $0.00219 |
| Haiku 4.5 | $0.00002 | $0.00110 |
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 1mo 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 — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Using Git Worktrees Skill
Creates an isolated git worktree on a dedicated feature branch for every development task, so main is never touched until finishing-a-development-branch says so. Does NOT replace feature branches when worktrees are impractical (CI, single-file fix) — the isolation principle is what matters.
When to Use
- Starting any non-trivial development task (default behavior).
- Before the agent would otherwise modify code on
main. - When parallel development tracks are needed (multiple worktrees in flight).
- After
brainstormingproduces an approved design. - NOT for a one-line typo fix where a branch is sufficient.
Prerequisites
git≥ 2.5 with worktree support.- The repository is already cloned (a worktree extends an existing clone).
- The
powershellCopilot tool to rungit. - A naming convention agreed for the branch:
feature/*,fix/*,experiment/*. - The project's dependency install command (
npm install,pip install -r requirements.txt, etc.).
How to Run
1. From the main repo root, create the worktree with a new branch.
2. Change into the worktree directory.
3. Install dependencies inside it.
4. Confirm a green test baseline.
5. Work only inside the worktree — never touch the main worktree.
Quick Reference
| Operation | Command |
|---|---|
| Create | git worktree add ../<dirname> -b <branch> |
| List | git worktree list |
| Remove | git worktree remove ../<dirname> |
| Prune stale | git worktree prune |
| Branch prefix | Use |
|---|---|
feature/<slug> |
New features |
fix/<slug> |
Bug fixes |
experiment/<slug> |
Spikes / throwaway |
| Dependency bootstrap | Detect signal |
|---|---|
npm install |
package.json |
pip install -r requirements.txt |
requirements.txt |
go mod download |
go.mod |
mvn dependency:resolve |
pom.xml |
dotnet restore |
*.csproj |
Procedure
Step 1: Create the Worktree
From the main repo root, run via the powershell tool:
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.
- 1mo ago First seen · 125 lines · 20 tokens per session scan A a32aff189e7e
using-git-worktrees is a skill published in the GitHub repository andreaswasita/copilot-agents-dojo (54 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 1,097 once invoked, about $0.0001 per session on Opus 5.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
shipping-a-pr
Use when finished work needs to ship as a pull request, or when creating, syncing, updating metadata, checking status, monitoring CI, or addressing review comments on a PR. Not for reviewing a PR you are not shipping.
worktree-agent
Mandatory rules for agents in git worktree isolation.
git-workflow
Use when naming or scoping a branch, writing or fixing a commit message, picking the gitmoji for a commit, untangling history (rebase versus merge versus squash), or cutting a versioned release — the portable git-convention layer for any repo. Covers gitmoji + Conventional Commits, SemVer tags, branch hygiene…
release-notes
Write release notes for a tagged release — a business-impact summary of what changed for the user, plus a thanks section naming every contributor whose commits are in the release. Short by construction.
review-this-branch
Run the nohuman review gate (fresh-session adversarial reviewer + tamper guard) over the current branch or a GitHub pull request, with no server, no database, and no onboarding, and relay the pass/fail checklist.
stepwise-task-execution
Master workflow for an implementation task. Use when you pick up any task or bug that changes product code, including a needrevision bounce.