Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计提醒

session-storage-management会话存储管理

Agent Skill

session-storage-management 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,328

周安装

97

GitHub Stars

公开资料未说明

下载量

776
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:session-storage-management(会话存储管理)
来源仓库:https://github.com/denq04/session-storage-management
安装命令:
openclaw skills install session-storage-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install session-storage-management

简介

会话存储管理工具用于分析与清理 OpenClaw 会话文件。

  • 适合管理会话数量、删除 cron/heartbeat 残留或组织存储结构。
  • 可识别冗余文件并提供清理建议,优化磁盘使用。
  • 操作前请确认备份机制,避免误删关键会话数据。
  • session-storage-management 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
session-storage-management
description
Analyze and clean up OpenClaw session storage files. Use when the user wants to manage session files, clean up old sessions, delete cron/heartbeat, or organize session storage. Triggers on phrases like "clean up sessions", "delete old sessions", "manage session storage", "remove cron sessions", "session cleanup".

Session Storage Management

Overview

This skill helps analyze and clean up OpenClaw session files stored in the agents sessions directory. It categorizes sessions by type (cron, chat, deleted, reset, heartbeat), presents them to the user for review, and handles safe deletion while protecting the current active session.

Workflow

Step 1: Analyze Session Files

Scan the sessions directory and categorize all session files:

  1. Active .jsonl files - Current session files

- Cron sessions (isolated cron job runs) - Heartbeat sessions - Chat sessions (direct conversations) - Supergroup/other test sessions

  1. .deleted.<timestamp> files - Previously deleted sessions
  1. .reset.<timestamp> files - Sessions from /new or /reset commands

Step 2: Identify Current Session

Always identify and exclude the current session from deletion candidates:

# Get current session ID from session context
# It will be in the system prompt or can be extracted from the current session file

The current session should NEVER be deleted without explicit user confirmation in a separate step.

Step 3: Present Categories to User

Show summary statistics:

📊 Session Analysis Summary:
├── Active .jsonl files: N total
│   ├── Cron sessions: N
│   ├── Heartbeat sessions: N
│   ├── Chat sessions: N
│   └── Other sessions: N
├── .deleted files: N
└── .reset files: N

✅ Current session (protected): <session-id>

Then ask the user:

"Would you like me to: 1. Show the full detailed list of all sessions with descriptions 2. Delete specific categories (e.g., 'delete all cron and .deleted files') 3. Delete everything except the current session"

Step 4: Handle Current Session Warning

If the current session appears in any deletion category (it shouldn't, but check anyway), display a prominent warning:

⚠️  WARNING: Your current session was found in the deletion list!
   Session: <session-id>
   
This is the session you're currently using. Deleting it will not affect
your current conversation, but the session file will be removed.

Do you want to delete your current session file as well? (yes/no)

Step 5: Execute Deletion

After user confirmation:

  1. Delete confirmed files
  2. Report count and types of deleted files
  3. Show remaining files
  4. Estimate disk space freed

Categorization Logic

Analyze session content to determine type:

# Example analysis
content=$(head -10 "$file" | jq -r '.message.content[]? | select(.type=="text") | .text' 2>/dev/null | head -5)

if echo "$content" | grep -qiE "cron.*[a-f0-9-]{36}"; then
    type="cron"
elif echo "$content" | grep -qiE "heartbeat|HEARTBEAT"; then
    type="heartbeat"
elif echo "$content" | grep -qiE "new session|Session Startup"; then
    type="chat"
else
    type="other"
fi

Safety Rules

  1. Never delete without explicit confirmation - Always show what will be deleted and wait for "yes"
  2. Protect current session - Exclude it from bulk deletion, ask separately if user wants it deleted
  3. Preserve last chat session - If multiple chat sessions exist, keep at least the most recent one unless user explicitly says otherwise
  4. Report everything - Show full list of files being deleted with their sizes

Example Session Analysis Output

╔══════════════════════════════════════════════════════════════╗
║ SESSION ANALYSIS                                             ║
╚══════════════════════════════════════════════════════════════╝

📁 Location: ~/.openclaw/agents/main/sessions/

Category Breakdown:
  🕐 Cron sessions: 13 (isolated job runs)
  💓 Heartbeat sessions: 1  
  💬 Chat sessions: 2
  🗑️  .deleted files: 14
  🔄 .reset files: 23

Total files: 56
Estimated size: 12 MB

✅ Protected: <current-session-id> (current conversation)

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

72.56%
按下载量换算563

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills