SuperAPI AI Directory

context-resume

General & other

View repository

Updated 10-15 16:45

About this skill

Context Restore Guide

Use Cases

In a new Claude Code window, invoke this Skill when you need to continue previously unfinished tasks.


Execution Steps

Step 1: List All Sessions

Read all docs/context-sessions/ files in the .md directory (excluding .gitkeep).

Output Format:

📋 待处理的 Session 列表:
  1. 20251128-1430-implement user login feature.md Unfinished tasks: 3

  2. 20251128-1600-fix export bug.md Unfinished tasks: 1

Please tell me which session to restore (enter the number or file name)


如果目录为空,输出:

📭 There are currently no pending sessions.

All tasks are complete, or context has not yet been saved using context-save.


### Step 2: 读取并展示 Session 内容

用户选择后,读取对应的 session 文件,完整展示内容。

**输出格式**:

📂 Session loaded: {file name}


{full contents of the session file}

🎯 Which task should be handled next? Or do you need me to continue the previous work?


### Step 3: 开始工作

根据 session 中的信息:
1. 读取关键文件,恢复上下文理解
2. 按优先级处理未完成任务
3. 遵循"下一步行动"的建议

### Step 4: 更新任务进度

每完成一个任务后,**立即更新** session 文件:

1. 将已完成的任务从"未完成"移到"已完成"
2. 更新元信息中的"最后更新"时间
3. 添加新发现的任务(如果有)

**示例更新**:

```markdown
## 已完成任务
- [x] 任务1描述
- [x] 任务2描述
- [x] 🔴 高优先级: 实现 publishArticle 方法  ← 新完成

## 未完成任务
- [ ] 🔴 高优先级: 处理图片上传到微信服务器
- [ ] 🟡 中优先级: 添加发布结果回调

Step 5: Task Completion Handling

When all unfinished tasks have been completed:

  1. Immediately delete the session file
  2. Output completion information

Output Format:

🎉 Session 所有任务已完成!

已完成任务汇总:
- [x] 任务1
- [x] 任务2
- [x] 任务3

Session 文件已删除: docs/context-sessions/{文件名}

Workflow Diagram

┌─────────────────┐
│  调用 skill     │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  列出所有       │
│  session 文件   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  用户选择       │
│  要恢复的       │
│  session        │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  读取并展示     │
│  session 内容   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  开始处理任务   │◄──────────┐
└────────┬────────┘           │
         │                    │
         ▼                    │
┌─────────────────┐           │
│  完成一个任务   │           │
│  更新 session   │           │
└────────┬────────┘           │
         │                    │
         ▼                    │
    ┌────────────┐            │
    │ 还有未完成 │───Yes──────┘
    │   任务?   │
    └─────┬──────┘
          │ No
          ▼
┌─────────────────┐
│  删除 session   │
│  文件           │
└─────────────────┘

Command Shortcuts

After restoring a session, you can use the following commands:

Command Purpose
继续 Continue with the next task by priority
更新进度 Manually trigger a session file update
查看剩余 Show remaining unfinished tasks
换窗口处理- Save again and switch windows

Notes

  1. Update promptly - Update the session file immediately after completing each task
  2. Keep files in sync - If new tasks are found, add them to the unfinished list
  3. Deletion confirmation - Delete the file only when all tasks are complete
  4. Key files - When restoring, prioritize reading the key files listed in the session