← All skills
Tencent SkillHub · AI

Task Persistence

Task continuity, session snapshots, and gateway restart recovery. Use when starting long-running tasks (register them), after gateway restart (check for inte...

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Task continuity, session snapshots, and gateway restart recovery. Use when starting long-running tasks (register them), after gateway restart (check for inte...

⬇ 0 downloads ★ 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, _meta.json, config.json, dist/SKILL.md, dist/config.json, dist/scripts/__init__.py

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.1.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 14 sections Open source page

Task Persistence

会话状态管理、任务持久化和网关重启恢复。

核心场景

触发条件动作网关刚重启运行 check-restart,汇报恢复状态开始长时间任务用 task_manager.py add 注册任务用户问"有没有未完成的任务"运行 task_manager.py list任务完成运行 task_manager.py complete任务被中断运行 task_manager.py recover

变量说明

所有脚本中的 {baseDir} = 本技能的目录路径(SKILL.md 所在目录)。 工作区路径从环境变量 OPENCLAW_WORKSPACE 读取,默认 /workspace。

网关重启后检查(每次重启后必须执行)

python3 {baseDir}/scripts/main.py --mode check-restart --workspace /workspace

查看所有活跃任务

python3 {baseDir}/scripts/task_manager.py --action list --workspace /workspace

注册新任务(开始长时间操作前)

python3 {baseDir}/scripts/task_manager.py \ --action add \ --task-id "task_$(date +%s)" \ --task-type "file_processing" \ --description "处理大量文件" \ --priority normal \ --workspace /workspace

标记任务完成

python3 {baseDir}/scripts/task_manager.py \ --action complete \ --task-id <task_id> \ --workspace /workspace

从崩溃/重启中恢复任务

python3 {baseDir}/scripts/task_manager.py \ --action recover \ --workspace /workspace

任务队列状态

python3 {baseDir}/scripts/task_manager.py --action status --workspace /workspace

会话快照(保存当前状态)

python3 {baseDir}/scripts/session_snapshot.py \ --workspace /workspace \ --action list

网关监控状态

python3 {baseDir}/scripts/main.py --mode status --workspace /workspace

重启后工作流

当 heartbeat 或用户提到"网关重启"时,执行: python3 {baseDir}/scripts/main.py --mode check-restart --workspace /workspace 解析输出中的 active_tasks 和 recovered_tasks 向用户汇报:哪些任务被恢复、哪些需要手动继续

文件结构

/workspace/ tasks/ task_queue.json # 任务队列 completed/ # 已完成任务 failed/ # 失败任务 memory/ session_snapshots/ # 会话快照 persistence/ active_tasks.json # 持久化任务 gateway_state.json # 网关状态

注意事项

脚本使用标准库,无需额外安装依赖 所有数据持久化在 workspace 目录下,重启后不会丢失 task_manager.py 是统一入口,推荐优先使用 gateway_monitor.py 的后台监控模式(full mode)在沙箱中不适用,用 check-restart 代替

Category context

Agent frameworks, memory systems, reasoning layers, and model-native orchestration.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
3 Config2 Docs1 Scripts
  • SKILL.md Primary doc
  • dist/SKILL.md Docs
  • dist/scripts/__init__.py Scripts
  • _meta.json Config
  • config.json Config
  • dist/config.json Config