← 返回 Skills 市场
394
总下载
0
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install session-cleaner
功能描述
Clean up stale OpenClaw session files. Keep the current main session and all group chat sessions; move everything else to a backup directory. Use when perfor...
安全使用建议
This script appears to do exactly what it claims, but review and take these precautions before running: 1) Run with --dry-run first to see which files would be moved. 2) Inspect a few session .jsonl files to confirm the grep patterns ("sessionKey" and "to") match your expected session formats. 3) Ensure you run it as the intended user (don’t run as root if you only mean to clean your personal sessions) because $HOME determines the target directory. 4) Be aware the script relies on standard utilities (numfmt, stat variants); on minimal systems some utilities may be missing. 5) Because moved files are placed under sessions/backup, they are recoverable, but verify backup location matches your retention policy. If any of these points are concerning, do not install or run until you’ve validated them.
功能分析
Type: OpenClaw Skill
Name: session-cleaner
Version: 1.0.0
The session-cleaner skill is a maintenance utility designed to manage OpenClaw session transcripts. The bash script (scripts/clean-sessions.sh) identifies and preserves active main and group chat sessions while moving older or secondary session files to a local backup directory (~/.openclaw/agents/main/sessions/backup). The logic is transparent, lacks network activity or data exfiltration, and provides a dry-run mode for safety.
能力评估
Purpose & Capability
Name/description match the behavior. The script operates only on ~/.openclaw/agents/main/sessions and implements the stated keep/move rules (keep current main and group sessions, move others to sessions/backup). No unexpected credentials, binaries, or unrelated resources are required.
Instruction Scope
SKILL.md instructs the agent to run the included shell script (optionally with --dry-run). The script only reads session files in the specified sessions directory and inspects them for sessionKey/to fields to decide retention; it does not call external network endpoints, read unrelated system files, or reference environment variables beyond $HOME. Behavior is narrow and in-scope.
Install Mechanism
No install spec — instruction-only with a bundled script. Nothing is downloaded or written to system locations outside the user's sessions directory. Low install risk.
Credentials
No required environment variables, no credentials, and no config paths beyond the documented ~/.openclaw path. The script uses standard POSIX utilities (grep, stat, mv, mkdir, ls, numfmt) which are reasonable for the task.
Persistence & Privilege
always:false and no mechanism to modify other skills or global agent settings. The script only modifies files under the user's sessions directory (moves to a local backup), so requested persistence/privileges are proportional to the described purpose.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install session-cleaner - 安装完成后,直接呼叫该 Skill 的名称或使用
/session-cleaner触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: clean up stale OpenClaw session files
元数据
常见问题
Session Cleaner 是什么?
Clean up stale OpenClaw session files. Keep the current main session and all group chat sessions; move everything else to a backup directory. Use when perfor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 394 次。
如何安装 Session Cleaner?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install session-cleaner」即可一键安装,无需额外配置。
Session Cleaner 是免费的吗?
是的,Session Cleaner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Session Cleaner 支持哪些平台?
Session Cleaner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Session Cleaner?
由 Madoka(@guoqunabc)开发并维护,当前版本 v1.0.0。
推荐 Skills