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.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install swarm-janitor或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install swarm-janitor⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/swarm-janitor/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: swarm-janitor description: 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. homepage: https://github.com/openclawdad/swarm-janitor author: OpenClawdad (Redclay) tags: [maintenance, cleanup, subagents, memory-management, enterprise] metadata: clawdbot: emoji: 🧹 requires: bins: [python3] install: [] ---
Enterprise-grade cleanup tool for OpenClaw subagent management.
Automatically identifies and cleans up orphaned subagent sessions while preserving important work through SuperMemory archival.
This skill implements multiple safety layers:
# Preview what would be cleaned (dry-run)
python3 scripts/swarm_janitor.py --dry-run
# Archive old sessions to SuperMemory, then clean
python3 scripts/swarm_janitor.py --archive --clean
# Custom retention (7 days instead of default 3)
python3 scripts/swarm_janitor.py --retention-days 7 --clean
```bash cp -r skills/swarm-janitor ~/.openclaw/workspace/skills/ ```
```bash # Edit config to customize nano references/config.yaml ```
```bash python3 ~/.openclaw/workspace/skills/swarm-janitor/scripts/swarm_janitor.py --dry-run ```
# Run daily at 3 AM, archive sessions older than 3 days
0 3 * * * python3 ~/.openclaw/workspace/skills/swarm-janitor/scripts/swarm_janitor.py --archive --clean --retention-days 3 >> /var/log/swarm-janitor.log 2>&1
# See what would be deleted
python3 scripts/swarm_janitor.py --dry-run --verbose
# Archive transcripts to SuperMemory
python3 scripts/swarm_janitor.py --archive
# Clean without archiving (not recommended)
python3 scripts/swarm_janitor.py --clean --no-archive
# Full report
python3 scripts/swarm_janitor.py --report --output json
# Aggressive cleanup with 1-day retention
python3 scripts/swarm_janitor.py --clean --retention-days 1 --force
See references/config.yaml for:
~/.openclaw/agents/main/sessions/| Check | Description | |-------|-------------| | Process Check | Verifies no active process owns the session | | Age Verification | Only processes sessions older than threshold | | Size Limits | Warns on unusually large deletions | | Dry-Run Default | Preview mode is default — explicit action required | | Backup First | Archives to SuperMemory before any deletion |
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
MIT - Created by OpenClawdad (Redclay) for the OpenClaw community.
安装 Swarm Janitor 后,可以对 AI 说这些话来触发它
Help me get started with Swarm Janitor
Explains what Swarm Janitor does, walks through the setup, and runs a quick demo based on your current project
Use Swarm Janitor to enterprise-grade OpenClaw skill for cleaning up orphaned subagent p...
Invokes Swarm Janitor with the right parameters and returns the result directly in the conversation
What can I do with Swarm Janitor in my product manager workflow?
Lists the top use cases for Swarm Janitor, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/swarm-janitor/ 目录(个人级,所有项目可用),或 .claude/skills/swarm-janitor/(项目级)。重启 AI 客户端后,用 /swarm-janitor 主动调用,或让 AI 根据上下文自动发现并使用。
Swarm Janitor 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Swarm Janitor 可免费安装使用。请查阅仓库了解许可证信息。
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.
Swarm Janitor 属于「Product Manager」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my product manager tasks using Swarm Janitor
Identifies repetitive steps in your workflow and sets up Swarm Janitor to handle them automatically