← 返回 Skills 市场
83
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install c3po-session-cleaner
功能描述
Clean up old OpenClaw session files and keep only active sessions
使用说明 (SKILL.md)
\r \r
Clean OpenClaw Sessions\r
\r This skill will safely delete old session files (.jsonl) older than 3 days\r in the OpenClaw main agent session directory.\r \r
cd /home/ubuntu/.openclaw/agents/main/sessions/\r
find . -name "*.jsonl" -type f -mtime +3 -delete 2>/dev/null\r
\r
echo "====================================="\r
echo "✅ Clean completed successfully"\r
echo "Remaining session files: $(ls -l *.jsonl 2>/dev/null | wc -l)"\r
echo "====================================="
安全使用建议
This skill will run shell commands that delete files. Don't install or enable it unless you trust the exact path and want automatic deletions. If you proceed, request a safer SKILL.md: check the directory exists first (test -d), use an absolute path with find (e.g., find /home/ubuntu/.openclaw/agents/main/sessions -maxdepth 1 -name "*.jsonl" -mtime +3 -print), perform a dry-run (-print) before -delete, avoid suppressing errors, and avoid relying on cd so a failed cd can't cause deletions elsewhere. Also consider requiring an explicit confirmation or making autonomous invocation disallowed until reviewed.
能力评估
Purpose & Capability
The name/description match the SKILL.md: it deletes .jsonl session files older than 3 days in the OpenClaw main agent session directory. The request is proportionate (no extra credentials or unrelated binaries). The instructions hard-code /home/ubuntu/.openclaw..., which makes the skill specific to that user/path and may not work correctly on other systems.
Instruction Scope
The instructions run destructive shell commands (cd to the path, then find . -name "*.jsonl" -mtime +3 -delete) with errors suppressed. There are no existence checks, no dry-run, and no safeguards: if the cd fails or the target directory is a symlink, the find -delete could run in an unexpected working directory and remove files outside the intended scope. Suppressing stderr (2>/dev/null) hides failures that would warn the user.
Install Mechanism
Instruction-only skill with no install spec or code files — lowest install risk. The only runtime action is executing Bash commands from SKILL.md.
Credentials
The skill requests no environment variables, credentials, or config paths — nothing disproportionate for the stated task.
Persistence & Privilege
The skill is not always-enabled and is user-invocable. Autonomous invocation is allowed by default; because the skill performs destructive filesystem operations, allowing autonomous runs increases potential impact and warrants extra safeguards (confirmation, dry-run).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install c3po-session-cleaner - 安装完成后,直接呼叫该 Skill 的名称或使用
/c3po-session-cleaner触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.5
- Updated description to clarify that only active session files are kept.
- Added a trigger field: clean sessions.
- Now only old .jsonl session files (>3 days) are deleted; rebuilding sessions.json has been removed.
- Simplified completion message to show only remaining session files.
- Version number updated to 1.0.5.
v1.0.4
- Updated rebuild method to safely reconstruct sessions.json using jq, instead of relying on CLI command.
- Improved descriptions for clarity and emphasized safe cleaning.
- Version format changed from 1.0.3 to 1.03.
- Enhanced output messages for completion and status.
v1.0.3
- Cleans OpenClaw session files older than 3 days automatically.
- Rebuilds the sessions.json index after cleanup.
- Provides a summary including the number of remaining session files and the size of sessions.json.
- Runs entirely using Bash commands for simplicity.
元数据
常见问题
c3po-session-cleaner 是什么?
Clean up old OpenClaw session files and keep only active sessions. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 83 次。
如何安装 c3po-session-cleaner?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install c3po-session-cleaner」即可一键安装,无需额外配置。
c3po-session-cleaner 是免费的吗?
是的,c3po-session-cleaner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
c3po-session-cleaner 支持哪些平台?
c3po-session-cleaner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 c3po-session-cleaner?
由 c-3po(@ccc-3po)开发并维护,当前版本 v1.0.5。
推荐 Skills