close-orc-sessionlisted
Install: claude install-skill LandonSchropp/agent-toolkit
# Close Orc Session
Closes an orc session: merges the branch into the default branch, verifies everything is pushed, then deletes the session's worktree and tmux session. The capstone once the work is committed and reviewed.
This skill deletes a worktree, so every step must succeed first. If the merge cannot complete — uncommitted or unreviewed changes, a conflict, or a diverged or unpushed default branch — **STOP** and leave the session intact.
## Process
Every orc session exports its project and session into the shell as `$ORC_PROJECT` and `$ORC_SESSION`. The steps below use those variables directly; if either is empty you are not inside an orc session — **STOP**.
1. **Merge the branch.** Skip this step if `$ORC_SESSION` is `main` — there is no feature branch to merge. Otherwise, **REQUIRED:** use the `git-merge-into-main` skill. It enforces the committed-and-reviewed preconditions, rebases onto the default branch, fast-forwards, pushes, and deletes the branch; it is idempotent when the branch is already merged. **STOP** if it cannot complete the merge — do not delete the session.
2. **Verify origin is in sync.** From the default branch's worktree, `git fetch`, then confirm the local default branch equals `origin/<default>`. **STOP** if they diverge or anything is unpushed — resolve it first. Once the session is deleted, its worktree and any commits left in it are gone.
3. **Delete the session.** Run the deletion as the final action:
```bash
orc delete "$ORC_P