Session Guardian 🛡️ Never lose a conversation again. The Problem Your OpenClaw conversations live in session files. When things go wrong — and they will — you lose everything: - 🔴 Gateway restart → entire conversation history gone - 🔴 Model disconnection → mid-task context wiped out - 🔴 Token overflow → session too large, agent slows down or crashes - 🔴 Disk issues → session files corrupted or lost No built-in backup. No recovery. No warning before it's too late. The Fix That's it. Five layers of protection, running automatically. How It Works All automatic. All in the background. Zero m…

\\t' read -r session_key total_tokens; do\n [ -z \"$session_key\" ] && continue\n\n local pct=$((total_tokens * 100 / TOKEN_LIMIT))\n local agent_name=$(echo \"$session_key\" | sed 's/agent:\\(.*\\):main/\\1/')\n\n if [ $pct -ge $CRIT_THRESHOLD ]; then\n local msg=\"🔴 ${agent_name} token ${pct}%(${total_tokens}/${TOKEN_LIMIT}),建议立即reset\"\n alerts=\"${alerts}${msg}\\n\"\n report=\"${report}${msg}\\n\"\n ((crit_count++))\n log \"CRITICAL: $session_key = ${pct}% (${total_tokens})\"\n elif [ $pct -ge $WARN_THRESHOLD ]; then\n local msg=\"🟡 ${agent_name} token ${pct}%(${total_tokens}/${TOKEN_LIMIT}),注意观察\"\n alerts=\"${alerts}${msg}\\n\"\n report=\"${report}${msg}\\n\"\n ((warn_count++))\n log \"WARNING: $session_key = ${pct}% (${total_tokens})\"\n else\n report=\"${report}✅ ${agent_name} token ${pct}%\\n\"\n log \"OK: $session_key = ${pct}% (${total_tokens})\"\n fi\n done \u003c \u003c(get_token_data)\n\n # 输出报告\n echo \"\"\n echo \"═══ Token Monitor Report ═══\"\n echo -e \"$report\"\n\n if [ $crit_count -gt 0 ] || [ $warn_count -gt 0 ]; then\n echo \"═══ ⚠️ 预警汇总 ═══\"\n echo -e \"$alerts\"\n echo \"红色预警: $crit_count | 黄色预警: $warn_count\"\n\n # 写入预警文件供其他脚本读取\n echo -e \"$alerts\" > \"$BACKUP_ROOT/token-alerts.txt\"\n else\n echo \"✅ 所有session token使用正常\"\n rm -f \"$BACKUP_ROOT/token-alerts.txt\"\n fi\n\n # v2.2.1: 检查 reserveTokens 配置\n echo \"\"\n local openclaw_config=\"$HOME/.openclaw/openclaw.json\"\n if [ -f \"$openclaw_config\" ]; then\n local reserve=$(python3 -c \"\nimport json\nwith open('$openclaw_config') as f:\n cfg = json.load(f)\nprint(cfg.get('agents',{}).get('defaults',{}).get('compaction',{}).get('reserveTokens', 50000))\n\" 2>/dev/null || echo \"50000\")\n if [ \"$reserve\" -gt 15000 ] 2>/dev/null; then\n echo \"💡 建议: reserveTokens当前为${reserve},建议调低到15000以减少compaction频率\"\n else\n echo \"✅ reserveTokens配置合理(${reserve})\"\n fi\n fi\n\n log \"=== Token Monitor 检查完成 (crit=$crit_count warn=$warn_count) ===\"\n}\n\nmain \"$@\"\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":3555,"content_sha256":"52fad07c708979d711e6d8450401c3eacf67b6dea9a31b2d6c7cd00d54065159"},{"filename":"skill-detection-report.md","content":"# Session Guardian - Skill Detection Report\n\n**Generated**: Fri Mar 6 14:35:45 CST 2026\n\n## Detected Skills\n\n- daily-session-backup\n- drawthings\n- pdf-generator\n- security-audit-toolkit\n- self-improving-agent\n- session-guardian\n- yolo-local\n\n## Feature Overlap Analysis\n\n⚠️ Feature overlap detected. Session Guardian auto-configured to avoid duplication:\n\n- **Error/Learning Extraction**: Delegated to `self-improving-agent`\n\n## Optimized Configuration\n\nSession Guardian has been configured to complement existing skills:\n\n### Integration with self-improving-agent\n\n**Workflow**:\n1. self-improving-agent records errors and learnings in real-time (lightweight)\n2. Session Guardian reads SI records during daily summary\n3. Session Guardian extracts knowledge to MEMORY.md\n4. Avoid duplicate analysis\n\n**Token Savings**: ~65% (from ~30k to ~10.5k tokens/day)\n\n**Disabled Features**:\n- Error logging (delegated to SI)\n- Learning records (delegated to SI)\n- User corrections tracking (delegated to SI)\n- Best practices extraction (delegated to SI)\n\n**Enabled Features**:\n- Session backup (unique to SG)\n- Collaboration tracking (unique to SG)\n- Health check (unique to SG)\n- Daily summary (reads SI records)\n\n\n## Recommendations\n\n1. **Review the configuration**: Check `config.json` to ensure it matches your needs\n2. **Test the integration**: Run for 1 week and monitor token consumption\n3. **Adjust if needed**: You can manually enable/disable features in `config.json`\n4. **Re-run detection**: Run `bash scripts/detect-skills.sh` anytime to re-detect\n\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1555,"content_sha256":"c45c566de3b9e6cb7fc33726d9206da62da13029e2cd70f006d9f37fdf88d5c0"},{"filename":"templates/task-plan-template.md","content":"# {{TASK_NAME}} - 任务计划\n\n**创建时间**: {{CREATE_TIME}}\n**预计完成**: \n**负责人**: \n**状态**: 进行中\n\n---\n\n## 任务目标\n\n(描述任务的最终目标和交付物)\n\n---\n\n## 子任务清单\n\n### 阶段1: (阶段名称)\n- [ ] 1.1 (子任务描述)\n- [ ] 1.2 \n- [ ] 1.3 \n\n### 阶段2: (阶段名称)\n- [ ] 2.1 \n- [ ] 2.2 \n\n### 阶段3: (阶段名称)\n- [ ] 3.1 \n- [ ] 3.2 \n\n---\n\n## 当前进度\n\n**状态**: 待办\n**当前阶段**: 阶段1\n**完成度**: 0/6\n\n---\n\n## 下一步行动\n\n1. (立即可以做的第一步)\n2. \n3. \n\n---\n\n## 风险与阻塞\n\n- 风险1: (描述风险)\n - 缓解: (如何缓解)\n \n- 风险2: \n - 缓解: \n\n---\n\n## 技术决策\n\n1. **决策1**: (描述决策)\n - 依据: (为什么这样决策)\n - 影响: (对项目的影响)\n\n2. **决策2**: \n - 依据: \n - 影响: \n\n---\n\n## 依赖与资源\n\n- 依赖: (依赖的其他任务或资源)\n- 资源: (需要的人力、工具、API等)\n\n---\n\n## 验收标准\n\n- [ ] (验收条件1)\n- [ ] (验收条件2)\n- [ ] (验收条件3)\n\n---\n\n**最后更新**: {{CREATE_TIME}}\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1134,"content_sha256":"81f8fb79d8e8444e831c30d9bf0daecd03349ebe6ff184571d0fd9807df71552"},{"filename":"TEST-REPORT-v2.0.md","content":"# Session Guardian v2.0 测试报告\n\n测试日期:2026-03-05\n测试者:King\n\n## 一、功能测试结果\n\n### 1. 协作链路追踪 ✅\n**测试命令**:\n```bash\nbash scripts/collaboration-tracker.sh trace \"测试任务\"\nbash scripts/collaboration-tracker.sh graph \"测试任务\"\n```\n\n**结果**:\n- ✅ 正常创建协作链路记录文件\n- ✅ 空任务返回空数组(符合预期)\n- ✅ JSON格式正确\n\n**适用场景**:\n- 多agent协作追踪\n- 任务流转可视化\n- 协作历史审计\n\n---\n\n### 2. 智能备份策略 ✅\n**测试命令**:\n```bash\nbash scripts/health-check.sh\n```\n\n**结果**:\n- ✅ 正确识别固定agent(在agents目录下有独立目录)\n- ✅ 使用5MB限制(FIXED_AGENT_SESSION_LIMIT_MB)\n- ✅ 自动备份并清理过大session\n- ✅ 自动修复缺失的defaultModel配置\n\n**实际清理**:\n- 清理了0个过大session(当前所有session都\u003c5MB)\n- 修复了3个agent的defaultModel配置\n\n**适用场景**:\n- 所有使用OpenClaw的场景\n- 单agent、多agent、军团模式都适用\n\n---\n\n### 3. 知识库自动沉淀 ✅\n**测试命令**:\n```bash\nbash scripts/knowledge-extractor.sh extract dev-lead\nbash scripts/knowledge-extractor.sh extract-all\n```\n\n**结果**:\n- ✅ 成功提取16个agent的知识\n- ✅ dev-lead: 36KB最佳实践 + 17KB常见问题\n- ✅ 自动识别✅和❌标记\n- ✅ 异常处理正确(不存在的agent返回错误)\n\n**适用场景**:\n- 所有使用OpenClaw的场景\n- 团队知识管理\n- 新成员快速学习\n\n---\n\n### 4. 协作健康度评分 ✅\n**测试命令**:\n```bash\nbash scripts/collaboration-health.sh report\n```\n\n**结果**:\n- ✅ 正确统计16个固定agent\n- ✅ 统计今日43次sessions_send调用\n- ✅ 总体评分100/100\n- ✅ 详细列出每个agent的session数量和大小\n- ✅ 自动生成优化建议\n\n**适用场景**:\n- 多agent协作场景\n- 团队协作健康监控\n- 性能优化参考\n\n---\n\n## 二、异常场景测试\n\n### 1. 不存在的agent ✅\n```bash\nbash scripts/knowledge-extractor.sh extract nonexistent-agent\n```\n**结果**:正确返回错误信息\n\n### 2. 空任务追踪 ✅\n```bash\nbash scripts/collaboration-tracker.sh trace \"不存在的任务\"\n```\n**结果**:返回空数组,不报错\n\n### 3. 权限问题 ✅\n所有脚本都有正确的错误处理\n\n---\n\n## 三、通用性评估\n\n### 适用场景分析\n\n#### 场景1:军团模式(我们的场景)\n- King → 团长 → 成员\n- **适用性**:✅ 完全适用\n- **推荐功能**:全部4个功能\n\n#### 场景2:简单多agent协作\n- 用户 → agent1, agent2, agent3\n- **适用性**:✅ 完全适用\n- **推荐功能**:\n - 智能备份策略 ✅\n - 知识提取 ✅\n - 协作健康度 ✅\n - 协作链路追踪 ✅(如果使用sessions_send)\n\n#### 场景3:单agent模式\n- 用户 → 单个agent\n- **适用性**:⚠️ 部分适用\n- **推荐功能**:\n - 智能备份策略 ✅\n - 知识提取 ✅\n - 协作健康度 ⚠️(只能看agent状态,无协作数据)\n - 协作链路追踪 ❌(无协作)\n\n### 功能通用性矩阵\n\n| 功能 | 军团模式 | 多agent | 单agent | 通用性 |\n|------|---------|---------|---------|--------|\n| 智能备份策略 | ✅ | ✅ | ✅ | 100% |\n| 知识提取 | ✅ | ✅ | ✅ | 100% |\n| 协作健康度 | ✅ | ✅ | ⚠️ | 80% |\n| 协作链路追踪 | ✅ | ✅ | ❌ | 70% |\n\n**结论**:v2.0功能对非军团模式用户也完全适用,不需要军团结构。\n\n---\n\n## 四、性能测试\n\n### 执行时间\n- 协作链路追踪:\u003c1秒\n- 知识提取(单个agent):\u003c1秒\n- 知识提取(所有agent):\u003c3秒\n- 协作健康度报告:\u003c2秒\n- 智能备份策略:\u003c5秒\n\n**结论**:性能优秀,不影响主对话。\n\n---\n\n## 五、文档完整性\n\n### 已完成\n- ✅ SKILL.md更新(v2.0功能说明)\n- ✅ CHANGELOG-v2.0.md(升级日志)\n- ✅ 配置文件注释完整\n- ✅ 脚本内部注释清晰\n\n### 需要改进\n- ⚠️ 文档中\"军团\"术语过多,应改为\"多agent协作\"\n- ⚠️ 需要添加非军团场景的使用示例\n- ⚠️ 需要添加单agent用户的使用建议\n\n---\n\n## 六、发布前检查清单\n\n### 代码质量\n- ✅ 所有脚本可执行权限正确\n- ✅ 错误处理完善\n- ✅ 路径引用正确\n- ✅ 配置项完整\n\n### 功能完整性\n- ✅ 4个核心功能全部实现\n- ✅ 所有功能测试通过\n- ✅ 异常场景处理正确\n- ✅ 性能符合要求\n\n### 文档完整性\n- ✅ SKILL.md更新\n- ✅ CHANGELOG完整\n- ⚠️ 需要优化\"军团\"术语\n- ⚠️ 需要添加更多使用场景示例\n\n### 兼容性\n- ✅ 向后兼容v1.0\n- ✅ 适用于多种使用场景\n- ✅ 不强制要求军团结构\n\n---\n\n## 七、建议改进\n\n### 短期(发布前)\n1. 优化SKILL.md中的\"军团\"术语 → \"多agent协作\"\n2. 添加非军团场景的使用示例\n3. 添加单agent用户的使用建议\n\n### 中期(v2.1)\n1. 协作链路追踪支持可视化图表(SVG/PNG)\n2. 知识提取支持更多模式(代码片段、配置模板)\n3. 协作健康度支持自定义评分规则\n\n### 长期(v3.0)\n1. Web UI界面\n2. 实时协作监控\n3. 智能推荐优化建议\n\n---\n\n## 八、发布建议\n\n### 发布到clawhub\n- ✅ 代码质量达标\n- ✅ 功能完整\n- ✅ 文档基本完整\n- ⚠️ 建议先优化\"军团\"术语后再发布\n\n### 版本号\n- 当前:v2.0.0\n- 建议:v2.0.0(阶段1核心功能完成)\n\n### 发布说明\n```\nSession Guardian v2.0 - 从\"保护单个session\"到\"保护整个协作网络\"\n\n新增功能:\n- 协作链路追踪:可视化agent间的协作过程\n- 智能备份策略:区分固定agent和临时subagent\n- 知识库自动沉淀:自动提取最佳实践和常见问题\n- 协作健康度评分:量化评估协作质量\n\n适用场景:\n- 多agent协作(军团模式、简单协作)\n- 单agent使用(智能备份、知识提取)\n- 完全向后兼容v1.0\n\n零Token成本,一键安装。\n```\n\n---\n\n## 九、总结\n\n### 成功点\n1. ✅ 所有核心功能实现并测试通过\n2. ✅ 通用性强,不限于军团模式\n3. ✅ 性能优秀,不影响主对话\n4. ✅ 向后兼容v1.0\n\n### 待改进\n1. ⚠️ 文档术语需要优化(\"军团\" → \"多agent协作\")\n2. ⚠️ 需要更多使用场景示例\n3. ⚠️ 协作链路追踪的可视化功能待完善\n\n### 发布建议\n**建议先优化文档术语,然后发布v2.0.0到clawhub。**\n\n---\n\n测试完成时间:2026-03-05 13:10\n测试结论:✅ 通过,建议发布\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":6486,"content_sha256":"e7d891a242f940b4082a346b2e521a3fc55788d1d38218f884e1fed370a57f22"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Session Guardian 🛡️","type":"text"}]},{"type":"paragraph","content":[{"text":"Never lose a conversation again.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":" Without Guardian With Guardian\n┌──────────────────┐ ┌──────────────────────────┐\n│ Gateway crashes │ │ Auto-backup every 5 min │\n│ → conversation │ │ Hourly snapshots │\n│ gone forever │ │ Health monitoring │\n│ │ │ One-command recovery │\n│ Token overflow │ │ │\n│ → agent frozen │ │ Gateway crash? │\n│ │ │ → Restore in seconds │\n│ No way back. 😱 │ │ │\n└──────────────────┘ │ Token overflow? │\n │ → Auto-detected + alert │\n │ │\n │ Always protected. 🛡️ │\n └──────────────────────────┘","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"The Problem","type":"text"}]},{"type":"paragraph","content":[{"text":"Your OpenClaw conversations live in session files. When things go wrong — and they will — you lose everything:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"Gateway restart","type":"text","marks":[{"type":"strong"}]},{"text":" → entire conversation history gone","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"Model disconnection","type":"text","marks":[{"type":"strong"}]},{"text":" → mid-task context wiped out","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"Token overflow","type":"text","marks":[{"type":"strong"}]},{"text":" → session too large, agent slows down or crashes","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"Disk issues","type":"text","marks":[{"type":"strong"}]},{"text":" → session files corrupted or lost","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"No built-in backup. No recovery. No warning before it's too late.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"The Fix","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"clawhub install session-guardian\nbash ~/.openclaw/workspace/skills/session-guardian/scripts/install.sh","type":"text"}]},{"type":"paragraph","content":[{"text":"That's it. Five layers of protection, running automatically.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"How It Works","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"Layer 1: Incremental Backup → Every 5 min → New conversations saved\nLayer 2: Hourly Snapshot → Every hour → Full session snapshots\nLayer 3: Health Check → Every 6 hours → Detect problems early\nLayer 4: Smart Summary → Daily → Key info extracted\nLayer 5: Knowledge Extraction → Daily → Best practices saved","type":"text"}]},{"type":"paragraph","content":[{"text":"All automatic. All in the background. Zero manual work.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick Start","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Install\nclawhub install session-guardian\n\n# Deploy (sets up all cron jobs automatically)\ncd ~/.openclaw/workspace/skills/session-guardian\nbash scripts/install.sh\n\n# Check status\nbash scripts/status.sh","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"What You Get","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Auto-backup","type":"text","marks":[{"type":"strong"}]},{"text":" every 5 minutes — never lose more than 5 min of conversation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Hourly snapshots","type":"text","marks":[{"type":"strong"}]},{"text":" — full point-in-time recovery","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Health monitoring","type":"text","marks":[{"type":"strong"}]},{"text":" — warns before token overflow crashes your agent","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"One-command recovery","type":"text","marks":[{"type":"strong"}]},{"text":" — restore any session from any backup","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Multi-agent support","type":"text","marks":[{"type":"strong"}]},{"text":" — protects all your agents, not just main","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Collaboration tracking","type":"text","marks":[{"type":"strong"}]},{"text":" — see task flow across agents (King → Lead → Members)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Knowledge extraction","type":"text","marks":[{"type":"strong"}]},{"text":" — auto-saves best practices from conversations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"Minimal overhead","type":"text","marks":[{"type":"strong"}]},{"text":" — ~10-15k tokens/day, ~1-2MB/agent/month","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Usage","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Check Status","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash ~/.openclaw/workspace/skills/session-guardian/scripts/status.sh","type":"text"}]},{"type":"paragraph","content":[{"text":"Shows: backup count, last backup time, snapshot count, cron jobs, disk usage.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Run Health Check","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash ~/.openclaw/workspace/skills/session-guardian/scripts/health-check.sh","type":"text"}]},{"type":"paragraph","content":[{"text":"Detects: oversized sessions, missing configs, disk space issues, gateway problems.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Restore a Session","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# List available backups\nbash ~/.openclaw/workspace/skills/session-guardian/scripts/restore.sh list\n\n# Restore specific agent\nbash ~/.openclaw/workspace/skills/session-guardian/scripts/restore.sh restore --agent main","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"View Collaboration Health (Multi-Agent)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash ~/.openclaw/workspace/skills/session-guardian/scripts/collaboration-health.sh report","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Track Task Flow","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash ~/.openclaw/workspace/skills/session-guardian/scripts/collaboration-tracker.sh trace \"task name\"","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Cron Jobs (Auto-Configured)","type":"text"}]},{"type":"paragraph","content":[{"text":"After ","type":"text"},{"text":"install.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":", these run automatically:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Schedule","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Task","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"What it does","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Every 5 min","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Incremental backup","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Save new conversations","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Every hour","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Snapshot","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Full session archive","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Every 6 hours","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Health check","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detect problems","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Daily 2am","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Smart summary","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Extract key info","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"File Structure","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"Assets/SessionBackups/\n├── incremental/ # Every-5-min backups\n├── hourly/ # Hourly snapshots\n├── collaboration/ # Task flow records\n└── Knowledge/ # Extracted best practices","type":"text"}]},{"type":"paragraph","content":[{"text":"All backups stay local. Nothing leaves your machine.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Who Is This For","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Solo Agent User","type":"text"}]},{"type":"paragraph","content":[{"text":"✅ Protect your main conversation from crashes ✅ Get warned before token overflow kills your agent ✅ Recover in seconds, not hours of re-explaining","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Multi-Agent Team","type":"text"}]},{"type":"paragraph","content":[{"text":"✅ Protect all agents (King + team leads + members) ✅ Track collaboration: who assigned what, who finished what ✅ Health scoring: monitor team communication quality ✅ Knowledge extraction: auto-save best practices from every agent","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Troubleshooting","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Problem","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Fix","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Backups not running","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Check ","type":"text"},{"text":"crontab -l | grep session-guardian","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Agent slow/timing out","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Run health-check — likely token overflow","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Can't restore","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"restore.sh list","type":"text","marks":[{"type":"code_inline"}]},{"text":" to see available backups","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Disk filling up","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Check config retention settings (default: 7 days incremental, 30 days snapshots)","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Configuration","type":"text"}]},{"type":"paragraph","content":[{"text":"Edit ","type":"text"},{"text":"scripts/config.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" to customize:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"BACKUP_DIR # Where backups go (default: Assets/SessionBackups)\nINCREMENTAL_KEEP # Days to keep incremental backups (default: 7)\nSNAPSHOT_KEEP # Days to keep snapshots (default: 30)\nMAX_SESSION_SIZE # Alert threshold for session size (default: 5MB)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Security","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"All data stays local — no external services, no network requests","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"No API keys required","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Backups are excluded from git (add to .gitignore)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Does not modify your session files — only reads and copies","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Performance","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Operation","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Tokens","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Storage","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Incremental backup","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~100/run","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~10KB/session/day","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hourly snapshot","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~500/run","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~100KB/session/day","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Health check","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~200/run","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~2KB/report","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Daily summary","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~5k/run","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~5KB/day","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Total","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~10-15k/day","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~1-2MB/agent/month","type":"text","marks":[{"type":"strong"}]}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Feedback","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Star: ","type":"text"},{"text":"clawhub star session-guardian","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Update: ","type":"text"},{"text":"clawhub update session-guardian","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":1},"content":[{"text":"🇨🇳 中文说明","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Session Guardian 🛡️ — 再也不丢对话","type":"text"}]},{"type":"paragraph","content":[{"text":"你的 OpenClaw 对话存在 session 文件里。Gateway 一重启、模型一断连、token 一溢出——对话就没了。没有备份,没有恢复,没有预警。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"痛点","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"Gateway 重启","type":"text","marks":[{"type":"strong"}]},{"text":" → 整个对话历史消失","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"模型断连","type":"text","marks":[{"type":"strong"}]},{"text":" → 做到一半的任务上下文全丢","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"Token 溢出","type":"text","marks":[{"type":"strong"}]},{"text":" → session 太大,Agent 变慢甚至崩溃","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"🔴 ","type":"text"},{"text":"磁盘问题","type":"text","marks":[{"type":"strong"}]},{"text":" → session 文件损坏或丢失","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"解决方案","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"clawhub install session-guardian\nbash ~/.openclaw/workspace/skills/session-guardian/scripts/install.sh","type":"text"}]},{"type":"paragraph","content":[{"text":"五层自动防护,后台运行,零手动操作。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"五层防护","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"层级","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"频率","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"作用","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"增量备份","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"每 5 分钟","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"保存新对话,最多丢 5 分钟","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"快照备份","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"每小时","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"完整 session 存档,支持回滚","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"健康检查","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"每 6 小时","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"提前发现问题(token 溢出、磁盘不足)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"智能总结","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"每天","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"提取关键信息到 MEMORY.md","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"知识沉淀","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"每天","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"自动保存最佳实践","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"你会得到","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"自动备份","type":"text","marks":[{"type":"strong"}]},{"text":" — 每 5 分钟一次,最多丢 5 分钟对话","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"一键恢复","type":"text","marks":[{"type":"strong"}]},{"text":" — 从任意备份点恢复 session","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"健康监控","type":"text","marks":[{"type":"strong"}]},{"text":" — 在 token 溢出前预警","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"多 Agent 支持","type":"text","marks":[{"type":"strong"}]},{"text":" — 保护所有 Agent,不只是 main","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"协作追踪","type":"text","marks":[{"type":"strong"}]},{"text":" — 可视化任务流转(King → 团长 → 成员)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"知识沉淀","type":"text","marks":[{"type":"strong"}]},{"text":" — 自动从对话中提取最佳实践","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ ","type":"text"},{"text":"极低开销","type":"text","marks":[{"type":"strong"}]},{"text":" — 每天约 10-15k tokens,每月约 1-2MB/Agent","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"常用命令","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# 查看状态\nbash scripts/status.sh\n\n# 健康检查\nbash scripts/health-check.sh\n\n# 恢复 session\nbash scripts/restore.sh list\nbash scripts/restore.sh restore --agent main\n\n# 协作健康度(多 Agent)\nbash scripts/collaboration-health.sh report","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"适用场景","type":"text"}]},{"type":"paragraph","content":[{"text":"个人用户","type":"text","marks":[{"type":"strong"}]},{"text":":保护主对话不丢失,token 溢出前预警,秒级恢复","type":"text"}]},{"type":"paragraph","content":[{"text":"多 Agent 团队","type":"text","marks":[{"type":"strong"}]},{"text":":保护所有 Agent,追踪协作链路,自动沉淀知识","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"安全性","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"所有数据本地存储,不联网,不需要 API Key","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"不修改 session 文件,只读取和复制","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"备份文件已排除 git 追踪","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"session-guardian","author":"@skillopedia","source":{"stars":0,"repo_name":"session-guardian","origin_url":"https://github.com/1052326311/session-guardian/blob/HEAD/SKILL.md","repo_owner":"1052326311","body_sha256":"2ccbd1f4f124f8ec084af738287e78376bb158d47c9be02012bb44699e3b2b58","cluster_key":"3321be0c5619e5bb2d65620ce4ea63789308ec1a794fb1dcd9bb8b44a370acb7","clean_bundle":{"format":"clean-skill-bundle-v1","source":"1052326311/session-guardian/SKILL.md","attachments":[{"id":"52fa6083-c52b-54fd-b4d1-4f7d7d8ddb90","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/52fa6083-c52b-54fd-b4d1-4f7d7d8ddb90/attachment.md","path":"ARCHITECTURE.md","size":4521,"sha256":"bbc2a64b3b8f81009f0b0f68988f21baf821abbfbad160e808de754b2f3de830","contentType":"text/markdown; charset=utf-8"},{"id":"b5407af5-0d93-57cf-990c-7327af2a63da","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b5407af5-0d93-57cf-990c-7327af2a63da/attachment.md","path":"CHANGELOG-v2.0.md","size":2632,"sha256":"ac7eb3404e1e85ada9a58dafc80e3b7fc3ba530f2ef1323121cb74f9d0635da4","contentType":"text/markdown; charset=utf-8"},{"id":"90008436-76d2-5a32-919b-339d33299559","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/90008436-76d2-5a32-919b-339d33299559/attachment.md","path":"CHANGELOG.md","size":2551,"sha256":"8de00019817c95c7ce69e6e42a16fe618a53b9d4e41285e2a4d7b1043cfaf7c6","contentType":"text/markdown; charset=utf-8"},{"id":"3b330074-31c5-5841-b7de-eeee5ede889c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/3b330074-31c5-5841-b7de-eeee5ede889c/attachment.md","path":"EXAMPLES.md","size":10816,"sha256":"51a42cc4834edf2ee77b3ca8b6c184c85b0cab1354f0ad813bcf5f57748455d7","contentType":"text/markdown; charset=utf-8"},{"id":"4af4cf6c-fe16-54b0-a31c-d255eae79006","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/4af4cf6c-fe16-54b0-a31c-d255eae79006/attachment.md","path":"README.md","size":9498,"sha256":"e2e6a7c86776252ab92648d34a6a335fa427349f070005acf3d588ad48a73ac3","contentType":"text/markdown; charset=utf-8"},{"id":"bdd1458f-7d90-5478-a4fc-f83684acd0eb","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bdd1458f-7d90-5478-a4fc-f83684acd0eb/attachment.md","path":"RELEASE-CHECKLIST-v2.0.md","size":3378,"sha256":"4c40ed4c84828ff925683ccc44801752127832b5de809946c8a9d7f81c84dc9f","contentType":"text/markdown; charset=utf-8"},{"id":"e29b5c11-6b95-54c0-9fbf-4f88ea0082b5","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e29b5c11-6b95-54c0-9fbf-4f88ea0082b5/attachment.md","path":"RELEASE-CHECKLIST.md","size":2884,"sha256":"e697686e20b2d552d45e5c9aeb9bc2c04ad639939b3b2aeb1dc8ec63425d8d52","contentType":"text/markdown; charset=utf-8"},{"id":"4ef09ea2-8064-5d48-96a9-c7e9139f3a58","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/4ef09ea2-8064-5d48-96a9-c7e9139f3a58/attachment.md","path":"RELEASE-v1.0.md","size":6200,"sha256":"ea49505104009a803177d1b7e64c2e9fc813b7d9e34d2b0da2efd646e288919f","contentType":"text/markdown; charset=utf-8"},{"id":"a1a04110-f96f-5e7c-a085-58bfacfddc01","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a1a04110-f96f-5e7c-a085-58bfacfddc01/attachment.md","path":"TEST-REPORT-v2.0.md","size":6486,"sha256":"e7d891a242f940b4082a346b2e521a3fc55788d1d38218f884e1fed370a57f22","contentType":"text/markdown; charset=utf-8"},{"id":"c6408318-4564-59cc-8da4-3425bf51dbe6","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c6408318-4564-59cc-8da4-3425bf51dbe6/attachment.json","path":"config.json","size":1451,"sha256":"d4a0771e81e3caca45ec4a7f6b3ef0e328d18f58a4248c46b71f65ba50f9b931","contentType":"application/json; charset=utf-8"},{"id":"6f72fabc-4946-5b2a-9e98-1c50591e658f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/6f72fabc-4946-5b2a-9e98-1c50591e658f/attachment.backup","path":"config.json.backup","size":899,"sha256":"989ebd409af2f72dcc190404148721270db8f42933f6aebb2aaddee724c2af7e","contentType":"text/plain; charset=utf-8"},{"id":"ae516cbd-7cff-57f3-b5d8-f313f20b3deb","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ae516cbd-7cff-57f3-b5d8-f313f20b3deb/attachment.sh","path":"scripts/analyze-agent-compaction.sh","size":3273,"sha256":"09d871698eeb6e8b01263a6592491c8aea64ba4c8a4cc7c762603920dc41bff7","contentType":"application/x-sh; charset=utf-8"},{"id":"a36d6b56-5ed7-5533-9dc4-5bd16666cea4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a36d6b56-5ed7-5533-9dc4-5bd16666cea4/attachment.sh","path":"scripts/analyze-all-agents.sh","size":4470,"sha256":"915d77df5367923f0b381d020b29e24740c812723ca11dad2c43b5055b2f80fa","contentType":"application/x-sh; charset=utf-8"},{"id":"e0c63c50-7223-5ef6-b4f3-086ac3267f2c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e0c63c50-7223-5ef6-b4f3-086ac3267f2c/attachment.sh","path":"scripts/auto-compact.sh","size":1791,"sha256":"3d5f4875a9ea3dda961d39e5f4fbf818febee566a27e8c4630c3c6cdd9119779","contentType":"application/x-sh; charset=utf-8"},{"id":"4fb5db5a-9bde-54b7-9e0c-e8a3b7105105","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/4fb5db5a-9bde-54b7-9e0c-e8a3b7105105/attachment.sh","path":"scripts/collaboration-health.sh","size":2517,"sha256":"1a331ce2342a61ec852833df6c7ccbb2c4075864cbefed28eea6016e25d499da","contentType":"application/x-sh; charset=utf-8"},{"id":"d22c1c85-904d-5006-b36e-c407e8333089","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d22c1c85-904d-5006-b36e-c407e8333089/attachment.sh","path":"scripts/collaboration-tracker.sh","size":2418,"sha256":"b757bb1a0b93a5fb1b338ca9447f15e1e1a9fb22e3d1f7b643075fc236b31ea5","contentType":"application/x-sh; charset=utf-8"},{"id":"85505052-013f-503b-84e8-5efb08b84475","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/85505052-013f-503b-84e8-5efb08b84475/attachment.sh","path":"scripts/config.sh","size":6392,"sha256":"75ce9892c907569708b1d54452dae0e86faa065050b33e35996cfbb040e21467","contentType":"application/x-sh; charset=utf-8"},{"id":"d06e844a-3dd7-575e-95a0-ae9cc8652ff0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d06e844a-3dd7-575e-95a0-ae9cc8652ff0/attachment.sh","path":"scripts/context-recovery.sh","size":4349,"sha256":"63de63e423c06ba313c1a62caf91bac396fff444ba77b1783d3e1a72f99acfcc","contentType":"application/x-sh; charset=utf-8"},{"id":"dfc55ea1-4ca1-52f6-94c8-8c32f5c7e785","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/dfc55ea1-4ca1-52f6-94c8-8c32f5c7e785/attachment.sh","path":"scripts/detect-skills.sh","size":9195,"sha256":"2267abe4a551fac3a167bd1d0071a92f339ab1921915525fe17d3eb78c58280b","contentType":"application/x-sh; charset=utf-8"},{"id":"ee85c3c0-eeca-522e-bdee-4da0a4f369aa","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ee85c3c0-eeca-522e-bdee-4da0a4f369aa/attachment.sh","path":"scripts/health-check.sh","size":9670,"sha256":"8a3051bc9625f7483a5e12ba522f06c04776677d5e40db790ac88d16bf85a35e","contentType":"application/x-sh; charset=utf-8"},{"id":"ef0e212c-cf54-587e-9a05-feed2deead16","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ef0e212c-cf54-587e-9a05-feed2deead16/attachment.sh","path":"scripts/hourly-snapshot.sh","size":1419,"sha256":"d92fc96f9e102de682186bf50838e6caa56e09b5883fe3f42b73e7b45ae8597d","contentType":"application/x-sh; charset=utf-8"},{"id":"ac663f66-66ae-5391-a3f8-a0d66b9153ac","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ac663f66-66ae-5391-a3f8-a0d66b9153ac/attachment.sh","path":"scripts/incremental-backup.sh","size":2150,"sha256":"6cfe2305a5fe423f6679565a7e358ec750b8582b7a030d327576ce5cd29f5e02","contentType":"application/x-sh; charset=utf-8"},{"id":"efaf721a-28cf-5f58-a60c-bbde9b5d0c1a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/efaf721a-28cf-5f58-a60c-bbde9b5d0c1a/attachment.sh","path":"scripts/install.sh","size":9471,"sha256":"5e3e2027e2e2a8d6b4b8c66ea90133d566bd406b65636a10f8915e7c3be4ed62","contentType":"application/x-sh; charset=utf-8"},{"id":"cec1c607-f8b8-5847-9581-d7fbfab17e85","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/cec1c607-f8b8-5847-9581-d7fbfab17e85/attachment.sh","path":"scripts/knowledge-extractor.sh","size":3413,"sha256":"04e0fc63f91982a6fd08a663a101dbadb1a822bf82749b5ae55f01a24e02f3a4","contentType":"application/x-sh; charset=utf-8"},{"id":"b1b4f817-3f95-512c-8e04-0f9436700250","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b1b4f817-3f95-512c-8e04-0f9436700250/attachment.sh","path":"scripts/plan-manager.sh","size":7628,"sha256":"d77dfb97e2b499bd359881fb59e3204336ca946469c7302364361f3135726e3a","contentType":"application/x-sh; charset=utf-8"},{"id":"f7ca9997-28a3-5ea9-bcaf-d386e2b4b826","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f7ca9997-28a3-5ea9-bcaf-d386e2b4b826/attachment.sh","path":"scripts/restore.sh","size":10085,"sha256":"3b74cf86ce39f2efd17b86a8256572bf33b62088b43ef59038e199d0a95d3d52","contentType":"application/x-sh; charset=utf-8"},{"id":"663fe02b-59b7-5d12-874b-c9994bf8d7c3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/663fe02b-59b7-5d12-874b-c9994bf8d7c3/attachment.sh","path":"scripts/session-isolation-check.sh","size":8485,"sha256":"9041318c40f534a089197bf9195badd1da5e1f455305e680a0a9611979e5d2a6","contentType":"application/x-sh; charset=utf-8"},{"id":"2c67b9a8-d214-5745-839d-35b5f05947c5","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2c67b9a8-d214-5745-839d-35b5f05947c5/attachment.sh","path":"scripts/smart-health-check.sh","size":2079,"sha256":"d6bddbfc5317f8fdd93fd775575b51685f9faad2a8a771b8738da2444642da3f","contentType":"application/x-sh; charset=utf-8"},{"id":"c468810e-5431-58dc-a2e8-4440a3551a2b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c468810e-5431-58dc-a2e8-4440a3551a2b/attachment.sh","path":"scripts/smart-summary.sh","size":1035,"sha256":"2fdab1f4401ba5d2862fcabde1a59a20b4aca256306ff381d94dfa2d0e63a4d3","contentType":"application/x-sh; charset=utf-8"},{"id":"f6f4fdd3-adcd-577f-aadd-4e24740171f4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f6f4fdd3-adcd-577f-aadd-4e24740171f4/attachment.sh","path":"scripts/status.sh","size":7772,"sha256":"1d3b4e00abcd2194ac7e34b4d36fa7805dad126830f1c88fdb2b643061dca4a1","contentType":"application/x-sh; charset=utf-8"},{"id":"2135321d-b91d-5373-9224-5a182df8cc61","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2135321d-b91d-5373-9224-5a182df8cc61/attachment.sh","path":"scripts/test.sh","size":1552,"sha256":"8f06929d278aa5fb4496aa6e2c63ca48a40651e3d712a152ec2c300a998bc902","contentType":"application/x-sh; charset=utf-8"},{"id":"bbdebbfb-61f6-57a9-adaa-29a5286e6692","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bbdebbfb-61f6-57a9-adaa-29a5286e6692/attachment.sh","path":"scripts/token-monitor.sh","size":3555,"sha256":"52fad07c708979d711e6d8450401c3eacf67b6dea9a31b2d6c7cd00d54065159","contentType":"application/x-sh; charset=utf-8"},{"id":"2a1b9148-7517-5324-94b2-92d764a2f60e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2a1b9148-7517-5324-94b2-92d764a2f60e/attachment.md","path":"skill-detection-report.md","size":1555,"sha256":"c45c566de3b9e6cb7fc33726d9206da62da13029e2cd70f006d9f37fdf88d5c0","contentType":"text/markdown; charset=utf-8"},{"id":"0ad950d6-5886-5014-b4e9-44bebc8ca27b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0ad950d6-5886-5014-b4e9-44bebc8ca27b/attachment.md","path":"templates/task-plan-template.md","size":1134,"sha256":"81f8fb79d8e8444e831c30d9bf0daecd03349ebe6ff184571d0fd9807df71552","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"e3290427eb81c67384062e604926cb289ff1505c641554b9d0b8035aa5c2a4ca","attachment_count":34,"text_attachments":13,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":21,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"devops-infrastructure","category_label":"DevOps"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"devops-infrastructure","import_tag":"clean-skills-v1","description":"Never lose a conversation again. Auto-backup, smart recovery, and health monitoring for OpenClaw sessions. Protects against gateway crashes, model disconnections, and token overflow.\n\nUse this skill when:\n- User worries about losing conversations after gateway restart or model crash\n- User mentions session backup, conversation recovery, session protection, or data loss\n- User's agent is slow or timing out (likely token overflow from large sessions)\n- User runs multiple agents and needs to track collaboration across sessions\n- User asks about session health, backup strategy, or disaster recovery\n- User mentions \"对话丢失\", \"会话备份\", \"上下文溢出\", \"token超限\", \"Gateway重启后记忆丢失\"\n- Even if user just says \"my agent lost everything after a restart\" — this is the skill\n"}},"renderedAt":1782987369870}

Session Guardian 🛡️ Never lose a conversation again. The Problem Your OpenClaw conversations live in session files. When things go wrong — and they will — you lose everything: - 🔴 Gateway restart → entire conversation history gone - 🔴 Model disconnection → mid-task context wiped out - 🔴 Token overflow → session too large, agent slows down or crashes - 🔴 Disk issues → session files corrupted or lost No built-in backup. No recovery. No warning before it's too late. The Fix That's it. Five layers of protection, running automatically. How It Works All automatic. All in the background. Zero m…