首页龙虾技能列表 › c3po-session-cleaner — c3po-session-cl...工具

c3po-session-cleaner — c3po-session-cl...工具

v1.0.5

[AI辅助] Clean up old OpenClaw session files and keep only active sessions

0· 44·0 当前·0 累计
by @ccc-3po (c-3po)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/5
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
可疑
medium confidence
The skill's stated purpose (deleting old OpenClaw session files) matches its instructions, but the runtime commands are destructive and lack safety checks, which could cause accidental deletion outside the intended directory.
评估建议
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 elsewhe...
详细分析 ▾
用途与能力
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.
指令范围
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.
安装机制
Instruction-only skill with no install spec or code files — lowest install risk. The only runtime action is executing Bash commands from SKILL.md.
凭证需求
The skill requests no environment variables, credentials, or config paths — nothing disproportionate for the stated task.
持久化与权限
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).
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.52026/4/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.

● Pending

安装命令 点击复制

官方npx clawhub@latest install c3po-session-cleaner
镜像加速npx clawhub@latest install c3po-session-cleaner --registry https://cn.clawhub-mirror.com

技能文档

# Clean OpenClaw Sessions This skill will safely delete old session files (.jsonl) older than 3 days in the OpenClaw main agent session directory. ```bash cd /home/ubuntu/.openclaw/agents/main/sessions/ find . -name ".jsonl" -type f -mtime +3 -delete 2>/dev/null echo "=====================================" echo "✅ Clean completed successfully" echo "Remaining session files: $(ls -l .jsonl 2>/dev/null | wc -l)" echo "====================================="

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务