ce-worktree

Installation
SKILL.md

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/direnv configs, with branch-aware safety rules so review branches do not auto-grant trust to untrusted .envrc content
  • Adds .worktrees to .gitignore if not already ignored
  • Does not modify the main repo checkout — from-branch is 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-branch defaults to origin's default branch (or main if that cannot be resolved)
Related skills

More from everyinc/compound-engineering-plugin

Installs
196
GitHub Stars
16.7K
First Seen
Apr 19, 2026