session-cleaner

Community

Clean up OpenClaw sessions and reset state safely.

Authorxdrshjr
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automates the cleanup of OpenClaw sessions, clearing context and restarting the gateway to provide a clean state for the next user interaction.

Core Features & Use Cases

  • Session cleanup: closes all sub-agent sessions and purges transient data.
  • Context reset: clears runtime context to avoid data leakage between runs.
  • Safe recovery: backs up current sessions.json and restarts the gateway to recover a clean state.

Quick Start

Quick cleanup (keep current session) commands: openclaw sessions list pkill -9 -f "openclaw-gateway" python3 ~/clawd/skills/session-cleaner/scripts/clean_sessions.py openclaw gateway start

Full reset workflow: User should send: /new Then run the cleanup steps above

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: session-cleaner
Download link: https://github.com/xdrshjr/JR-Agent-Skills/archive/main.zip#session-cleaner

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.