← 返回 Skills 市场
356
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install openclaw-session-guard
功能描述
管理 OpenClaw 长会话防爆机制(80%自动归档、自动轮换新会话、低 token 交接)及定时任务安装。用户提到 compacting context、会话过长、自动总结归档、session 轮换、LaunchAgent 定时任务时使用。
安全使用建议
Before installing: 1) Inspect the missing plist template (ai.openclaw.session.rotator.plist.template) — confirm what the LaunchAgent will run and its schedule. 2) Backup ~/.openclaw/agents and sessions.json so you can recover if session IDs are changed. 3) Verify and trust the openclaw CLI binary on your PATH (install.sh calls it and that CLI will send messages/network requests). 4) Because the installer writes to ~/bin and ~/Library/LaunchAgents, prefer running install.sh manually after review rather than blindly executing it. 5) If you're not on macOS, do not install (the scripts use launchctl). If anything is unclear or the plist template is missing, ask the skill author for a complete package and an explanation of scheduling and safety safeguards.
功能分析
Type: OpenClaw Skill
Name: openclaw-session-guard
Version: 1.0.0
The skill installs a LaunchAgent to periodically manage OpenClaw sessions, archiving long sessions and rotating to new ones. It interacts with OpenClaw's internal state and sends a 'handoff' prompt to the agent to continue the conversation. While the skill establishes persistence and sends instructions to the agent (a form of prompt injection), these actions are directly aligned with its stated purpose of session management and context handling. There is no evidence of data exfiltration, unauthorized remote control, or other malicious intent. All file system operations and agent instructions are functional and confined to OpenClaw's operational scope.
能力评估
Purpose & Capability
Name/description (session rotation, auto-archive, LaunchAgent scheduling) match the included scripts: they scan local OpenClaw sessions, write archives, update session mapping, create new session IDs, and invoke the openclaw CLI. However, the installer assumes macOS (LaunchAgents/launchctl) while the skill metadata has no OS restriction; also install.sh references a plist template file (ai.openclaw.session.rotator.plist.template) which is not present in the manifest—this packaging mismatch is unexpected.
Instruction Scope
Runtime behavior is broad: the rotator reads session files under ~/.openclaw/agents/, writes archives to ~/.openclaw/knowledge/, updates sessions.json to switch sessionId, writes cooldown/state files, and invokes the openclaw CLI to post the handoff message. These actions are coherent with its purpose but are sensitive: they modify user agent state and autonomously send messages via the openclaw CLI. Ensure you trust the openclaw binary and accept automated changes to session files.
Install Mechanism
There is no platform install spec (instruction-only) but an included install.sh installs a script to ~/bin and bootstraps a LaunchAgent via launchctl. Risks: the installer is macOS-specific (LaunchAgents) yet the skill has no OS restriction; the expected plist template file referenced by install.sh is missing from the provided manifest, which will cause install failure or unexpected behavior if not corrected. The install writes to user LaunchAgents and ~/bin (persistent system presence).
Credentials
The skill declares no required env vars, but scripts read optional envs (OPENCLAW_BIN, OPENCLAW_STATE_ROOT, etc.) and will call the openclaw CLI. That is appropriate for its function, but the scripts operate on many local files under ~/.openclaw and will update session state. There are no external network endpoints or hidden credential requests in the code itself, but the openclaw CLI it calls may perform network activity using your agent credentials—verify that CLI's trustworthiness.
Persistence & Privilege
The installer sets up a LaunchAgent to run periodically (default every 5 minutes via a plist template). This creates persistent background behavior that will autonomously scan and modify session state. While autonomy is expected for this feature, it increases blast radius; the package does not request explicit consent via metadata nor include an OS restriction, and the missing plist template further obfuscates exact schedule/configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install openclaw-session-guard - 安装完成后,直接呼叫该 Skill 的名称或使用
/openclaw-session-guard触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: automatic session rotation at 80% threshold with low-token handoff
元数据
常见问题
OpenClaw Session Guard 是什么?
管理 OpenClaw 长会话防爆机制(80%自动归档、自动轮换新会话、低 token 交接)及定时任务安装。用户提到 compacting context、会话过长、自动总结归档、session 轮换、LaunchAgent 定时任务时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 356 次。
如何安装 OpenClaw Session Guard?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install openclaw-session-guard」即可一键安装,无需额外配置。
OpenClaw Session Guard 是免费的吗?
是的,OpenClaw Session Guard 完全免费(开源免费),可自由下载、安装和使用。
OpenClaw Session Guard 支持哪些平台?
OpenClaw Session Guard 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 OpenClaw Session Guard?
由 Buck(@tel18610240060-collab)开发并维护,当前版本 v1.0.0。
推荐 Skills