agent/claude/devops/skills/clean-workspaces/SKILL.md
Snider 6e37bd22f0 feat: devops plugin, CLI commands, Codex dispatch fixes, AX sweep
DevOps plugin (5 skills):
- install-core-agent, repair-core-agent, merge-workspace,
  update-deps, clean-workspaces

CLI commands: version, check, extract for diagnostics.

Codex dispatch: --skip-git-repo-check, removed broken
--model-reasoning-effort, --sandbox workspace-write via
--full-auto. Workspace template extracts to wsDir not srcDir.

AX sweep (Codex-generated): sanitise.go extracted from prep/plan,
mirror.go JSON parsing via encoding/json, setup/config.go URL
parsing via net/url, strings/fmt imports eliminated from setup.

CODEX.md template updated with Env/Path patterns.
Review workspace template with audit-only PROMPT.md.
Marketplace updated with devops plugin.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 15:45:16 +00:00

1.5 KiB

name description argument-hint allowed-tools
clean-workspaces This skill should be used when the user asks to "clean workspaces", "clean up old agents", "remove stale workspaces", "nuke completed workspaces", or needs to remove finished/failed agent workspaces from the dispatch queue.
--all | --completed | --failed | --blocked
Bash

Clean Agent Workspaces

Remove stale agent workspaces from the dispatch system.

Steps

  1. List all workspaces with their status:

    for ws in /Users/snider/Code/.core/workspace/*/status.json; do
      dir=$(dirname "$ws")
      name=$(basename "$dir")
      status=$(python3 -c "import json; print(json.load(open('$ws'))['status'])" 2>/dev/null || echo "unknown")
      echo "$status $name"
    done | sort
    
  2. Based on the argument:

    • --completed — remove workspaces with status "completed"
    • --failed — remove workspaces with status "failed"
    • --blocked — remove workspaces with status "blocked"
    • --all — remove completed + failed + blocked (NOT running)
    • No argument — show the list and ask the user what to remove
  3. Show the user what will be removed and get confirmation BEFORE deleting.

  4. Remove confirmed workspaces:

    rm -rf /Users/snider/Code/.core/workspace/<name>/
    
  5. Report how many were removed.

Important

  • NEVER remove workspaces with status "running" — they have active processes
  • ALWAYS ask for confirmation before removing
  • Show the count and names before removing