Search

PythonReactSEOPDF
OpenClaw

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.

alexunitario-sketch0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install alexunitario-sketch/context-restore

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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 / 详细 完...

Source information

Source
github
Repository
openclaw/skills
Path
skills/alexunitario-sketch/context-restore
Version
—
Commit
45dab5e4a585ca1ed0f5d6833b7c283682cfe776
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

Context Restore Skill

Overview

The Context Restore skill provides utilities for restoring and presenting compressed context information from OpenClaw sessions. It reads compressed context files and generates formatted reports at various detail levels.

Features

  • Multi-format Support: Handles both JSON and plain text compressed context files
  • Three Report Levels: minimal, normal, and detailed output formats
  • Automatic Extraction: Parses metadata, projects, tasks, and operations
  • Compression Analysis: Calculates and displays compression ratios
  • Flexible Output: Display to stdout or save to file

Directory Structure

skills/context-restore/
├── README.md                 # This documentation
├── SKILL.md                  # Skill metadata (if needed)
└── scripts/
    ├── restore_context.py    # Main script
    └── test_results.md       # Test execution results

Installation

No additional installation required. The script uses only Python standard library modules:

  • argparse - Command-line argument parsing
  • json - JSON format handling
  • re - Regular expression parsing
  • sys - System utilities
  • pathlib - File path operations

Usage

Basic Usage
# Run with default settings (normal level)
python3 skills/context-restore/scripts/restore_context.py
Report Levels
# Minimal - Brief summary with counts only
python3 skills/context-restore/scripts/restore_context.py --level minimal

# Normal - Full details with descriptions (default)
python3 skills/context-restore/scripts/restore_context.py --level normal

# Detailed - Complete dump with raw content preview
python3 skills/context-restore/scripts/restore_context.py --level detailed
Custom File Path
# Use a specific compressed context file
python3 skills/context-restore/scripts/restore_context.py --file /path/to/context.json

# Combine with level and output options
python3 skills/context-restore/scripts/restore...

Extracted content

SKILL.md
# Context Restore Skill

## 快速开始

```bash
# 基础使用 - 恢复上下文
/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` / `详细` | 完...
README
# Context Restore Skill

## Overview

The **Context Restore** skill provides utilities for restoring and presenting compressed context information from OpenClaw sessions. It reads compressed context files and generates formatted reports at various detail levels.

## Features

- **Multi-format Support**: Handles both JSON and plain text compressed context files
- **Three Report Levels**: `minimal`, `normal`, and `detailed` output formats
- **Automatic Extraction**: Parses metadata, projects, tasks, and operations
- **Compression Analysis**: Calculates and displays compression ratios
- **Flexible Output**: Display to stdout or save to file

## Directory Structure

```
skills/context-restore/
├── README.md                 # This documentation
├── SKILL.md                  # Skill metadata (if needed)
└── scripts/
    ├── restore_context.py    # Main script
    └── test_results.md       # Test execution results
```

## Installation

No additional installation required. The script uses only Python standard library modules:

- `argparse` - Command-line argument parsing
- `json` - JSON format handling
- `re` - Regular expression parsing
- `sys` - System utilities
- `pathlib` - File path operations

## Usage

### Basic Usage

```bash
# Run with default settings (normal level)
python3 skills/context-restore/scripts/restore_context.py
```

### Report Levels

```bash
# Minimal - Brief summary with counts only
python3 skills/context-restore/scripts/restore_context.py --level minimal

# Normal - Full details with descriptions (default)
python3 skills/context-restore/scripts/restore_context.py --level normal

# Detailed - Complete dump with raw content preview
python3 skills/context-restore/scripts/restore_context.py --level detailed
```

### Custom File Path

```bash
# Use a specific compressed context file
python3 skills/context-restore/scripts/restore_context.py --file /path/to/context.json

# Combine with level and output options
python3 skills/context-restore/scripts/restore...

Related skills

OpenClaw

laborany

laborany

基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...

OpenClaw

openclaw-admin

duanecilliers

Web-based admin dashboard for OpenClaw — manage Discord persona bots, workspace files, skills, cron jobs, channels, and config