ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

context-restore

Skill that restores conversation context when users want to "continue where we left off". Reads compressed context files, extracts key information (recent operations, projects, tasks), and provides structured output to help users quickly resume their work.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/alexunitario-sketch/context-restore
Or

Context Restore Skill

快速开始

# 基础使用 - 恢复上下文
/context-restore

# 指定恢复级别
/context-restore --level detailed
/context-restore -l minimal

# 命令行工具
python scripts/restore_context.py --level normal

# 获取结构化摘要(供其他技能使用)
python scripts/restore_context.py --summary

# 用户确认流程
python scripts/restore_context.py --confirm

# Telegram 消息分块发送
python scripts/restore_context.py --telegram

# ========== Phase 3: 自动触发集成 ==========

# 自动检测并恢复上下文(检测到变化时自动恢复)
python scripts/restore_context.py --auto

# 自动模式,静默输出(适合 cron)
python scripts/restore_context.py --auto --quiet

# 仅检查变化(返回退出码 0/1)
python scripts/restore_context.py --check-only

# 安装 cron 自动监控任务
python scripts/restore_context.py --install-cron

功能说明

核心价值

让用户在 /new(开启新会话)后快速恢复工作状态:

  • 无需重复解释背景
  • 秒级恢复到之前的工作状态
  • 自然语言触发,无感恢复
  • 支持用户确认流程
  • Telegram 消息自动分块

目标用户场景

场景用户需求恢复内容
跨天继续工作昨天做到哪了?项目进度、待办任务
任务切换后回来之前在做什么?当前任务状态、关键文件
中断后继续接着刚才的聊对话历史节点
周期性回顾这周做了哪些事?时间线摘要、成果列表

触发条件

中文关键词

核心词: 恢复上下文、继续之前的工作
扩展词: 恢复、接着、继续、之前聊到哪了、继续之前的工作、
        继续之前的任务、接着做、回到之前的工作、恢复工作状态

英文关键词

核心词: restore context、continue previous work
扩展词: continue、resume、what was I doing、where did we leave off、
        get back to work、resume session

命令格式

/context-restore [选项]
/restore [选项]
恢复上下文 [级别]
restore context [level]

级别参数

参数效果
minimal / min / 简短极简模式(核心状态一句话)
normal / default / 正常标准模式(默认,项目+任务)
detailed / full / 详细完整模式(完整上下文+时间线)

执行流程

1. 检测意图 → 关键词/命令识别
2. 加载上下文 → 读取 compressed_context/latest_compressed.json
3. 解析内容 → JSON 或纯文本格式
4. 提取信息 → 项目、任务、操作、时间线
5. 格式化输出 → 根据级别生成报告
6. 发送确认 → 用户确认后继续工作

恢复级别

Minimal(极简)

输出内容

  • 核心状态一句话
  • 1个活跃任务

示例输出

✅ 上下文已恢复

状态:Hermes Plan 进行中(数据管道完成,待测试)

Normal(标准,默认)

输出内容

  • 项目状态列表
  • 待办任务列表
  • 最近操作记录
  • MEMORY.md 高亮

示例输出

✅ 上下文已恢复

当前活跃项目:
1. 🏛️ Hermes Plan - 数据分析助手(进度:80%)
2. 🌐 Akasha Plan - 自主新闻系统(进度:45%)

待办任务:
- [高] 编写数据管道测试用例
- [中] 设计 Akasha UI 组件
- [低] 更新 README 文档

最近操作(今天):
- 完成数据清洗模块
- 添加 3 个新 cron 任务
- 修改配置文件

Detailed(完整)

输出内容

  • 完整会话概览
  • 所有项目详情
  • 完整任务队列(按优先级分类)
  • 7天时间线
  • 原始内容预览

示例输出

✅ 上下文已恢复(完整模式)

═══════════════════════════════════════
📊 会话概览
═══════════════════════════════════════
当前会话:#2026-02-06-main
活跃 Isolated Sessions:3个
最后活动:2小时前

═══════════════════════════════════════
🎯 核心项目状态
═══════════════════════════════════════
1. Hermes Plan(进行中)- 进度:80%
2. Akasha Plan(待恢复)- 进度:45%

[...完整时间线和历史记录]

API / 命令行参数

Python API

from restore_context import (
    restore_context,
    get_context_summary,
    extract_timeline,
    compare_contexts,
    filter_context
)

# 基础恢复
report = restore_context(filepath, level="normal")

Metadata

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-alexunitario-sketch-context-restore": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.