ce-worktree
БесплатноЗапускает вложенные скриптыНе проверенCreate an isolated git worktree for parallel feature work or PR review. Use when starting work that should not disturb the current checkout, or when `ce-work`…
от Ouro-labs★ 17 звёзд на GitHubОб этом скилле
Worktree Creation
Create a worktree under .worktrees/<branch> with branch-specific setup that git worktree add alone does not handle:
- Copies
.env,.env.local,.env.test, etc. from the main repo (skips.env.example) - Trusts
mise/direnvconfigs, with branch-aware safety rules so review branches do not auto-grant trust to untrusted.envrccontent - Adds
.worktreesto.gitignoreif not already ignored - Does not modify the main repo checkout —
from-branchis fetched, not checked out
Creating a worktree
Invoke the bundled script via the runtime Bash tool. On Claude Code, ${CLAUDE_SKILL_DIR} resolves to the skill's own directory across both marketplace-cached installs and claude --plugin-dir local development; the runtime Bash tool's CWD is the user's project, not the skill directory, so a bare bash scripts/worktree-manager.sh fails. On other targets (Codex, Gemini, Pi, etc.) ${CLAUDE_SKILL_DIR} is unset and the :-. fallback yields the bare relative path those harnesses expect.
bash "${CLAUDE_SKILL_DIR:-.}/scripts/worktree-manager.sh" create <branch-name> [from-branch]
Defaults:
from-branchdefaults to origin's default branch (ormainif that cannot be resolved)- The new branch is created at
origin/<from-branch>(or the local ref if the remote is unavailable)
Examples:
bash "${CLAUDE_SKILL_DIR:-.}/scripts/worktree-manager.sh" create feat/login
bash "${CLAUDE_SKILL_DIR:-.}/scripts/worktree-manager.sh" create fix/email-validation develop
After creation, switch to the worktree with cd .worktrees/<branch-name>.
Other worktree operations
Use git directly — no wrapper is needed and none is provided:
git worktree list # list worktrees
git worktree remove .worktrees/<branch> # remove a worktree
cd .worktrees/<branch> # switch to a worktree
cd "$(git rev-parse --show-toplevel)" # return to main checkout
To copy .env* files into an existing worktree created without them, run this from the main repo (not from inside the worktree, since branch names often contain slashes like feat/login):
cp .env* .worktrees/<branch>/
Dev tool trust behavior
When mise or direnv configs are present, the script attempts to trust them so hooks and scripts do not block on interactive prompts. Trust is baseline-checked against a reference branch:
- Trusted base branches (
main,develop,dev,trunk,staging,release/*): the new worktree's configs are compared against that branch; unchanged configs are auto-trusted.direnv allowis permitted. - Other branches (feature branches, PR review branches): configs are compared against the default branch;
direnv allowis skipped regardless, because.envrccan source files that direnv does not validate.
Modified configs are never auto-trusted. The script prints the manual trust command to run after review.
When to create a worktree
Create a worktree when:
- Reviewing a PR while keeping the main checkout free for other work
- Running multiple features in parallel without branch-switching overhead
- Keeping the default branch free of in-progress state
Do not create a worktree for single-task work that can happen on a branch in the main checkout.
Integration
ce-work and ce-code-review offer this skill as an option. When the user selects "worktree" in those flows, invoke bash "${CLAUDE_SKILL_DIR:-.}/scripts/worktree-manager.sh" create <branch> with a meaningful branch name derived from the work description (e.g., feat/crowd-sniff, fix/email-validation). Avoid auto-generated names like worktree-jolly-beaming-raven that obscure the work.
Troubleshooting
"Worktree already exists": the path is already in use. Either switch to it (cd .worktrees/<branch>) or remove it (git worktree remove .worktrees/<branch>) before recreating.
"Cannot remove worktree: it is the current worktree": cd out of the worktree first, then git worktree remove.
Dev tool trust was skipped: the script prints the manual command. Review the config diff (git diff <base-ref> -- .envrc), then run the printed command from the worktree directory.
Установить ce-worktree в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(bash *worktree-manager.sh)Вложенные файлы
FAQ
Что делает скилл ce-worktree?
Create an isolated git worktree for parallel feature work or PR review. Use when starting work that should not disturb the current checkout, or when `ce-work` or `ce-code-review` offers a worktree option.
Как установить скилл ce-worktree?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ce-worktree запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic