360 Secure SkillHub
360 安全技能中心

Openclaw Context Maintainer

面向 OpenClaw 会话的上下文维护技能:当会话过大、嘈杂或变慢时,先判断是否需要压缩并备份现有会话,保留最新上下文与活动任务,仅把陈旧内容摘要成紧凑块,再校验名称、数字、决策、阻塞与待办是否保留;结果不佳可从备份还原。压缩仅作上下文卫生手段,必要时把长期经验写入记忆与工具文档。

juanbastias
juanbastias
热度 7.64
最近更新 2026-07-08 22:05:40
分类:知识依赖:读写文件 / 内部调用大模型应用场景:摘要总结 / 笔记整理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add session-context-maintainer
Metadata
name
openclaw-context-maintainer
description
Compress OpenClaw session context safely with backups and restore steps.
license
MIT-0

OpenClaw Context Maintainer

Use this skill when an OpenClaw session is getting too large, noisy, or slow and you need to reduce token burn without losing the active thread.

Workflow

  1. Check whether compression is actually needed.
  2. Back up the current session or source material first.
  3. Preserve the newest context and the active task.
  4. Summarize only stale context into a compact block.
  5. Verify that names, numbers, decisions, blockers, and open tasks survived.
  6. Restore from backup if the result is weak.

Rules

  • Never compress blindly.
  • Keep recent context visible.
  • Do nothing if the session is already lean.
  • Treat compression as hygiene, not memory replacement.
  • Promote durable lessons to MEMORY.md, AGENTS.md, or TOOLS.md when needed.

Best fit

  • Long troubleshooting threads
  • Repeated back-and-forth
  • Obsolete status chatter
  • Old tool noise
  • Sessions approaching practical context limits

Avoid

  • Blind truncation
  • Compressing active reasoning in flight
  • Using compression instead of actual memory capture
  • Removing recent user decisions or open tasks

Verification

  • Session still reads naturally
  • Active task remains clear
  • Backup exists
  • Restore path exists