Skip to main content
skill CX Codex

houseclean — Claude Code skill: what it does, how to install

houseclean audits every attached drive for abandoned git worktrees, bloated AI-tool caches, and rebuildable build artifacts, then lays out a cleanup plan.

MIT ★ 937 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local
Open on GitHub

What houseclean does

The skill runs through phases, starting with a drive survey via Get-PSDrive and a scan of the heaviest folders on the C drive, tagging each one as AI-tool-data, IDE-cache, Package-cache, or similar. It then checks worktrees with git worktree list, sorting them into SAFE TO REMOVE, REVIEW FIRST, STALE, and ACTIVE; anything in the first two categories gets removed automatically with git worktree remove "{path}" --force, while the rest waits for user confirmation.

A separate pass checks cache folders such as .ollama, .gemini, .cursor, .windsurf, .codex, .continue, plus npm and pip caches, flagging anything over 500 MB. For moving data off the C drive it supplies exact commands: robocopy combined with an OLLAMA_MODELS environment variable for Ollama, or a junction via mklink /J for Cursor and Codex. These PowerShell steps target Windows; on macOS or Linux the same checks are done with du -sh and df -h against paths under ~/.

It also scans for node_modules, .venv, __pycache__ and similar folders untouched for over 30 days, always asking before deleting anything there. For structural project issues rather than disk cleanup, the skill's own description points to /organize instead.

What it helps with

  • see what's filling up the C drive or other attached drives
  • clear out abandoned git worktrees after branches get merged
  • move Ollama, Gemini CLI, or Cursor cache data to another drive
  • spot node_modules and .venv folders that can just be rebuilt
  • get exact migration commands for a specific cache or tool

Example prompts for the agent

  • Run /houseclean and show me what can be freed up on drive C
  • Run /houseclean --worktrees and clear out the abandoned ones
  • Walk me through moving Ollama to drive F with /houseclean --migrate ollama

How to install houseclean

1Plugin marketplace

/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local

This installs the whole citadel plugin with all its skills

2Skills CLI (Vercel)

npx skills add SethGammon/Citadel --skill houseclean -a claude-code

3Manually: put the files in place

~/.claude/skills/houseclean/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/houseclean/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about houseclean

How do I install houseclean in Claude Code?

Run /plugin marketplace add SethGammon/Citadel, then /plugin install citadel@citadel-local. Alternatively, run npx skills add SethGammon/Citadel --skill houseclean -a claude-code, which places the file at ~/.claude/skills/houseclean/SKILL.md.

What does houseclean do?

It surveys every drive, locates orphaned git worktrees, oversized AI-tool caches like Ollama, Gemini, and Cursor, and rebuildable artifacts such as node_modules, then outputs a prioritized plan with specific removal and migration commands.

What options does the /houseclean command take?

It supports --quick for a drive overview plus easy fixes, --worktrees, --ai-tools, --projects, and --migrate X where X is ollama, gemini, npm, or cursor, which returns migration steps for that specific tool.

Source text

SKILL.md · MIT
---
name: houseclean
license: MIT
description: >-
  Cross-drive storage audit and cleanup. Surveys all drives, finds orphaned git
  worktrees, large AI tool caches (.ollama, .gemini, .cursor, npm, pip), and
  buildable artifacts (node_modules, .venv). Produces a prioritized action plan
  with specific migration commands. Use when disk space is low or worktrees need
  cleanup; do NOT use for project structure issues (use /organize instead).
user-invocable: true
auto-trigger: false
trigger_keywords:
  - houseclean
  - house clean
  - disk space
  - free space
  - c drive full
  - drive full
  - running out of space
  - clean up disk
  - orphaned worktrees
  - clean worktrees
  - disk audit
  - storage audit
  - move to another drive
  - free up space
last-updated: 2026-04-03
---

# /houseclean — Storage Audit and Cleanup

Use when disk space is low, AI tool caches are bloated, or worktrees need cleanup.
Do NOT use for project structure issues (use `/organize`) or pre-merge worktree review (use `/merge-review`).

## Orientation

**Use when:** cross-drive storage audit -- finds orphaned repos, stale branches, and large directories across all drives.
**Don't use when:** auditing project infrastructure only (use /infra-audit); cleaning a specific directory (use Bash directly).

## Invocation Forms

```
/houseclean              # Full audit — all phases
/houseclean --quick      # Drive survey + quick wins only (no deep scan)
/houseclean --worktrees  # Orphaned worktree audit only
/houseclean --ai-tools   # AI tool cache audit only
/houseclean --projects   # Project artifact scan only (node_modules, .venv, etc.)
/houseclean --migrate X  # Migration instructions for a specific tool (ollama, gemini, npm, cursor)
```

## Protocol

### Phase 1: Drive Survey

**Windows (PowerShell):**
```powershell
Get-PSDrive -PSProvider FileSystem | Select-Object Name, Used, Free, Root | Format-Table -AutoSize
```

Present as a table with Drive, Total, Used, Free, Label columns.

Thresholds: C: free < 5 GB → CRITICAL. C: free < 20 GB → WARNING.
Store which drives have free space — these are migration targets.

### Phase 2: C Drive Hot Spots

**Windows (PowerShell):**
```powershell
Get-ChildItem "C:\Users\$env:USERNAME" -Directory -ErrorAction SilentlyContinue |
  ForEach-Object {
    $s = (Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue |
          Measure-Object -Property Length -Sum).Sum
    [PSCustomObject]@{ GB = [math]::Round($s/1GB,2); Path = $_.Name }
  } | Sort-Object GB -Descending | Select-Object -First 15 | Format-Table -AutoSize
```

Tag each entry:
- **AI-tool-data** — `.ollama`, `.gemini`, `.cursor`, `.windsurf`, `.codex`, `.continue`
- **IDE-cache** — `.vscode`, `.idea`, `AppData\Local\JetBrains`
- **Package-cache** — `AppData\Local\npm-cache`, `AppData\Local\pip\cache`, `.gradle`, `.m2`
- **Conversation-history** — `.claude\projects`
- **Projects** — `Desktop`, `Documents`, user project directories
- **System** — `AppData\Local\Microsoft`, `AppData\Roaming`

### Phase 3: Orphaned Worktree Audit

```bash
git rev-parse --show-toplevel
git worktree list
```

For each worktree (excluding main):
1. Check if branch is merged: `git branch --merged HEAD | grep "{branch-name}"`
2. Verify worktree directory exists
3. Check uncommitted changes: `git -C "{worktree-path}" status --short`

Classify:
- **SAFE TO REMOVE** — merged into HEAD, no uncommitted changes
- **REVIEW FIRST** — not merged, has changes
- **STALE** — path missing (registered but deleted)
- **ACTIVE** — not merged, no changes (possibly in-flight)

Auto-remove SAFE TO REMOVE and STALE:
```bash
git worktree remove "{path}" --force
git branch -d "{branch-name}"
```

Report what was removed. Ask before touching REVIEW FIRST or ACTIVE.

### Phase 4: AI Tool Cache Audit

Check these paths (Windows). Report any > 500 MB:
```
~/.ollama/models          → Ollama LLM models
~/.gemini/antigravity     → Gemini CLI data/cache
~/.cursor                 → Cursor editor
~/.windsurf               → Windsurf editor
~/.codex                  → Codex CLI
~/.continue               → Continue.dev extension
~/.cache/huggingface      → HuggingFace model cache
AppData/Local/npm-cache   → npm package cache
AppData/Local/pip/cache   → pip package cache
AppData/Local/Temp        → Windows temp files
```

Tag recommended action:
- **SAFE TO CLEAR** — rebuilds automatically (npm, pip, temp)
- **MOVE** — redirectable via env var (ollama models, gemini)
- **REVIEW** — needs user decision (cursor settings, IDE data)

### Phase 5: Project Artifact Scan

Scan C: for rebuildable artifacts: `node_modules`, `.venv`, `__pycache__`, `.pytest_cache`, `dist/`, `build/`. Report path, size, last modified. Flag items not modified in > 30 days. Ask user before deleting any.

### Phase 6: Quick Wins Report

```
=== QUICK WINS (safe to act on now) ===
1. npm-cache              5.7 GB   CLEAR    npm cache clean --force
2. Merged worktrees (17)   50 MB   REMOVED  (already done)

=== MOVE TO ANOTHER DRIVE ===
3. ~/.ollama/models       15.8 GB  MOVE→F:  See migration guide
4. ~/.gemini              10.2 GB  MOVE→F:  See migration guide

=== REVIEW WITH USER ===
5. ~/.claude/projects      3.1 GB  REVIEW   Old conversation history

Total recoverable on C: ~47 GB
```

### Phase 7: Migration Reference

#### Ollama (models → another drive)
```powershell
Get-Process ollama -ErrorAction SilentlyContinue | Stop-Process
robocopy "C:\Users\$env:USERNAME\.ollama" "F:\.ollama" /E /MOVE /LOG:ollama-move.log
[Environment]::SetEnvironmentVariable("OLLAMA_MODELS", "F:\.ollama\models", "User")
```

#### Gemini CLI
Check if `GEMINI_HOME` is supported: `gemini --help | grep -i "home\|data\|dir"`

If supported:
```powershell
robocopy "C:\Users\$env:USERNAME\.gemini" "F:\.gemini" /E /MOVE
[Environment]::SetEnvironmentVariable("GEMINI_HOME", "F:\.gemini", "User")
```

If not supported, create a junction:
```powershell
robocopy "C:\Users\$env:USERNAME\.gemini" "F:\.gemini" /E /MOVE
cmd /c mklink /J "C:\Users\$env:USERNAME\.gemini" "F:\.gemini"
```

#### npm cache
```bash
npm cache clean --force
npm config set cache "F:/npm-cache"
```

#### Cursor/Windsurf/Codex (junction method)
```powershell
robocopy "C:\Users\$env:USERNAME\.cursor" "F:\.cursor" /E /MOVE
cmd /c mklink /J "C:\Users\$env:USERNAME\.cursor" "F:\.cursor"
```

#### git worktrees
Move the main repo to another drive:
```powershell
robocopy "C:\Users\$env:USERNAME\Desktop\ProjectName" "F:\Projects\ProjectName" /E /MOVE
```

After moving, record in `.claude/harness.json` (Citadel's shared config path for all runtimes, including Codex):
```json
{ "storage": { "projects_root": "F:/Projects" } }
```

#### Claude conversation history (`.claude/projects`)
Cannot be relocated. Archive inactive subdirectories to a backup drive, or test symlinking.

---

## Fringe Cases

**macOS/Linux:** Use `du -sh`, `df -h`. Paths shift to `~/`.
**Worktree removed but branch exists:** `git branch -d {branch}` after `git worktree remove`.
**Ollama in use:** Stop before moving model files.
**Junction already exists:** `cmd /c rmdir "C:\...\tool-dir"` (no contents deleted), then recreate.
**No other drives:** Clear caches first (npm, pip, temp), then rebuildable artifacts, then unused Ollama models.

---

## Citadel Infrastructure Integration

After running /houseclean, update `.claude/harness.json` `storage` section with `projects_root`, `ai_tools` paths, and `last_audit` date. Future runs verify migrations are still in place.

---

## Contextual Gates

**Disclosure:** "Auditing all drives. Will present deletion suggestions — nothing deleted without your confirmation."
**Reversibility:** amber — deletes files and directories if user confirms; undo requires git or manual recovery for non-git files
**Trust gates:**
- Any: view audit findings and suggestions
- Familiar (5+ sessions): confirms deletions before executing; novices should review suggestions carefully before confirming

## Quality Gates

- Never delete data without confirming branch is merged into HEAD
- Always verify uncommitted changes before removing a worktree
- Always stop Ollama before moving model files
- Show exact commands — no vague instructions
- Re-run drive survey to confirm C: free space increased
- Update harness.json `storage` section for any migrations completed
- If total freed is 0 GB, surface why and what the user must do manually

---

## Exit Protocol

1. Show total space freed this session
2. Show space still recoverable with user action
3. Show current C: free space
4. Suggest: "/houseclean runs well as a monthly check — use /schedule to add it"

```
---HANDOFF---
- Freed: {X} GB (caches cleared, worktrees removed)
- Pending user action: {Y} GB (AI tools to move, projects to migrate)
- C: free space now: {Z} GB
- harness.json storage section: updated / not updated
- Reversibility: amber — deleted files require git or manual recovery; moved files can be moved back manually
---
```

© SethGammon · MIT · SethGammon/Citadel

Similar skills

All skills for DevOps and infrastructure →

From the same set55

The whole set →
review This skill reviews code in five passes, covering correctness, security, performance, readability, and consistency. Use it on a file, directory, or Git diff. CX Codex +1 ★ 937repo stars schedule Schedules recurring and one-off agent runs: by default it writes a native Task Scheduler or cron entry instead of spending routine quota. CX Codex +1 ★ 937repo stars qa qa launches a real Chromium browser, clicks UI elements, tests frontend user flows, and writes a report with screenshots. CX Codex +1 ★ 937repo stars scaffold scaffold studies existing files before generating new ones, then connects them to registration points the project already uses. It fits codebases with established patterns. CX Codex +1 ★ 937repo stars pr-watch pr-watch monitors pull request CI status in the terminal, inspects failure logs, applies code fixes, and prompts to merge. CX Codex +1 ★ 937repo stars ascii-diagram The ascii-diagram skill plans and renders aligned text diagrams with boxes and arrows. Use it when a diagram needs to live in Markdown, a code comment, or plain text. CX Codex +1 ★ 937repo stars triage triage — a skill for investigating GitHub issues and reviewing PRs. Reads open issues, classifies them, searches the codebase for root cause, proposes fixes with file:line references, and optionally implements them. CX Codex +1 ★ 937repo stars watch watch monitors working directory changes and source marker comments to trigger skills or log batch tasks automatically. CX Codex +1 ★ 937repo stars

Project sponsors

Companies that keep this analytics open