safe-deletelisted
Install: claude install-skill Saturate/agents
# Safe Delete
## Progress Checklist
- [ ] Classify targets (regenerable / git-tracked clean / dirty or untracked)
- [ ] Back up anything that can't be recovered
- [ ] Verify backup exists
- [ ] Delete with SKILL_ACK prefix
- [ ] Verify nothing broke
## Step 0: Classify Every Target
First, check whether you're in a git repository:
```bash
git rev-parse --git-dir 2>/dev/null
```
**Not in a git repo?** Classify everything as either **Regenerable** or **Untracked** and skip git-specific checks below.
For each path being deleted, determine its category:
```bash
# Check if path exists
ls -la <path>
# Check size
du -sh <path>
# Git-only: check if tracked and dirty
git ls-files --error-unmatch <path> 2>/dev/null
git status --porcelain <path>
```
| Category | Examples | Backup needed? |
|----------|---------|---------------|
| **Regenerable** | `node_modules`, `dist`, `.next`, `target`, `bin`, `obj`, `__pycache__`, `.cache`, `build`, `.turbo`, `.parcel-cache`, `coverage` | No — skip to Step 3 |
| **Git-tracked, clean** | Any tracked file with no uncommitted changes | No — `git checkout` can restore |
| **Git-tracked, dirty** | Tracked file with uncommitted changes or staged work | **Yes** — changes not in history yet |
| **Untracked** | New files, generated configs, local data, anything outside a git repo | **Yes** — no recovery path |
If ALL targets are regenerable or git-tracked clean, skip to Step 3.
## Step 1: Back Up
Pick the strategy based on what you're protecting