worktree
БесплатноЗапускает вложенные скриптыНе проверенLoad to create, list, remove, push, or repair a git worktree.
от vanillagreencom★ 93 звезды на GitHubОб этом скилле
Worktree Management
.agents/skills/worktree/scripts/worktree <command> [options]
Every command's contract is its --help: flags, exit codes, failure semantics and recovery. The top-level worktree --help gives the command index, the path and issue-ID rules, the configuration variables and setup-path hardening.
Commands
| Command | Description |
|---|---|
create |
Claim a new issue worktree |
restack |
Guardedly continue, skip, or abort a tool-created paused restack |
list |
List all worktrees |
remove |
Remove worktree, clean symlinks, prune branches |
cleanup |
Remove worktrees whose branches are merged |
path |
Print the worktree path for an issue ID |
path --hosted |
Print the hosted lane path |
exists |
Check the worktree path for an issue ID |
merged |
Print the commit the issue tree's pull request merged as |
release-branches |
Delete the origin branches named for an ended item whose work the default branch holds |
check |
Pre-create git state check (JSON: uncommitted, unpushed) |
push |
Push worktree branch to remote |
fix-links |
Restore configured symlinks |
repair-links |
Restore configured symlinks, run by the git hooks |
codex-setup / codex-branch / codex-cleanup, claude-setup / claude-cleanup |
App-created worktree hooks |
repair-linksnever destroys untracked data.createis a new-work claim, not a discovery command. Existing ownership exits 75.- Inspect or monitor owned work. Never give it a second implementer.
- Rebase a branch through
worktree push,create --restackorcreate --reuse.
Policy-blocked rebase (cherry-pick replay fallback)
When an execution policy rejects top-level git rebase porcelain:
- Never retry the porcelain.
- Never substitute a raw
--forcepush. - Add
--replayto the guarded restack (create --help). The controls stayrestack continue|skip|abort <ID>.
Read when
- When wiring Codex Desktop or Claude Code to run the app-created worktree hooks, read references/hooks.md.
- When a worktree's
.agentsentry is broken, follow workflows/repair-agent-links.md. - When claiming, refreshing or releasing a worktree lease, or judging whether one is stale, read references/session-guard.md.
worktree-session-guard --helpgives the guard's commands, exit codes and--reposcope. - Before installing JS dependencies in a worktree, read
worktree --help§ Dependencies. It owns install and linked-node_modulesbehavior.
Session guard (ownership leases)
scripts/worktree-session-guard stops cleanup from destroying a claimed worktree. Its lease is a native Git worktree lock whose reason line carries the owner and a heartbeat.
Recovering a failed removal
- Keep the first
removefailure's diagnostic with the lane owner's records. It names the repository, worktree path, retained branch and observed registration and directory state. - Follow the failure or refusal's manual recovery steps from the main checkout.
Reclaiming build output
cleanup --targets-only prunes build output. It keeps the worktree, its branch and every tracked and untracked source file. It previews by default and deletes only under --apply.
- Run it from the main checkout.
- Read the preview.
- Repeat with
--apply.
It skips every leased worktree, with one exception: --worktree PATH --owner ID lets the session holding a worktree's lease prune that one worktree's Cargo profiles, with no retention window.
Configuration
Symlink only what git does not carry.
Установить worktree в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл worktree?
Load to create, list, remove, push, or repair a git worktree.
Как установить скилл worktree?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл worktree запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic