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 skills add Zfinix/aster --skill git-worktreesgit clone --depth 1 https://github.com/Zfinix/asterWrote 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/zfinix/aster/git-worktrees)<a href="https://agentmods.dev/skills/zfinix/aster/git-worktrees"><img src="https://agentmods.dev/badge/skills/zfinix/aster/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.1 | $0.00049 | $0.00776 |
| Opus 5 | $0.00024 | $0.00388 |
| Sonnet 5 | $0.00010 | $0.00155 |
| Haiku 4.5 | $0.00005 | $0.00078 |
Grade C, and why
git-worktrees scanned grade C with 1 finding 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 today.
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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
agreed outcome. `rm -rf` by hand leaves a `prunable` entry; repair with What it actually says
Git worktrees
- Reach for a worktree only when the current checkout must stay put. The
user is mid-edit, the tree is dirty, or a long build is running and the task
needs a different branch. A clean idle tree does not need one:
git stashor a plaingit checkoutis simpler. - List before creating.
git worktree listfirst; pick a path and branch that are not already taken. - Create with an explicit branch. New branch:
git worktree add <path> -b <branch>. Existing branch:git worktree add <path> <branch>. A branch checked out in one worktree cannot be checked out in another:fatal: '<branch>' is already used by worktree at '<path>'. Pick a new branch name instead of forcing it. - Put the worktree where the sandbox can write and git will not sweep it.
Inside the repo under a gitignored path (
<repo>/target/wt/<name>) or in/tmp. A sibling directory outside the repo fails the filesystem write policy, and an untracked directory inside the repo pollutesgit statusandgit addsweeps. Verify the path is actually ignored withgit check-ignore -q <path>; if it is not, add it to.git/info/excluderather than editing the user's.gitignore. - Know what is shared. Commits and branches are shared through the one
object store: a commit made in the worktree is immediately visible from the
main checkout. HEAD, the index, and untracked files are per-worktree.
Build artifacts (
target/,node_modules/) are not shared either: the first build in a fresh worktree is a full cold build. Budget for it and say so if it will be slow. - Run checks inside the worktree.
cd <path>first, then the project's own verbs (make test,cargo test -p <crate>). Running them from the main repo tests the wrong tree. - Remove with git, not with
rm.git worktree remove <path>when the work is done. It refuses a dirty tree:contains modified or untracked files, use --force to delete it. Reset or clean the tree first, or use--forceonly when losing the changes is the agreed outcome.rm -rfby hand leaves aprunableentry; repair withgit worktree prune -v. - The branch outlives the worktree. Removing the worktree keeps its
branch. Delete it too when the work was abandoned (
git branch -Dcounts as destructive: say what is being deleted and why). - Never
mva worktree directory. It breaks the gitdir link. Usegit worktree move <path> <new-path>. - Leave no worktrees behind. A worktree created for one task is removed
in the same session once its check ran, unless the user asked to keep it.
git worktree listat the end of the task proves the cleanup.
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.
- today First seen · 48 lines · 49 tokens per session scan C cc1854759174
git-worktrees is a skill published in the GitHub repository Zfinix/aster (57 stars, last pushed today), licensed Apache-2.0. It adds 49 tokens to every session and 776 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.
Other skills, from other repositories
devops-release-automation
Use when planning and validating safe deployment automation — orchestrates deployment planning, terraform plan review, and post-release health verification.
deployment-automation
Use when planning, validating, or automating deployment workflows, release checks, rollback readiness, and post-deploy verification.
repo-hygiene
Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.
open-code-review
Performs AI-powered code review on Git changes using the ocr CLI from alibaba/open-code-review. Use when the user asks to review code, review a pull request, review staged/unstaged changes, review a commit, or compare branches for code quality issues. Produces line-level review comments and can automatically apply…
chinese-git-workflow
A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.
review-delta
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.