Lite Session Cleaner

v1.1.0

Automatically cleans up inactive sessions (older than 1 hour) and sends a notification.

0· 96·0 current·0 all-time
byliu hongbin@artwebs

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for artwebs/lite-session-cleaner.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Lite Session Cleaner" (artwebs/lite-session-cleaner) from ClawHub.
Skill page: https://clawhub.ai/artwebs/lite-session-cleaner
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: openclaw
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install lite-session-cleaner

ClawHub CLI

Package manager switcher

npx clawhub@latest install lite-session-cleaner
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (clean inactive sessions, notify) matches the SKILL.md steps (list sessions, kill stale ones, send notification). The included Python simulates the same workflow rather than invoking the openclaw CLI directly — that is plausible for an example script, but it means the repo's code is not actually performing the declared CLI calls. The script also saves session summaries (conversation content) to disk, which is reasonable for logging but not explicitly called out in the high-level description.
Instruction Scope
SKILL.md instructs the agent to use openclaw sessions_list/sessions_kill and to notify channels; it does not request unrelated files, credentials, or external endpoints. The Python file mirrors the logical steps (identify, summarize, notify, kill) but uses simulated functions and prints rather than performing CLI/API calls — scope stays within session management and logging.
Install Mechanism
No install spec is present (instruction-only), which is the lowest-risk pattern. There are no downloads or external install URLs to evaluate.
Credentials
The skill declares no required env vars or credentials, which is consistent with its purpose. However, the Python script writes summaries to a hard-coded path under /root/.openclaw/workspace/skills/..., which may require elevated permissions and may not match actual runtime install locations. The script stores conversation summaries (potentially sensitive data) on disk without access controls or mention of retention/purging.
Persistence & Privilege
always is false and the skill does not request persistent system-wide privileges or modify other skills' configuration. Autonomous invocation is allowed (default) but not combined with any broad, unexplained credentials.
Assessment
This skill appears to do what it says (find and kill sessions older than 1 hour and notify). Before installing: 1) Ensure the openclaw CLI will be available to the agent at runtime (SKILL.md expects exec calls to openclaw). 2) Update the sample script to call the real CLI or API (the provided clean_script.py currently simulates behavior). 3) Change the hard-coded /root path to a configurable workspace path (to avoid requiring root and to match your deployment). 4) Review privacy: the skill saves conversation summaries (message history) to disk — confirm you are comfortable storing that data, secure the directory, and consider retention/rotation. 5) Ensure send_notification and kill_session are implemented with the actual messaging and session APIs rather than simple prints before running as a cron job. If you need these changes and assurances, treat the current package as a template rather than a production-ready skill.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

Binsopenclaw
latestvk971a40h6bkkjx6xht2yam18mn858ypj
96downloads
0stars
2versions
Updated 6d ago
v1.1.0
MIT-0

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

  1. Identify: Use sessions_list to retrieve all active sessions.
  2. Filter: Compare the last_activity timestamp of each session with the current time.
  3. Action: For sessions where current_time - last_activity > 3600 seconds:
    • Send a message to the session's target channel (e.g., via message tool) stating: "当前会话已经结束".
    • Execute sessions_kill <session_id>.
  4. Log: Record the cleaning action in the daily log.

Requirements

  • openclaw CLI installed and accessible.
  • Access to session metadata.

Comments

Loading comments...