Agent skill

Worktree

by AgentsMesh in AgentsMesh/AgentsMesh

Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

Custom licenceAuto-check: notesDevelopment

Install Worktree

skills CLI
$ npx skills add AgentsMesh/AgentsMesh --skill worktree -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AgentsMesh/AgentsMesh worktree --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AgentsMesh/AgentsMesh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/worktree .claude/skills/worktree && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
worktree
GitHub stars
2.4k
Token cost
~553 tokens
SKILL.md length
209 words
Files
2 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
Custom licence

At a glance

Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

  • Works in 7 steps: Determine the requested branch name,… → Inspect repository state and identify… → Fetch the selected base → …
  • The user asks for a new worktree
  • SKILL.md covers Workflow and Result
  • Calls git

What it does

Worktree is an agent skill from AgentsMesh/AgentsMesh. Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment. Use when the user asks for a new worktree or isolated work for a feature, fix, investigation, or review.

Its SKILL.md is about 550 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/dev-environment.md`).

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: The AI Agent Workforce Platform. Run a hundred AI coding agents across your own machines — schedule, isolate, and steer them all from one console.

When your agent uses it

  • The user asks for a new worktree
  • Isolated work for a feature

Example prompts

  • “Use the worktree skill to create or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and…”
  • “/worktree”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Determine the requested branch name, base branch (default main), and
  2. Inspect repository state and identify the base remote from the user's request,
  3. Fetch the selected base
  4. Derive a filesystem-safe directory name by replacing / in the branch with
  5. Check whether the branch or path already exists. If the branch is new
  6. In the new worktree, verify
  7. Start the environment only when runtime verification is needed. Read

What it can do on your machine

Read from SKILL.md and the folder at commit d38e393. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Worktree loads about 553 tokens when it runs, and up to ~864 if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 209 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~553
With references · SKILL.md plus every file in references/, read only if the agent opens them
~864

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:59
    oad and report the generated `deploy/dev/.env` values.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 209 words (~553 tokens).

“Create worktrees next to the main checkout under AgentsMesh-Worktrees.”

— opening of SKILL.md by AgentsMesh, Custom licence
name
worktree

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (references) in agents/skills/worktree of AgentsMesh/AgentsMesh.

  • SKILL.md
  • references/dev-environment.md

Open the folder on GitHubat commit d38e393

Compare with similar skills

Worktree next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Worktree compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree this skillAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone
New Featuremichaelshimeles/skills1.3k1 repos~699Automated safety check: PassNone
Mori Agent Bridgevaayne/mori303—~1.7kAutomated safety check: PassMIT

Similar skills

  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • New Feature

    michaelshimeles/skills

    Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts.

    1.3k GitHub starsUsed in 1 repo~699 tokens
    DevelopmentAuto-check passed
  • Use Mori CLI to enable agent-to-agent communication and coordination across Mori-managed panes.

    303 GitHub stars~1.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Git Worktrees

    heyitsnoah/claudesidian

    Work with git worktrees for isolated parallel development. An agent skill from heyitsnoah/claudesidian.

    2.6k GitHub stars~1.1k tokensUpdated 5 mo ago
    DevelopmentAuto-check: notes

More from AgentsMesh/AgentsMesh

  • E2E

    AgentsMesh/AgentsMesh

    Selects and runs the appropriate AgentsMesh end-to-end suite for Web, Desktop, MCP, or iOS, including worktree-specific environment setup and browser-level verification.

    2.4k GitHub stars~629 tokensUpdated 14 days ago
    Auto-check: notes
  • Gh Merge

    AgentsMesh/AgentsMesh

    Completes the AgentsMesh GitHub pull-request workflow: commits scoped changes, rebases on the authoritative GitHub branch, opens or reuses a PR, monitors required checks, fixes failures, and merges…

    2.4k GitHub stars~715 tokensUpdated 14 days ago
    Auto-check passed
  • GitHub GitLab Mirror

    AgentsMesh/AgentsMesh

    Audits or synchronizes the authoritative GitHub main branch to the internal GitLab mirror without importing GitLab-only history back into GitHub.

    2.4k GitHub stars~707 tokensUpdated 14 days ago
    Auto-check passed
  • Arch Check

    AgentsMesh/AgentsMesh

    架构与实现审查 —— 基于「概念建模 → 职责划分 → 机制/策略分离 → 因果与不变量 → 属性建模 → 模块化 → SOLID → GRASP → YAGNI」的全维度审查,带置信度门控与假阳性抑制(对抗"过度工程建议"这类 AI slop)。触发于:要求 review/审查架构、检查目录结构/依赖关系/职责划分、重构前评估、技术债盘点、判断是否过度设计,或问「这个设计合理吗 / 该怎么拆…

    2.4k GitHub stars~1.2k tokensUpdated 14 days ago
    Auto-check passed

Works with

Questions about Worktree

What does Worktree do?

Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment. Worktree is an agent skill from AgentsMesh/AgentsMesh. Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

When should I use Worktree?

Worktree fits situations like: the user asks for a new worktree; isolated work for a feature.

How do I install Worktree in Claude Code?

Run `npx skills add AgentsMesh/AgentsMesh --skill worktree -a claude-code`. Or copy the skill folder (agents/skills/worktree in AgentsMesh/AgentsMesh) into .claude/skills/worktree in your project. Claude Code loads it when a task matches its description.

How do I install Worktree in Codex?

Run `npx skills add AgentsMesh/AgentsMesh --skill worktree -a codex`. Or copy the skill folder (agents/skills/worktree in AgentsMesh/AgentsMesh) into .agents/skills/worktree in your project. Codex loads it when a task matches its description.

Can I use Worktree in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AgentsMesh/AgentsMesh --skill worktree -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree, .gemini/skills/worktree, .github/skills/worktree and .opencode/skills/worktree in your project.

What does Worktree need to run?

Going by SKILL.md and its folder, Worktree needs the command-line tools its instructions call (git).

Does Worktree access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Worktree safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Worktree use?

Worktree has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Worktree use?

About 553 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 311 tokens, read only when the agent opens those files.

What are the alternatives to Worktree?

Skills that share tags, products or a category with Worktree: Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars), Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars), Git Worktree Setup (k8zdev/k8z, 155 stars) and New Feature (michaelshimeles/skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree?

AgentsMesh (a GitHub organization) maintains it in AgentsMesh/AgentsMesh, which has 2,362 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 23, 2026.

Source: AgentsMesh/AgentsMesh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.