session-cleanup

定期清理过期会话,评估并保存有价值信息,自动清理无价值会话。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "session-cleanup" with this command: npx skills add xaiohuangningde/session-cleanup

Session Cleanup

定期检查和清理过期会话,评估会话价值并保存重要信息。

能力轮廓

  • 输入:会话目录路径
  • 输出:清理报告 + 保存的有价值会话
  • 核心:过期检测 → 价值评估 → 选择性清理

工作流

1. 扫描会话目录
2. 检查过期会话(7天无活动)
3. 评估会话价值(关键词匹配)
4. 保存有价值会话到记忆
5. 清理无价值会话
6. 生成报告

目标目录

目录说明
~/.openclaw/cron/runs/定时任务运行记录
~/.openclaw/delivery-queue/消息投递队列
~/.openclaw/telegram/Telegram 会话数据
~/.openclaw/subagents/子智能体会话

过期规则

  • cron runs: 超过 3 天
  • delivery-queue: 超过 1 天(已完成/失败的)
  • telegram: 超过 7 天
  • subagents: 超过 7 天

价值评估关键词

类别关键词
重要决策decision, important, remember, 重要, 决策
学习learn, study, understand, 学习, 理解
问题解决fix, bug, error, 修复, 问题, 错误
创建create, build, new, 创建, 新建

主动性

  • 每周执行一次
  • 自动评估并保存有价值内容
  • 汇报清理结果

使用方式

# 手动执行
~/.openclaw/workspace/skills/session-cleanup/cleanup.sh

# 配置定时任务(每周日凌晨3点)
cron job add session-cleanup "0 3 * * 0" ~/.openclaw/workspace/skills/session-cleanup/run.sh

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Ai Competitor Analyzer

提供AI驱动的竞争对手分析,支持批量自动处理,提升企业和专业团队分析效率与专业度。

Registry SourceRecently Updated
General

Ai Data Visualization

提供自动化AI分析与多格式批量处理,显著提升数据可视化效率,节省成本,适用企业和个人用户。

Registry SourceRecently Updated
General

Ai Cost Optimizer

提供基于预算和任务需求的AI模型成本优化方案,计算节省并指导OpenClaw配置与模型切换策略。

Registry SourceRecently Updated