worktree-enter

Creates a git worktree for a ticket branch and moves the session into it.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/bbenefield89/skills --skill worktree-enter-bbenefield89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-enter
Source: https://github.com/bbenefield89/skills/tree/main/skills/worktree-enter
Command: npx skills add https://github.com/bbenefield89/skills --skill worktree-enter-bbenefield89

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up an isolated git worktree for a ticket branch is error-prone when done by hand: a plain cd does not move the AI session, the directory-change MCP tool is deferred and must be loaded first, and the move only applies at the end of the turn. This Skill encodes those three mechanics so the worktree is created correctly and the session actually lands inside it. ## Core Features & Use Cases - Ticket resolution: Takes the ticket from the argument, falls back to the current branch name, and asks the user instead of guessing when neither works. - Convention-aware worktree creation: Reads git worktree list to follow the repository's existing path convention (e.g. .claude/worktrees/<TICKET>) and handles remote-only, local, and new-branch cases with the correct git worktree add command. - Reliable session move: Loads the deferred mcp__ccd_directory__change_directory schema via ToolSearch before calling it, and uses absolute paths for any remaining same-turn tool calls. - Use Case: You ask to "pull FACS-123 into a worktree"; the Skill fetches, confirms the branch, creates .claude/worktrees/FACS-123 tracking the remote branch, and moves the session into it. ## Quick Start Ask the assistant to set up a worktree for ticket FACS-123 and move this session into it.

Frequently Asked Questions about worktree-enter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a git worktree for a ticket branch?

Fetch with git fetch origin --prune, confirm the branch exists, then run git worktree add with the appropriate flags: -b <TICKET> --track origin/<TICKET> for a remote-only branch, the branch name alone if it exists locally, or -b <TICKET> origin/main for a new branch.

Why doesn't cd move my AI session into the worktree?

A cd inside a Bash call applies only to that single command; the session stays in its original directory. The session moves only through the mcp__ccd_directory__change_directory MCP tool, and that change takes effect at the end of the turn.

Why does calling mcp__ccd_directory__change_directory fail with InputValidationError?

The tool is deferred, so its schema is not loaded by default. Load it first with ToolSearch using the query select:mcp__ccd_directory__change_directory, then call it with the absolute worktree path.

Where should git worktrees be placed in a repository?

Follow the convention shown by git worktree list in the repository. FSI repositories place worktrees at <REPO_ROOT>/.claude/worktrees/<TICKET>, which is also the default when no worktrees exist yet.

Is git stash safe to use across multiple worktrees?

No. All worktrees of one repository share a single stash stack, so a bare git stash pop can take work belonging to a different session. Park work in progress with a temporary WIP commit instead.