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 shibing624/agentica --skill worktreegit clone --depth 1 https://github.com/shibing624/agenticaWrote 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/shibing624/agentica/worktree)<a href="https://agentmods.dev/skills/shibing624/agentica/worktree"><img src="https://agentmods.dev/badge/skills/shibing624/agentica/worktree/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/shibing624/agentica/worktree"><img src="https://agentmods.dev/badge/skills/shibing624/agentica/worktree.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.00061 | $0.00632 |
| Opus 5.5 | $0.00024 | $0.00253 |
| Sonnet 5.5 | $0.00012 | $0.00126 |
| Haiku 4.5 | $0.00006 | $0.00063 |
Grade A, and why
worktree 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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Isolate work in a worktree
Several sessions in one checkout overwrite each other and contend for git's index. A worktree is one directory + one branch per task, sharing the repository.
This session does not move. worktree(action="new") returns a path.
Pass that path as work_dir on read_file / write_file / apply_patch /
execute. On glob / grep, pass it as path. Omit those arguments and
the call stays in this session's directory.
Do not cd and expect later calls to follow — each call is independent.
Do not execute git worktree add: that only makes a directory, and later
calls still use this session unless you pass work_dir / path. Use
worktree(action="new").
When
list_agentsshows another session in this directory (dirty files, same branch) and you are about to edit.- A change should not land on the shared working tree.
Not this: a read-only task subagent (it does not write). A second CLI
that should start already inside a tree is agentica --worktree <task>.
How
Name the task, not yourself. Reused while the checkout is healthy; gone after merge. A registration that is no longer a checkout is refused — remove it first, or pick another name. The tool does not delete leftover files to make room.
worktree(action="new", name="<task>")— create or reuse; returns the pathworktree(action="status")— every worktree of this repoworktree(action="merge", name="<task>")— land on local main (conflicts stay in that worktree, then fast-forward on main), delete the checkoutworktree(action="remove", name="<task>")— drop awt/*checkout git will allow (dirty is refused; an unmerged branch is left in place)
new(name="main") is refused: main is the repository root, not a task.
For a chunk of work big enough for its own process, delegate(task=..., work_dir=<path>) already takes the same path.
If a directory goes missing, status labels it (directory gone) or
(not a checkout). Say so; do not rebuild it by destroying what sits there.
remove the name, then new if you still want it.
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 Changed · -3 lines · -14 tokens per session scan C → A eb4bcaff37b1
- 1mo ago Changed · +14 lines · +2 tokens per session scan A → C 7c85b27b4cee
- 1mo ago First seen · 48 lines · 73 tokens per session scan A 08c1215cdb23
worktree is a skill published in the GitHub repository shibing624/agentica (357 stars, last pushed today), licensed Apache-2.0. It adds 61 tokens to every session and 632 once invoked, about $0.0002 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-09-05.
Other skills, from other repositories
chinese-git-workflow
A reference for connecting projects to Chinese Git hosting services such as Gitee, Coding.net, GitLab in China, and CNB.
chinese-commit-conventions
A Chinese-language reference for writing commit messages and changelogs, which record code changes and releases.
using-git-worktrees
An isolated Git workspace for developing a feature without changing the current working directory. Git worktrees let one repository have multiple working folders.
finishing-a-development-branch
A procedure for completing a software development branch, including checking the code and running the project’s tests.
release-prep
Prepare release documentation including CHANGELOG entry, announcement text, and validation. Run before tagging a new release.
massgen-release-documenter
Guide for following MassGen's release documentation workflow. This skill should be used when preparing release documentation, updating changelogs, writing case studies, or maintaining project documentation across releases.