From hermes-qq
Cleans OpenClaw sessions: deletes old cron .jsonl files except main, rebuilds sessions.json for existing files only, checks counts/sizes, reports changes.
npx claudepluginhub chujianyun/skills --plugin hermes-qqThis skill uses the workspace's default tool permissions.
当用户要求清理 OpenClaw session、删除旧的 cron session 文件、缩小 `sessions.json`、或重建 session 索引时,执行下面这段操作:
Cleans Claude Code sessions in current project: lists recent ~/.claude/projects/<slug> sessions by mtime, selects by index/sessionId, deletes .jsonl files and attachment dirs after confirmation. Triggers: 'clean cc sessions', '清理 cc 会话'.
Runs health checks and manages OpenClaw bot config: gateway processes, JSON validation, channels/plugins status, WhatsApp/Telegram credentials, cron jobs, logs, and SQLite memory DB.
Cleans old tracking data from ~/.claude-context-optimizer/, deletes sessions older than specified days or resets all with confirmation. Shows data size first.
Share bugs, ideas, or general feedback.
当用户要求清理 OpenClaw session、删除旧的 cron session 文件、缩小 sessions.json、或重建 session 索引时,执行下面这段操作:
Check how many session files are in ~/.openclaw/agents/main/sessions/ and how big sessions.json is. If there are thousands of old cron session files bloating it, delete all the old .jsonl files except the main session, then rebuild sessions.json to only reference sessions that still exist on disk.
~/.openclaw/agents/main/sessions/sessions.json 大小sessions.json 只引用磁盘上仍然存在的 session 文件