git-wtlisted
Install: claude install-skill to4iki/skills
# Git Wt
Create a worktree with `git wt` and work without polluting the main branch.
If anything goes wrong, `git wt -d` cleans it back up.
## Workflow
### Step 1: Create the worktree
Pick a branch name from the task description and create the worktree.
```bash
git wt <branch-name> --nocd
```
`--nocd` keeps the current directory in place after creation and only prints the new worktree path to stdout.
The worktree is created under `.wt/<branch-name>/`. Hold on to the printed path as a logical variable `WORKTREE_PATH` in the agent's context — this is a name used to reference the path in later steps, not a shell environment variable.
### Step 2: Work inside the worktree
Every subsequent operation must happen under `WORKTREE_PATH`.
- Read/Edit/Write tools: pass absolute paths like `$WORKTREE_PATH/src/...`
- Bash: `cd $WORKTREE_PATH && <command>`
### Step 3: Report completion
After the work is done, tell the user:
- The list of changed files and a brief summary
- The worktree path
- How to merge (e.g. `cd $WORKTREE_PATH && git push -u origin <branch-name>` → open a PR)
### Step 4: Cleanup
Following the behavior of Claude Code's `claude -w`, branch cleanup based on whether there are changes.
#### No changes (nothing committed, nothing modified)
Automatically delete the worktree and branch. No user confirmation needed.
```bash
git wt -d <branch-name>
```
#### Changes or commits exist
Ask the user whether to **keep** or **delete**:
- **Keep**: leave the worktree an