Skip to content
Back to skills

Cleanup

ASecurity

Use when cleaning up peers, sessions, tmux panes, processes, feature worktrees, branches, generated artifacts, or after a delegated lane or PR is complete.

  • 265 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 23, 2026
ai-agentsbashgit

Works with

  • terminal

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add prassanna-ravishankar/repowire --skill cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cleanup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/prassanna-ravishankar-cleanup/badge)](https://www.skillsdirectory.com/skills/prassanna-ravishankar-cleanup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cleanup
description: Use when cleaning up peers, sessions, tmux panes, processes, feature worktrees, branches, generated artifacts, or after a delegated lane or PR is complete.
---

# Cleanup

Cleanup has three parts: mesh registration/session, terminal/process, and workspace artifacts. Treat them separately.

## Before cleanup

Confirm the work is complete, merged or no longer needed, and no peer/reviewer still needs the workspace. Preserve dirty, unmerged, or unpushed user work unless the user explicitly asked for destructive cleanup.

## Safe sequence

1. Check git state in the relevant worktree:
   ```bash
   git fetch origin
   git status --short
   git log @{u}..HEAD
   ```
2. Deregister the peer only when it is no longer needed.
3. Verify terminal state separately:
   ```bash
   tmux list-windows -t <circle>
   ```
4. Kill pane/window only after verifying it is disposable or the user asked.
5. Remove feature worktree and branch only after merge/disposal is clear:
   ```bash
   git worktree remove <feature-worktree-path>
   git worktree prune
   git branch -d <feature-branch>
   ```
6. Re-check mesh, tmux, and worktree state.

## Anti-patterns

- Treating stale mesh rows as proof the terminal is dead.
- Killing terminals that may contain resumable state.
- Pruning worktrees before checking dirty/unpushed work.
- Cleaning up before review or verification is complete.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.