Official agent skill

Vibe Worktree Manager

by mistralai in mistralai/mistral-vibe

Creates, reuses and cleans up git worktrees under a shared vibe home directory, with per-repo buckets, claim records and dirty-state checks before removal.

OfficialApache-2.0Auto-check passedDevelopment

Install Vibe Worktree Manager

skills CLI
$ npx skills add mistralai/mistral-vibe --skill worktree -a claude-code

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

GitHub CLI
$ gh skill install mistralai/mistral-vibe 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/mistralai/mistral-vibe.git skills-src && mkdir -p .claude/skills && cp -r skills-src/vibe/plugins/builtins/vibe/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
5.1k
Token cost
~1.2k tokens
SKILL.md length
578 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Creates, reuses and cleans up git worktrees under a shared vibe home directory, with per-repo buckets, claim records and dirty-state checks before removal.

  • Works in 7 steps: Compute the bucket from the repo root… → Validate the name (single portable path… → Reserve the directory with mkdir (atomic… → …
  • Starting a task in an isolated git worktree
  • SKILL.md covers Creating a worktree, Holding, Cleaning up and Snapshotting, plus 2 more sections
  • Calls git

What it does

Worktrees are bucketed by a combination of the repository root's name and a hash of its common git directory, so worktrees from different repositories never collide. Creating one validates the name against reserved characters and Windows-reserved names, reserves the directory atomically with mkdir, starts a new branch from the remote's default branch or checks out an existing one, records the worktree's own starting commit as the baseline for later cleanup, and writes a record.json. When no name is given, the skill slugifies the first six words of the prompt into a branch name prefixed with vibe/.

A session using a worktree registers as a holder so background cleanup will not remove it mid-use, and a marker left open by a crashed process is treated as stale. Before removal the skill checks for uncommitted changes, untracked files and new commits since the baseline; the worktree is clean only if all three are absent, and removing a dirty one needs explicit user confirmation because it discards that work.

When your agent uses it

  • Starting a task in an isolated git worktree
  • Listing or reusing an existing worktree for a repo
  • Cleaning up worktrees that are no longer in use

Example prompts

  • “Create a worktree for this bug fix so I don't touch my main checkout.”
  • “List the worktrees for this repo and tell me which ones are stale.”
  • “Clean up the worktree I was using for the auth refactor.”

Requirements

  • git with worktree support

Workflow steps

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

  1. Compute the bucket from the repo root and common git dir.
  2. Validate the name (single portable path segment; no <>:"/|?*, no
  3. Reserve the directory with mkdir (atomic claim — fails if taken).
  4. For a new branch, start from the remote's default branch (fetch first,
  5. git worktree add -b (or without -b for reuse).
  6. Record the worktree's own HEAD as base_commit — this is the baseline for
  7. Write record.json under .claims///.

What it can do on your machine

Read from SKILL.md and the folder at commit 7cb9189. 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

Vibe Worktree Manager loads about 1.2k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 578 words of instructions outside code blocks.

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

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 mistralai/mistral-vibe at commit 7cb9189, republished under its Apache-2.0 licence (© mistralai). 578 words, ~1,167 tokens.

Download SKILL.mdSave it as .claude/skills/worktree/SKILL.md (or your agent's skills folder).
name
worktree
description
Create, reuse, and clean up git worktrees under $VIBE_HOME/worktrees. Use when the user wants to work in an isolated git worktree, create a worktree for a task, or list/remove existing worktrees.
user-invocable
true

Worktree Management

Git worktrees live under $VIBE_HOME/worktrees/ (default ~/.vibe/worktrees/), each in a per-repository bucket named <repo_root.name>-<sha256(common_git_dir)[:12]> so worktrees from different repos never collide.

$VIBE_HOME/worktrees/
  .claims/<bucket>/<name>/          # claim records and holder markers
    record.json                     # metadata: branch, base_commit, branch_created, claimed_at
    recovery.json                   # snapshot metadata for a retained chat
    holders/                        # one empty file per live session
  <bucket>/<name>/                  # the actual git worktree checkout

Creating a worktree

  1. Compute the bucket from the repo root and common git dir.
  2. Validate the name (single portable path segment; no <>:"/\|?*, no trailing space or dot, no Windows reserved names like CON/PRN/NUL/ COM1-COM9/LPT1-LPT9, not . or ..).
  3. Reserve the directory with mkdir (atomic claim — fails if taken).
  4. For a new branch, start from the remote's default branch (fetch first, best-effort). For an existing branch, check it out into the worktree.
  5. git worktree add -b <name> <path> <start_point> (or without -b for reuse).
  6. Record the worktree's own HEAD as base_commit — this is the baseline for cleanup, not the invoking checkout's HEAD.
  7. Write record.json under .claims/<bucket>/<name>/.

When no name is given, derive one by slugifying the prompt: NFKD-normalize, lowercase, replace non-[a-z0-9]+ with -, take the first 6 words, trim to 40 chars, drop trailing stop words. Branch gets a vibe/ prefix. Append -2, -3, etc. on collision (up to 100). Fall back to a random slug if empty.

Reuse an existing worktree only after validating: no symlinks in the path, .git is a file (not a directory), same common git dir, matching branch.

Holding

A session using a worktree must register as a holder to prevent the background cleanup from removing it. Holder files are locked for the lifetime of the session; an unlocked marker left by a crashed process is stale and may be removed. A temporary holder protects a worktree while a session attaches.

Cleaning up

Before removal, inspect the worktree state:

  • Uncommitted changes or untracked files: git -c core.fsmonitor= status --porcelain --untracked-files=all
  • New commits since start: git rev-list --count <base_commit>..HEAD

The worktree is clean only if all three are absent. If dirty, confirm with the user before proceeding — removal discards uncommitted work, untracked files, and new commits.

If the branch pre-existed (not created by this session), confirm separately before deleting it. Re-check holders — if another session still holds the worktree, keep it. cd out of the worktree before removing (Windows refuses to delete a process's cwd).

Remove: git worktree remove --force <path>, then git branch -D <name> if the branch was created this session or the user confirmed. Delete the claim record and rmdir empty directories (never rmtree — a surviving holder must not be lost).

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

Snapshotting

Before retention removes an inactive worktree, save its state to a ref: stage all files (including untracked, excluding ignored) and commit to refs/vibe/reaped/<name>. Use a separate index file so the worktree's own index is untouched. Keep recovery.json after removing the active claim so reopening a chat can recreate the checkout automatically.

Retention

Keep the newest configured number of managed worktrees across repositories. Skip active worktrees. Snapshot each inactive excess worktree before removal; if snapshotting fails, keep it. Reservations without a base_commit are discarded only if empty and no creation process still holds their marker.

Creation, attachment, and retention transitions use a cross-process lock so a worktree cannot be removed while another process is claiming or attaching it.

Gotchas

  • Disable core.fsmonitor when reading someone else's working tree: git -c core.fsmonitor= status.
  • New branches start from the remote default branch, not the current checkout's HEAD.
  • Symlink paths are rejected — not a stable worktree path.
  • git worktree add cannot distinguish a taken path from an invalid ref (both exit 128), so mkdir reserves the path first.
  • Worktrees are implicitly trusted for the session only, not persisted.

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

Files

Just SKILL.md in vibe/plugins/builtins/vibe/skills/worktree of mistralai/mistral-vibe.

Open the folder on GitHubat commit 7cb9189

Compare with similar skills

Vibe Worktree Manager 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.

Vibe Worktree Manager compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vibe Worktree Manager this skillmistralai/mistral-vibe5.1k—~1.2kAutomated safety check: PassApache-2.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT
Git Worktree Managermicrosoft/WindowsAppSDK4.7k—~2kAutomated safety check: PassMIT
Git Committisfeng/Easydict15k—~535Automated safety check: PassGPL-3.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Worktree Manager

    microsoft/WindowsAppSDK

    Official

    Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.

    4.7k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Commit

    tisfeng/Easydict

    起草、创建或汇报 Angular-style 本地 Git 提交。用于明确的提交交付;分支集成使用 worktree-rebase-merge,不 push。

    15k GitHub stars~535 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • 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

More from mistralai/mistral-vibe

All 14 skills in this repo
  • Mistral Vibe Plugin Creator

    mistralai/mistral-vibe

    Official

    Shows how to build a Vibe plugin package in the Agent Plugins 1.0 format, with a plugin.json manifest and optional skills, MCP servers, hooks and other components.

    5.1k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Create Vibe Feature

    mistralai/mistral-vibe

    Official

    Guides feature work in the Mistral Vibe Python CLI so each change lands in the right module and matches the project's architecture decision records.

    5.1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Official

    Plans which analytics events and properties a new feature needs, checks them against the existing event registry, and verifies them per environment.

    5.1k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Write Vibe ADR

    mistralai/mistral-vibe

    Official

    Creates or updates concise Architecture Decision Records for the Mistral Vibe CLI and registers each one in the AGENTS.md decisions table.

    5.1k GitHub stars~942 tokensUpdated yesterday
    Auto-check passed
  • Write Vibe Tests

    mistralai/mistral-vibe

    Official

    Guides writing or refactoring tests for the Mistral Vibe CLI agent so they check behavior through stable boundaries, like tool invocation or saved session shape, instead of internal calls.

    5.1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Mistral Vibe CLI Reference

    mistralai/mistral-vibe

    Official

    Reference for Mistral Vibe, the CLI agent it runs inside: config files, env vars, agents, skills, tools, hooks and MCP servers, so the agent can explain and troubleshoot its own setup.

    5.1k GitHub stars~14k tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about Vibe Worktree Manager

What does Vibe Worktree Manager do?

Creates, reuses and cleans up git worktrees under a shared vibe home directory, with per-repo buckets, claim records and dirty-state checks before removal. Worktrees are bucketed by a combination of the repository root's name and a hash of its common git directory, so worktrees from different repositories never collide.json.

When should I use Vibe Worktree Manager?

Vibe Worktree Manager fits situations like: starting a task in an isolated git worktree; listing or reusing an existing worktree for a repo; cleaning up worktrees that are no longer in use.

How do I install Vibe Worktree Manager in Claude Code?

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

How do I install Vibe Worktree Manager in Codex?

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

Can I use Vibe Worktree Manager 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 mistralai/mistral-vibe --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 Vibe Worktree Manager need to run?

Going by SKILL.md and its folder, Vibe Worktree Manager needs the command-line tools its instructions call (git). Our summary lists: git with worktree support.

Does Vibe Worktree Manager 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 Vibe Worktree Manager 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 Vibe Worktree Manager use?

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

How many tokens does Vibe Worktree Manager use?

About 1.2k tokens (SKILL.md is roughly 4.7k 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 Vibe Worktree Manager?

Skills that share tags, products or a category with Vibe Worktree Manager: Finishing a Development Branch (obra/superpowers, 296k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars), Ccmanager Config (kbwo/ccmanager, 1.3k stars) and Git Worktree Manager (microsoft/WindowsAppSDK, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vibe Worktree Manager?

mistralai (a GitHub organization, an official publisher) maintains it in mistralai/mistral-vibe, which has 5,073 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

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