← Back to Skills Marketplace
101
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install session-archive-manager
Description
智能管理OpenClaw会话文件 - 裁剪大session、生成智能总结、归档旧会话、清理空间。使用场景:session文件过大、需要释放磁盘空间、整理旧会话记录、自动定期归档。当用户提到"归档session"、"裁剪会话"、"清理session空间"、"整理旧会话"、"session太大"、"运行session...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install session-archive-manager - After installation, invoke the skill by name or use
/session-archive-manager - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release - Smart session trimming, AI summarization, and archiving for OpenClaw
Metadata
Frequently Asked Questions
What is Session Archive Manager?
智能管理OpenClaw会话文件 - 裁剪大session、生成智能总结、归档旧会话、清理空间。使用场景:session文件过大、需要释放磁盘空间、整理旧会话记录、自动定期归档。当用户提到"归档session"、"裁剪会话"、"清理session空间"、"整理旧会话"、"session太大"、"运行session... It is an AI Agent Skill for Claude Code / OpenClaw, with 101 downloads so far.
How do I install Session Archive Manager?
Run "/install session-archive-manager" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Session Archive Manager free?
Yes, Session Archive Manager is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Session Archive Manager support?
Session Archive Manager is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Session Archive Manager?
It is built and maintained by delgyd (@delgyd); the current version is v1.0.0.
More Skills