/worktree
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
$ npx -y skills add AgentsMesh/AgentsMesh --skill worktree --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/worktree
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
worktree.SKILL.mdname: worktree
description: >-
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.
AgentsMesh Worktree
Create worktrees next to the main checkout under `AgentsMesh-Worktrees`.
Workflow
1. Determine the requested branch name, base branch (default `main`), and whether the task actually needs a running development stack. 2. Inspect repository state and identify the base remote from the user's request, the base branch upstream, or its URL:
git status --short --branch
git remote -v
git worktree list
Preserve all existing changes. Do not stash, reset, commit, or clean the main checkout as a side effect of worktree creation. 3. Fetch the selected base:
git fetch <base-remote> <base-branch>
4. Derive a filesystem-safe directory name by replacing `/` in the branch with `-`. Use `$(dirname "$repo_root")/AgentsMesh-Worktrees`; do not embed a user-specific absolute path. 5. Check whether the branch or path already exists. If the branch is new:
git worktree add -b <branch-name> \
<worktree-root>/<directory-name> \
<base-remote>/<base-branch>If the branch already exists and is not checked out elsewhere, attach it without `-b`. Never delete or reset an existing branch to make the command succeed. 6. In the new worktree, verify:
git status --short --branch
git log --oneline -3
git merge-base --is-ancestor <base-remote>/<base-branch> HEAD
7. Start the environment only when runtime verification is needed. Read `references/dev-environment.md`, run the appropriate Bazel lifecycle target, then load and report the generated `deploy/dev/.env` values.
Result
Report the absolute worktree path, branch, base ref and commit, whether the development stack was started, and the generated ports when applicable. Do not remove the worktree automatically; cleanup must preserve uncommitted or unpushed work.
Read more
name: worktree description: >- 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.
AgentsMesh Worktree
Create worktrees next to the main checkout under `AgentsMesh-Worktrees`.
Workflow
1. Determine the requested branch name, base branch (default `main`), and whether the task actually needs a running development stack. 2. Inspect repository state and identify the base remote from the user's request, the base branch upstream, or its URL:
git status --short --branch git remote -v git worktree list
Preserve all existing changes. Do not stash, reset, commit, or clean the main checkout as a side effect of worktree creation. 3. Fetch the selected base:
git fetch <base-remote> <base-branch>
4. Derive a filesystem-safe directory name by replacing `/` in the branch with `-`. Use `$(dirname "$repo_root")/AgentsMesh-Worktrees`; do not embed a user-specific absolute path. 5. Check whether the branch or path already exists. If the branch is new:
git worktree add -b <branch-name> \
<worktree-root>/<directory-name> \
<base-remote>/<base-branch>If the branch already exists and is not checked out elsewhere, attach it without `-b`. Never delete or reset an existing branch to make the command succeed. 6. In the new worktree, verify:
git status --short --branch git log --oneline -3 git merge-base --is-ancestor <base-remote>/<base-branch> HEAD
7. Start the environment only when runtime verification is needed. Read `references/dev-environment.md`, run the appropriate Bazel lifecycle target, then load and report the generated `deploy/dev/.env` values.
Result
Report the absolute worktree path, branch, base ref and commit, whether the development stack was started, and the generated ports when applicable. Do not remove the worktree automatically; cleanup must preserve uncommitted or unpushed work.
The AI Agent Workforce Platform. Run a hundred AI coding agents across your own machines — schedule, isolate, and steer them all from one console.
Repo: AgentsMesh/AgentsMesh
Other skills on agentsmesh.
- /arch-check
架构与实现审查 —— 基于「概念建模 → 职责划分 → 机制/策略分离 → 因果与不变量 → 属性建模 → 模块化 → SOLID → GRASP → YAGNI」的全维度审查,带置信度门控与假阳性抑制(对抗"过度工程建议"这类 AI slop)。触发于:要求 review/审查架构、检查目录结构/依赖关系/职责划分、重构前评估、技术债盘点、判断是否过度设计,或问「这个设计合理吗 / 该怎么拆 / 有没有循环依赖 / 这个改动架构上 OK 吗」。一律按最高强度审查。用法:`arch-check [范围]
Open skill - /e2e
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. Use when a change needs E2E coverage, a user asks to execute or diagnose an E2E test, or a cross-service
Open skill - /gh-merge
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 only after verification. Use when the user asks to merge, submit, or land
Open skill - /github-gitlab-mirror
Audits or synchronizes the authoritative GitHub main branch to the internal GitLab mirror without importing GitLab-only history back into GitHub. Use when checking GitHub/GitLab consistency, updating the internal mirror, or resolving a divergence between the two remotes.
Open skill

