ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified system Safety 2/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/irideas/bobo-session-cleanup
Or

What 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

  1. Disk Space Management: Automatically reclaim storage occupied by abandoned, long-term session logs that are no longer referenced by the agent.
  2. System Hygiene: Fix "orphan" file errors that occur when the file system state and the sessions.json registry diverge.
  3. Audit Readiness: Use the scanning feature to audit active vs. inactive sessions without making unauthorized changes to the file system.

Example Prompts

  1. "OpenClaw, please scan my session directory to see how much space can be reclaimed by removing stale files."
  2. "Run the session cleanup scan and give me a summary of orphan files and sessions older than 72 hours."
  3. "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:main session, ensuring the core agent identity remains intact.
  • Verification: Always run the scanning command ./skills/session-cleanup/scripts/scan_sessions.sh scan before 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-pro to 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

Author@irideas
Stars2287
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-irideas-bobo-session-cleanup": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#cleanup#maintenance#storage#session-management#optimization
Safety Score: 2/5

Flags: file-write, file-read, code-execution