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/ahmadulhoq/agentskel/using-git-worktreesnpx skills add ahmadulhoq/agentskel --skill using-git-worktreesgit clone --depth 1 https://github.com/ahmadulhoq/agentskelWhat 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.00043 | $0.00452 |
| Opus 5 | $0.00022 | $0.00226 |
| Sonnet 5 | $0.00009 | $0.00090 |
| Haiku 4.5 | $0.00004 | $0.00045 |
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 yesterday.
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.
What it actually says
Using Git Worktrees Skill
Purpose: Keep the active repo clean. Work happens in a sibling directory — no nested git repos, no IDE re-indexing loops.
When to Use
| Situation | Use worktree? |
|---|---|
| Long feature run (> ~30 min) | Yes |
| Parallel branch comparison | Yes |
| Running full build/test suite against a branch | Yes |
| Quick hotfix or single-file change | No — use normal branch |
Setup
- Confirm the feature branch exists (created by
git-flowbefore any code):BRANCH=<branch-name> REPO=$(basename $(git rev-parse --show-toplevel)) WORKTREE_PATH="../${REPO}-${BRANCH}" - Create the worktree:
git worktree add "$WORKTREE_PATH" "$BRANCH" - Enter the worktree before running any build or test commands:
cd "$WORKTREE_PATH" - All implementation, build, and test commands execute inside
$WORKTREE_PATH. The main repo directory is effectively read-only during this session.
Rules
- Sibling directories only. Never place a worktree inside the repo (e.g.,
./worktrees/). Nested paths cause IDE indexing loops and nested-git errors. - One worktree per branch. Do not create multiple worktrees for the same branch.
- Do not edit files in the main repo directory while a worktree session is active.
Cleanup (after PR is merged)
- Return to main repo directory, then:
git worktree remove "$WORKTREE_PATH" git branch -d "$BRANCH" # only after merge is confirmed
Gate: Do not run build or test scripts in the main repo directory when a worktree exists for the active branch.
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.
- yesterday First seen · 53 lines · 43 tokens per session scan A 8da8fca4038b
using-git-worktrees is a skill published in the GitHub repository ahmadulhoq/agentskel (13 stars, last pushed 17d ago), licensed MIT. It adds 43 tokens to every session and 452 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-09-02.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…