Openclaw session cleaner

From chujianyun/skills · View interactive version

Openclaw session cleaner is an AI agent skill from the GitHub repository chujianyun/skills. OpenClaw session 清理助手。用于用户提到清理 OpenClaw sessions、删除旧 cron session、压缩或重建 sessions.json、排查 session 文件膨胀时使用。触发后优先检查 ~/.openclaw/agents/main/sessions/ 下的 session 文件数量和 sessions.json 大小,并按指令执行清理。

How to use this skill

Skill file

OpenClaw Session Cleaner

当用户要求清理 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.

使用要求

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.