← 返回 Skills 市场
halbotley

Session Hygiene

作者 halbotley · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
323
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install session-hygiene
功能描述
Prevent sessions.json bloat from accumulating isolated sessions (hooks, crons, subagents). Sets up a cron to archive stale sessions to daily JSONL files and...
安全使用建议
This skill appears to do what it says, but take normal precautions before running it: (1) run with --dry-run first to preview actions; (2) back up sessions.json (or run the script against a copy) before writing to it; (3) ensure the cron runs as the same user that owns sessions.json so auto-detection succeeds and there are no permission issues; (4) if your sessions.json is located outside the auto-detected paths, provide --sessions-path explicitly; (5) be aware the script loads sessions.json into memory (very large files could use significant RAM); and (6) inspect the archive files and test on a non-production instance if possible. These are operational cautions, not indicators of malicious behavior.
功能分析
Type: OpenClaw Skill Name: session-hygiene Version: 1.0.0 The skill's purpose is to manage OpenClaw session files, preventing bloat by archiving old sessions and rotating archive files. The `SKILL.md` instructs the agent to set up a cron job that executes a Python script located within the skill's directory. The `archive_sessions.py` script performs file system operations (read, write, delete) on `sessions.json` and a dedicated `sessions-archive` directory. It does not access unrelated sensitive data, make network calls, execute arbitrary external commands, or exhibit any other behavior indicative of malicious intent or significant unstated risks.
能力评估
Purpose & Capability
Name/description match the contents: the SKILL.md explains cron setup and the included Python script archives stale sessions and rotates old archives. There are no unrelated requirements (no external credentials, no unrelated binaries).
Instruction Scope
Runtime instructions are scoped to locating sessions.json, writing per-day JSONL archives into sessions-archive, deleting old archives, and updating sessions.json. The SKILL.md does not ask the agent to read or transmit unrelated files or secrets. It instructs running the included script via a cron payload or manually; that's consistent.
Install Mechanism
No install spec or external downloads. The skill is instruction-only plus a small local Python script; nothing is fetched from remote URLs and no archives are extracted.
Credentials
No environment variables, credentials, or config paths are requested. The script auto-detects common sessions.json locations under the user's home directory (or accepts an explicit --sessions-path). This access is proportional to the stated task.
Persistence & Privilege
Does not request always:true, does not modify other skills or system-wide agent settings. It writes only to the sessions directory (sessions.json and sessions-archive) which is the minimal required privilege for its function.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install session-hygiene
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /session-hygiene 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: archive-and-rotate pattern for sessions.json bloat (openclaw/openclaw#15225)
元数据
Slug session-hygiene
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Session Hygiene 是什么?

Prevent sessions.json bloat from accumulating isolated sessions (hooks, crons, subagents). Sets up a cron to archive stale sessions to daily JSONL files and... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 323 次。

如何安装 Session Hygiene?

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

Session Hygiene 是免费的吗?

是的,Session Hygiene 完全免费(开源免费),可自由下载、安装和使用。

Session Hygiene 支持哪些平台?

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

谁开发了 Session Hygiene?

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

💬 留言讨论