Cleanup

Run session cleanup - delete temp files, NUL files, orphan artifacts

eroslifestyle Updated

File contents

Session Cleanup

Delegates to System Coordinator agent for cleanup operations.

What Gets Cleaned

  • *.tmp files in project directory
  • temp_* and *_temp.* files
  • *.*.tmp.* files (Claude Code temp files with .tmp in middle of filename)
  • *.md.tmp.* files (e.g., CLAUDE.md.tmp.11724.1772521559600)
  • CLAUDE.md.tmp.* files (specific CLAUDE.md temp files)
  • *.py.tmp.* files (Python temp files with .tmp suffix)
  • NUL files (Windows reserved device name artifacts)
  • Orphan backup files beyond retention policy

Windows NUL Deletion

Uses Win32 API for reliable NUL file removal:

python -c "
import os, ctypes
for root, dirs, files in os.walk('PROJECT_PATH'):
    if 'NUL' in files:
        p = os.path.join(root, 'NUL')
        ctypes.windll.kernel32.DeleteFileW(r'\\\\?' + p)
"

Usage

/cleanup
/cleanup PROJECT_PATH

Output Format

CLEANUP: OK | files_deleted=N

eroslifestyle/Claude-Orchestrator-Plugin/tree/main/skills/cleanup commit b13fd0e2ba

Frequently asked questions

npx skillmds@latest add eroslifestyle/cleanup