π¦ ClawHub
Swarm Janitor
by @lvcidpsyche
Enterprise-grade OpenClaw skill for cleaning up orphaned subagent processes, archiving transcripts to SuperMemory, and freeing disk space without losing work. Features dry-run mode, configurable retention policies, and comprehensive safety checks.
π‘ Examples
# Preview what would be cleaned (dry-run)
python3 scripts/swarm_janitor.py --dry-runArchive old sessions to SuperMemory, then clean
python3 scripts/swarm_janitor.py --archive --cleanCustom retention (7 days instead of default 3)
python3 scripts/swarm_janitor.py --retention-days 7 --clean
βοΈ Configuration
See references/config.yaml for:
π Tips & Best Practices
Q: It says "permission denied" A: Ensure you have write access to the sessions directory
Q: Sessions not being detected A: Check the path in config.yaml matches your OpenClaw installation
Q: SuperMemory archive failing A: Verify SuperMemory skill is configured with valid API key
TERMINAL
clawhub install swarm-janitor