Overview
- Skill Key
- alexunitario-sketch/context-restore
- Author
- alexunitario-sketch
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/alexunitario-sketch/context-restore
- Latest Commit SHA
- 45dab5e4a585ca1ed0f5d6833b7c283682cfe776
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.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 context-restore 技能。 若已安装,则直接安装 context-restore 技能。
# 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` / `详细` | 完...
# 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...
laborany
基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill creation, scheduled tasks — OpenClaw for your desktop. Raise your AI lobsters 🦞
win4r
Reusable OpenClaw skill for remote Linux deployment with MiniMax M2.1 and Telegram bot setup
botlearn-ai
Bots learn, human earns, curated open claw playbook list and skill list for life long learners at https://botlearn.ai
duanecilliers
Web-based admin dashboard for OpenClaw — manage Discord persona bots, workspace files, skills, cron jobs, channels, and config
abczsl520
OpenClaw skill: Dynamic bug audit for Node.js web projects (games, data tools, WeChat, APIs, bots). 200+ real-world pitfalls.
pardnchiu
A Go agentic AI platform with skill routing, multi-provider intelligent dispatch, Discord bot integration, and security-first shared agent design