Agent skill

Worktree

by murray17 in murray17/rovai-ai

A skill your agent uses when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up.

MITAuto-check passedDevelopment

Install Worktree

skills CLI
$ npx skills add murray17/rovai-ai --skill worktree -a claude-code

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

GitHub CLI
$ gh skill install murray17/rovai-ai 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/murray17/rovai-ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/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
138
Token cost
~954 tokens
SKILL.md length
497 words
Files
3
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up.

  • Works in 5 steps: Identify the actual mainline; do not… → Use its existing clean checkout and… → Change only required governance… → …
  • The user requests a Git worktree
  • SKILL.md covers Inspect and reuse, Conditional governance baseline, Select branch, base, and… and Verify and hand off, plus 1 more section
  • Calls git

What it does

Worktree is an agent skill from murray17/rovai-ai. Use when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up. Exclude read-only work, non-Git repositories, and tasks that need no separate branch or directory.

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `agents/openai.yaml`).

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: Desktop and web workspace for lasting teams of coding agents, with shared conversations, task delegation, and collaborative memory. The licence is MIT.

When your agent uses it

  • The user requests a Git worktree
  • A development task needs an isolated directory to create

Example prompts

  • “/worktree”

Workflow steps

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

  1. Identify the actual mainline; do not assume main.
  2. Use its existing clean checkout and synchronize according to repository rules without overwriting other work.
  3. Change only required governance documents, run documentation gates, and commit them separately on the mainline.
  4. Record the immutable commit SHA as the coding baseline.
  5. Bring an empty coding worktree to that baseline. If it already contains code, integrate by the repository's merge rules without rewriting…

What it can do on your machine

Read from SKILL.md and the folder at commit ed90fa9. 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 954 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 497 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~954

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 passed

The automated check found no risky patterns in SKILL.md.

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

The full file from murray17/rovai-ai at commit ed90fa9, republished under its MIT licence (© murray17). 497 words, ~954 tokens.

Download SKILL.mdSave it as .claude/skills/worktree/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
worktree
description
Use when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up. Exclude read-only work, non-Git repositories, and tasks that need no separate branch or directory.

Git Worktree

Use one reusable branch and worktree per logical change. Follow repository and user rules. Run later commands and edits in the selected worktree. Respond in the user's language.

Do not silently stash, move uncommitted work, overwrite directories, or force-delete branches or worktrees.

Inspect and reuse

bash
git rev-parse --show-toplevel
git status --short --branch
git worktree list --porcelain
git branch --list

Read relevant repository instructions. Determine whether the current worktree fits the task, the target branch is checked out elsewhere, an existing branch/directory can be reused, uncommitted work is required, or governance documents must precede coding.

If uncommitted changes must move, ask the user to choose committing, making a patch, or staying in the current worktree. Do not transport them silently.

Conditional governance baseline

Only when repository or user rules require governance documents to enter the mainline before coding:

  1. Identify the actual mainline; do not assume main.
  2. Use its existing clean checkout and synchronize according to repository rules without overwriting other work.
  3. Change only required governance documents, run documentation gates, and commit them separately on the mainline.
  4. Record the immutable commit SHA as the coding baseline.
  5. Bring an empty coding worktree to that baseline. If it already contains code, integrate by the repository's merge rules without rewriting history.

If permissions or dirty state prevent this safely, report the obstacle before coding.

Select branch, base, and directory

Prefer user-specified names and repository conventions; otherwise use a short task slug with feat/, fix/, docs/, chore/, or work/ as appropriate.

Choose the base in this order: required governance commit, explicit user choice, repository rule, related branch, then current HEAD. Clarify a choice that materially changes the work. Fetch only when requested for freshness or required by repository rules; disclose an offline baseline.

Use the specified directory or repository convention; otherwise a sibling <repo>-<slug>. Use .worktrees/ only under an existing ignored convention; do not edit .gitignore merely to create one.

Reuse in order:

  1. The current worktree if suitable.
  2. The existing worktree attached to the target branch.
  3. An existing unattached branch: git worktree add <path> <branch>.
  4. A new branch: git worktree add -b <branch> <path> <base>.

Stop for an existing unregistered target directory or unresolved ambiguous target; do not delete or overwrite it.

Show full SKILL.md (134 more words)Show less

Verify and hand off

Check the actual root, branch, base SHA, worktree status, and required governance ancestry. Run installs, builds, tests, and edits in that root. Do not copy secrets, runtime state, caches, or uncommitted changes from another worktree.

Record absolute path, branch, base, governance commit if applicable, status (active, ready, merged, or abandoned), changes, validation, and next action in the task, issue, handoff, or final report. Follow-up sessions reuse that checkout; a new session alone does not justify a new branch or worktree.

Clean up

Follow repository rules for merged or abandoned worktrees; otherwise clean up only when requested. Verify the worktree is clean, then use git worktree remove, safe branch deletion with git branch -d, and git worktree prune as appropriate. Preserve unmerged, dirty, or uncertain work. Force operations require explicit authorization.

© murray17, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/worktree of murray17/rovai-ai.

  • SKILL.md
  • NOTICE
  • agents/openai.yaml

Open the folder on GitHubat commit ed90fa9

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 skillmurray17/rovai-ai138—~954Automated safety check: PassMIT
Build Px4 macOSPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
WorktreeAgentsMesh/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

Similar skills

  • Build Px4 macOS

    PX4/PX4-Autopilot

    Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

    13k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Worktree

    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.

    2.4k GitHub stars~553 tokensUpdated 14 days ago
    DevelopmentAuto-check: notes
  • 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 3 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

More from murray17/rovai-ai

All 9 skills in this repo
  • Member Studio

    murray17/rovai-ai

    A skill your agent uses to create a Rovai member or revise and confirm the unsaved identity card and avatar for that creation.

    138 GitHub stars~915 tokensUpdated today
    Auto-check passed
  • Analyze Agent Codebase

    murray17/rovai-ai

    A skill your agent uses to analyze an agent system's architecture or mechanisms from repository evidence, including follow-up questions and analysis documents.

    138 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • CLI Operations

    murray17/rovai-ai

    Choose among Rovai messages, Tasks, Missions, history and Memory; coordinate parallel member requests, multi-step operations or recovery.

    138 GitHub stars~664 tokensUpdated today
    Auto-check passed
  • Campfire

    murray17/rovai-ai

    Run a Thread discussion with several members to compare perspectives, options or tradeoffs and produce shared notes.

    138 GitHub stars~590 tokensUpdated today
    Auto-check passed
  • Grill Duo With Docs

    murray17/rovai-ai

    Clarify a plan or design with one fixed Thread reviewer while maintaining confirmed domain language, current specifications and version decisions.

    138 GitHub stars~897 tokensUpdated today
    Auto-check passed
  • Review Duo

    murray17/rovai-ai

    Review a defined code change with two Thread members independently checking standards, quality and requirements.

    138 GitHub stars~961 tokensUpdated today
    Auto-check passed

Works with

Questions about Worktree

What does Worktree do?

A skill your agent uses when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up. Worktree is an agent skill from murray17/rovai-ai. Use when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up.

When should I use Worktree?

Worktree fits situations like: the user requests a Git worktree; A development task needs an isolated directory to create.

How do I install Worktree in Claude Code?

Run `npx skills add murray17/rovai-ai --skill worktree -a claude-code`. Or copy the skill folder (skills/worktree in murray17/rovai-ai) 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 murray17/rovai-ai --skill worktree -a codex`. Or copy the skill folder (skills/worktree in murray17/rovai-ai) 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 murray17/rovai-ai --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 no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Worktree use?

Worktree is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktree use?

About 954 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Worktree?

Skills that share tags, products or a category with Worktree: Build Px4 macOS (PX4/PX4-Autopilot, 13k stars), Worktree (AgentsMesh/AgentsMesh, 2.4k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars) and Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree?

murray17 (a GitHub user) maintains it in murray17/rovai-ai, which has 138 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

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