Skip to main content

worktree-workspace

Open every git worktree of a project in one VS Code window, each folder labeled by its agent session's title. Use for /worktree-workspace, reviewing worktrees in VS Code, or seeing which worktree holds which task.

来源信息

仓库
udecode/dotai
最近来源活动
2026年10月29日 12:59
检测到的 SKILL.md 语言
英语
星标
1,161
Forks
82

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
3 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
worktree-workspace
description
Open every git worktree of a project in one VS Code window, each folder labeled by its agent session's title. Use for /worktree-workspace, reviewing worktrees in VS Code, or seeing which worktree holds which task.
argument-hint
[--all]
# Worktree workspace Run `node <this skill>/scripts/workspace.mjs --repo <checkout> --open` from any folder. It writes `<checkout parent>/<repo>-worktrees.code-workspace` and opens it in VS Code. The script labels folders and never moves them, because the app tracks a session by its working folder, and a title changes at every stage. - The main checkout comes first, labeled `<repo> · <branch>`. - A worktree a session works in shows that session's latest title, with `(archived)` when it is archived. - A worktree with no session of its own, such as one a session made from inside another folder, shows its folder name and last commit subject. - A label two folders share gets ` · <folder>` appended. - The script lists only worktrees under `<checkout>/.claude/worktrees`. `--all` adds the rest, such as scratch proof worktrees. Titles come from `--sessions <file>`, a JSON array with each session's `cwd` and `title` (Claude Code desktop's `list_sessions` output works), or else from the Claude desktop app's session store. The store's format is private, so the script stops with an error when it changes instead of writing unlabeled folders. Rerun the command to refresh labels; VS Code reloads an open workspace file when it changes. Report the path and the label list it prints.
在 GitHub 查看