Session Cleanup (Hypercho)
v1.1.0Clean up OpenClaw session storage across all agents. Removes tombstone files (.reset, .deleted, .bak), old cron session .jsonl files, orphan files, and stale...
⭐ 0· 98·0 current·0 all-time
byDuola@duolahypercho
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description, SKILL.md, and the included Python script all focus on scanning ~/.openclaw/agents/*/sessions/ and deleting tombstones, old cron .jsonl files, orphan .jsonl files, and stale sessions.json entries. There are no unrelated environment variables, binaries, or external services requested.
Instruction Scope
Instructions are scoped to local session storage and provide a dry-run mode and single-agent target. Minor concerns: the SKILL.md includes cron scheduling/model metadata (scheduling the skill to run automatically) and the script uses a simple substring check for cron sessions (is_cron_session returns True if 'cron' appears anywhere in the key), which could misclassify some entries. Otherwise the instructions do not request unrelated files or secrets.
Install Mechanism
No install spec or external downloads; this is an instruction-only skill with a local Python script included. Nothing will be fetched from remote URLs during install.
Credentials
No environment variables, credentials, or external config paths are required. The script reads and writes only within user home ~/.openclaw/agents/*/sessions/ (and writes a local backup .json.bak). That access level is proportionate to a session-cleanup tool, but it does have broad filesystem scope limited to OpenClaw agent folders.
Persistence & Privilege
The skill is not always:true and does not request permanent platform privileges, but SKILL.md explicitly recommends adding a daily cron job for automatic runs. Combined with the ability for the agent to invoke skills autonomously (platform default), this means the script can be scheduled to run unattended — ensure you want automatic deletion across all agents.
Assessment
This skill appears to do exactly what it says (clean local OpenClaw session folders) and does not request credentials or network access, but take these precautions before enabling automatic runs: 1) Inspect the script yourself (it backs up sessions.json to sessions.json.json.bak) and confirm the deletion rules match your policies. 2) Always run the dry-run first: python3 <skill_dir>/scripts/session_cleanup.py --dry-run and review output. 3) Verify sessions.json backup behavior and that backups are created where you expect. 4) Test on a single agent (python3 ... --agent <name>) before running across all agents. 5) Be aware the cron recommendation will run unattended; only add it to cron after tests. 6) Note the script classifies cron sessions by substring match ('cron' in key) — if your session keys use different naming, confirm it won't remove needed data. If you want extra safety, run the script under a user/account with limited access or add additional logging/notification before deleting.Like a lobster shell, security has layers — review code before you run it.
latestvk97fzk7gfmeehjca1y8kmzfjy983adra
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
