← 返回 Skills 市场
delgyd

Session Archive Manager

作者 delgyd · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
101
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install session-archive-manager
功能描述
智能管理OpenClaw会话文件 - 裁剪大session、生成智能总结、归档旧会话、清理空间。使用场景:session文件过大、需要释放磁盘空间、整理旧会话记录、自动定期归档。当用户提到"归档session"、"裁剪会话"、"清理session空间"、"整理旧会话"、"session太大"、"运行session...
安全使用建议
This skill does perform the claimed tasks (trimming, summarizing, archiving), but before installing or running it you should: 1) Inspect and edit all hardcoded paths (SESSIONS_DIR, ARCHIVE_DIR, SUMMARY_DIR, any /root/.openclaw/workspace references) to match your environment — do NOT run as root unless you intentionally want to affect /root. 2) Confirm the cron job path in setup_cron.sh points at the script you intend to schedule (the repo scripts live in scripts/, but cron references /root/.openclaw/workspace), and only add the cron job after verifying the command and log file locations. 3) Back up your sessions directory first and test scripts on a small sample in dry-run mode. 4) Consider making the scripts honor exported env vars (SESSION_DIR, etc.) rather than hardcoded defaults. 5) If you are uncomfortable editing scripts, avoid running setup_cron.sh and run the trimming scripts manually while you verify behavior. The current inconsistencies could lead to accidental deletion of files if the scripts run against the wrong directory.
功能分析
Type: OpenClaw Skill Name: session-archive-manager Version: 1.0.0 The session-archive-manager skill bundle is a utility for managing OpenClaw session logs through trimming, summarization, and archiving. The scripts (e.g., trim_and_archive.sh, session_trimmer.py, and setup_cron.sh) perform local file operations such as compression (gzip), deletion of old logs (find/rm), and scheduling maintenance tasks via crontab. While the scripts use hardcoded absolute paths (e.g., /root/.openclaw/) and include a persistence mechanism (cron), these actions are transparently documented and strictly aligned with the stated purpose of disk space management and session organization without evidence of malicious intent or data exfiltration.
能力评估
Purpose & Capability
The skill's stated purpose (manage/trim/archive OpenClaw session files) aligns with the provided scripts, but the implementation hardcodes system paths under /root (e.g. /root/.openclaw/agents/main/sessions and /root/.openclaw/workspace) rather than using the SKILL.md-recommended ~/ paths or exported environment variables. That mismatch means the scripts will operate on root-owned locations by default, which is unexpected given the SKILL.md instructions and is disproportionate if a user expects them to only touch their local agent session dir.
Instruction Scope
SKILL.md instructs users to run scripts from ~/.agents/skills/session-archive-manager and suggests configurable env variables (SESSION_DIR, ARCHIVE_DIR, SUMMARY_DIR). In contrast, the scripts ignore those env vars and use hardcoded /root paths and different script locations (e.g. /root/.openclaw/workspace/archive_sessions.sh). setup_cron.sh and trim_and_archive.sh reference paths that don't match the repository layout. This inconsistency can cause scripts to fail or to act on unintended directories (including deleting files).
Install Mechanism
No install spec or external downloads are used — it's an instruction-only skill with local shell/Python scripts. There are no network fetches or archive extraction steps in the repository, which keeps install risk low. However, running the included scripts writes to disk and modifies crontab (see persistence_privilege).
Credentials
The skill declares no required env vars, but SKILL.md suggests optional env vars. The scripts do not read those env vars; instead they use hardcoded directories. The scripts manipulate and delete files (archive, gzip, rm) under /root/.openclaw and will remove files older than thresholds — this behavior is broadly consistent with archiving, but the lack of use of user-provided env overrides makes the defaults surprising and potentially dangerous.
Persistence & Privilege
setup_cron.sh modifies the user's crontab to schedule the archive script; trim/setup will therefore create a persistent scheduled task. The cron job points at /root/.openclaw/workspace/archive_sessions.sh (and logs to /root/.openclaw/workspace/archive_sessions.log), which combined with the hardcoded /root directories could result in hourly autonomous runs affecting root-owned files. Adding a cron job is a significant persistence action and should be done only after confirming paths and running as the intended user.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install session-archive-manager
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /session-archive-manager 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - Smart session trimming, AI summarization, and archiving for OpenClaw
元数据
Slug session-archive-manager
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Session Archive Manager 是什么?

智能管理OpenClaw会话文件 - 裁剪大session、生成智能总结、归档旧会话、清理空间。使用场景:session文件过大、需要释放磁盘空间、整理旧会话记录、自动定期归档。当用户提到"归档session"、"裁剪会话"、"清理session空间"、"整理旧会话"、"session太大"、"运行session... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 101 次。

如何安装 Session Archive Manager?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install session-archive-manager」即可一键安装,无需额外配置。

Session Archive Manager 是免费的吗?

是的,Session Archive Manager 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Session Archive Manager 支持哪些平台?

Session Archive Manager 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Session Archive Manager?

由 delgyd(@delgyd)开发并维护,当前版本 v1.0.0。

💬 留言讨论