Bobo Session Cleanup
Skill by irideas
Why use this skill?
Safely manage and purge stale OpenClaw session files and orphan data. Keep your agent environment clean and performant with this legacy maintenance skill.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/irideas/bobo-session-cleanupWhat This Skill Does
The Bobo Session Cleanup skill (session-cleanup) is a maintenance utility designed for OpenClaw agents to manage disk space and session integrity. It identifies and removes "orphan" files—.jsonl session files present on the disk but missing from the central sessions.json registry—and prunes stale sessions that exceed a 72-hour inactivity threshold. The utility is engineered for safety, requiring a multi-stage workflow: scanning, generating a plan, and securing explicit user confirmation before any disk deletion occurs. Please note that this specific version is marked as deprecated in favor of session-cleanup-pro, though it remains functional for legacy compatibility.
Installation
To install this skill, use the following ClawHub command in your terminal:
clawhub install openclaw/skills/skills/irideas/bobo-session-cleanup
Ensure that you have bash and node installed on your system, as the skill relies on these binaries to execute its scan and reporting logic.
Use Cases
- Disk Space Management: Automatically reclaim storage occupied by abandoned, long-term session logs that are no longer referenced by the agent.
- System Hygiene: Fix "orphan" file errors that occur when the file system state and the
sessions.jsonregistry diverge. - Audit Readiness: Use the scanning feature to audit active vs. inactive sessions without making unauthorized changes to the file system.
Example Prompts
- "OpenClaw, please scan my session directory to see how much space can be reclaimed by removing stale files."
- "Run the session cleanup scan and give me a summary of orphan files and sessions older than 72 hours."
- "I have reviewed the scan report, please proceed with cleaning up the identified orphan files only."
Tips & Limitations
- Safety First: The agent will never delete the
agent:main:mainsession, ensuring the core agent identity remains intact. - Verification: Always run the scanning command
./skills/session-cleanup/scripts/scan_sessions.sh scanbefore authorizing any deletions. This tool is designed to prevent accidental data loss through a manual confirmation loop. - Deprecation Warning: While this skill works, developers should prioritize migrating to
session-cleanup-proto leverage improved performance, better error handling, and future-proof compatibility with upcoming OpenClaw versions. - Environment: Ensure your system environment has sufficient write permissions in the
~/.openclaw/agents/directory, or the cleanup process may fail when attempting to remove orphaned JSONL files.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-irideas-bobo-session-cleanup": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
Bobo Context Cleanup
Skill by irideas
session-cleanup
Clean orphan .jsonl files and stale sessions in OpenClaw session storage with safe confirmation flow. 适用于会话列表杂乱、历史会话堆积、需要释放存储空间场景;默认保护 72 小时内会话,删除前必须用户确认。
context-cleanup
Analyze and archive low-value memory notes in OpenClaw workspace to reduce context bloat and improve responsiveness. 适用于上下文冗余、维护整理场景;默认流程为 analyze → plan → confirm → archive,归档优先于删除。