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/shibing624/agentica/worktreenpx 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.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.00073 | $0.00493 |
| Opus 5 | $0.00036 | $0.00246 |
| Sonnet 5 | $0.00015 | $0.00099 |
| Haiku 4.5 | $0.00007 | $0.00049 |
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 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
Isolate this session
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.
Do not create one with execute (git worktree add, cd). That only adds a
directory; this session's file tools stay in the old checkout. Call the
worktree tool — it moves process cwd, sandbox, peer record and the status bar
together. The transcript stays where it already was.
When
list_agentsshows another session in this directory (dirty files, same branch) and you are about to edit.- The user or a peer names a task checkout ("切到 gateway-peers").
- A change should not land on the shared working tree.
Not this: a read-only task subagent (it does not write). A second CLI the
human should watch is multi-agent — start that process with --worktree or
its own -c.
How
Name the task, not yourself. Reused while the task is in progress; gone after merge. The tool schema lists the actions; do not invent paths.
worktree(action="use", name="<task>")— create or reuse, then move hereworktree(action="status")— where you are, every worktree of this repoworktree(action="merge")— land on local main, delete the checkout, returnworktree(action="remove")— drop one with no unique work
The human's surfaces: agentica --worktree <task> at start (see
agentica --help), /worktree mid-session. You cannot type slash commands;
use the tool. Tell the user which slash to type when they want to drive.
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 · 48 lines · 73 tokens per session scan A 08c1215cdb23
worktree is a skill published in the GitHub repository shibing624/agentica (351 stars, last pushed today), licensed Apache-2.0. It adds 73 tokens to every session and 493 once invoked, about $0.0004 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-05.
Other skills, from other repositories
chinese-git-workflow
国内 Git 平台配置参考——Gitee、Coding.net、极狐 GitLab、CNB 的 SSH/HTTPS/凭据/CI 接入差异与镜像同步配置。仅在用户显式 /chinese-git-workflow 时调用,不要根据上下文自动触发。.
chinese-commit-conventions
中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。.
finishing-a-development-branch
Skill "finishing-a-development-branch" from xbsheng/atguigu-note, covering 完成开发分支, 概述, 流程, 步骤 1:验证测试 and 运行项目的测试套件.
using-git-worktrees
当需要开始与当前工作区隔离的功能开发,或在执行实现计划之前使用——通过原生工具或 git worktree 回退机制确保隔离工作区存在.
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.