Skip to content
Back to skills

Openclaw Session Guard

ASecurity

管理 OpenClaw 长会话防爆机制(80%自动归档、自动轮换新会话、低 token 交接)及定时任务安装。用户提到 compacting context、会话过长、自动总结归档、session 轮换、LaunchAgent 定时任务时使用。

  • 14 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 7, 2026
documentationbash

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill openclaw-session-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openclaw Session Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openclaw Session Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-openclaw-session-guard/badge)](https://www.skillsdirectory.com/skills/modbender-openclaw-session-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openclaw-session-guard
description: 管理 OpenClaw 长会话防爆机制(80%自动归档、自动轮换新会话、低 token 交接)及定时任务安装。用户提到 compacting context、会话过长、自动总结归档、session 轮换、LaunchAgent 定时任务时使用。
---

# OpenClaw Session Guard

用于治理 OpenClaw 会话上下文过长导致的反复 compaction。

## 适用场景

- 用户反馈 `compacting context` 频繁出现
- 想要“到阈值自动摘要+存档+续聊”
- 需要安装/检查/卸载会话轮换定时任务

## 默认策略

- 阈值:`80%`
- 冷却:`1800s`(30 分钟)
- 扫描周期:`300s`(5 分钟)
- 摘要条数:每个角色最近 `6` 条

## 快速操作

1. 安装/更新
```bash
bash ~/.openclaw/skills/openclaw-session-guard/scripts/install.sh
```

2. 查看状态
```bash
bash ~/.openclaw/skills/openclaw-session-guard/scripts/status.sh
```

3. 卸载
```bash
bash ~/.openclaw/skills/openclaw-session-guard/scripts/uninstall.sh
```

## 交付要求

- 给用户汇报:当前阈值、冷却、扫描周期
- 给用户汇报:最新归档文件与最新轮换 sessionId
- 若失败:给出可执行修复命令,不只描述原因

## 参考

- 详细机制和目录说明见 [reference.md](reference.md)

Files in this skill

  • SKILL.md1.3 KB
  • reference.md1.5 KB
  • scripts/install.sh1.5 KB
  • scripts/openclaw-session-rotator.sh8.4 KB
  • scripts/status.sh542 B
  • scripts/uninstall.sh316 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…