From vibing-nvim
Creates, lists, attaches, and finishes git-worktree-backed isolated work areas for vibing.nvim chats via natural language. Use to split work into its own worktree, switch between worktrees, view existing ones, or clean up.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vibing-nvim:vibing-worktreeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Git worktrees provide isolated working directories for parallel development. This skill uses
Git worktrees provide isolated working directories for parallel development. This skill uses
plain git commands and this chat's own frontmatter — no bespoke helper script, no metadata
file. A worktree's existence on disk is its entire state.
Worktrees created for isolated work go under .vibing/worktrees/<branch-name>/ at the git
root — flat, one worktree per directory, nothing else stored alongside it. This convention is
also stated in every vibing.nvim chat's system prompt; follow it so git worktree list stays
predictable for later listing.
git worktree list --porcelain
For a one-line hint of what was last done on a given worktree's branch:
git log -1 --format=%s <branch>
This shows every worktree registered against the repo, not just ones under
.vibing/worktrees/ — including ones created outside vibing.nvim entirely (a bare
git worktree add, or claude --worktree run directly in a terminal). Present branch, path,
and (if you fetched it) the last commit message so the user can pick one, whether they're asking
out of curiosity or as a lead-in to attaching.
Derive a short, English, lowercase, kebab-case branch name from the task being discussed
(e.g. "認証セッションのバグを直したい" → fix-auth-session-bug). Confirm it with the user if
the mapping isn't obvious — a wrong name is annoying to rename later.
Create the worktree:
git worktree add -b <branch> .vibing/worktrees/<branch>
If this fails (branch already checked out elsewhere, etc.), the error is self-explanatory — surface it verbatim rather than retrying blindly with a different name.
Find this chat's own file path. The system prompt contains a line like
Current vibing.nvim chat buffer file: /path/to/chat.md — use that path directly. It is
injected per-request by vibing.nvim and is always accurate even when multiple chat buffers
are open. Avoid calling mcp__vibing-nvim__nvim_get_info for this purpose; it returns
whichever buffer currently has focus in Neovim and may return the wrong one.
Edit that chat's frontmatter through the live Neovim buffer, not the file on disk — a brand-new
chat (first exchange in a freshly opened buffer) has no file on disk yet, so Read/Edit
against the path will simply fail or find nothing. Use the vibing-nvim MCP tools instead,
which operate on buffer content regardless of save state:
nvim_list_buffers and match name against the chat buffer path from the system
prompt to get its bufnr. Don't assume bufnr: 0 (current buffer) — the chat buffer may
not have focus.nvim_get_buffer({ bufnr }) to read the current content.working_dir: .vibing/worktrees/<branch> (relative to the git root) in the frontmatter
block, then call nvim_set_buffer({ bufnr, lines }) with the full updated content.Don't open a new chat buffer — the current conversation continues, and its next turn already runs in the new worktree.
If the vibing-nvim MCP connection isn't available at all, tell the user the worktree is
ready at .vibing/worktrees/<branch> and that they'll need to set working_dir in the chat's
frontmatter by hand (or open a new chat there) to actually start using it.
Works the same whether this is a brand-new chat's first exchange or mid-conversation in an existing one.
working_dir
frontmatter at the chosen worktree's path — the worktree already exists, so skip the
git worktree add step (step 2).git worktree remove <path>
Never add --force. If git refuses because of uncommitted changes, that's it protecting the
user from losing work — report the exact error and let them decide whether to commit, stash, or
discard those changes themselves, rather than retrying with --force on their behalf.
If the removed path was this chat's own working_dir, clear that frontmatter field once removal
succeeds (reverting to the main repo root) — leaving it pointed at a now-deleted directory would
break the next turn.
npx claudepluginhub shabaraba/vibing.nvim --plugin vibing-nvimAutomates Git worktree management: create isolated worktrees with branch creation and env/package setup, list active worktrees, and remove them with branch cleanup.
Creates a git worktree for isolated parallel development — new branch in a separate directory with project setup and test baseline. Enables multiple Claude Code sessions on different tasks simultaneously.
Creates isolated git worktrees for parallel development without disrupting the main workspace. Includes safety verification to prevent accidental commits of worktree contents.