wt-removelisted
Install: claude install-skill tkolleh/skills
Consolidate key findings using `zk-merge` skill. Then sync untracked files that carry session knowledge to the primary worktree before closing.
If the user passed arguments, treat them as a brief summary of the purpose of this session.
## Step 1 — Consolidate findings
Run the `zk-merge` skill to capture key decisions, patterns, and learnings from this session into the Zettelkasten.
## Step 2 — Sync untracked session artifacts
Git worktrees share a `.git` object store but have independent working trees. Untracked (git-ignored) files — docs, tooling config, specs — exist only in the worktree's filesystem and are lost when the worktree is removed unless explicitly synced.
### 2a. Discover untracked files
Run `git status --short` in the current worktree and collect all `??` entries.
### 2b. Resolve the destination
The destination is the repo's primary worktree (typically `main` or `master`). Resolve it with:
```bash
git worktree list --porcelain \
| awk '/^worktree/{p=$2} /^branch refs\/heads\/(main|master)$/{print p; exit}'
```
### 2c. Categorize and copy
Use the table below to decide what to sync. For each **Sync** entry, check whether the destination already has the file. Only copy if the source is newer or the destination is absent. Use `cp -r` — never `mv`.
| Pattern | Action | Reason |
|---------|--------|--------|
| `docs/**` | Sync if newer or absent | Project documentation built during the session |
| `.claude/settings.local.json` | Sync if newer or absent