Lite Session Cleaner
/install lite-session-cleaner
Session Cleaner Skill
This skill is designed to be run via a cron job or periodic task to monitor and prune stale sessions.
Usage
The skill relies on openclaw sessions_list to identify old sessions and openclaw sessions_kill to terminate them. It can be integrated into a TaskFlow or run as a standalone script via exec.
Implementation Logic
- Identify: Use
sessions_listto retrieve all active sessions. - Filter: Compare the
last_activitytimestamp of each session with the current time. - Action: For sessions where
current_time - last_activity > 3600seconds:- Send a message to the session's target channel (e.g., via
messagetool) stating: "当前会话已经结束". - Execute
sessions_kill \x3Csession_id>.
- Send a message to the session's target channel (e.g., via
- Log: Record the cleaning action in the daily log.
Requirements
openclawCLI installed and accessible.- Access to session metadata.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install lite-session-cleaner - After installation, invoke the skill by name or use
/lite-session-cleaner - Provide required inputs per the skill's parameter spec and get structured output
What is Lite Session Cleaner?
Automatically cleans up inactive sessions (older than 1 hour) and sends a notification. It is an AI Agent Skill for Claude Code / OpenClaw, with 101 downloads so far.
How do I install Lite Session Cleaner?
Run "/install lite-session-cleaner" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Lite Session Cleaner free?
Yes, Lite Session Cleaner is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Lite Session Cleaner support?
Lite Session Cleaner is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Lite Session Cleaner?
It is built and maintained by liu hongbin (@artwebs); the current version is v1.1.0.