Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

restore-session恢复会话

Agent Skill

restore-session 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

303

周安装

13

GitHub Stars

22

下载量

106
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:restore-session(恢复会话)
来源仓库:https://github.com/zeng3ld/claude-session-restore
仓库路径:skills/restore-session
安装命令:
npx skills add https://github.com/zeng3ld/claude-session-restore --skill restore-session
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/zeng3ld/claude-session-restore --skill restore-session

简介

用于查找和筛选相关信息。restore-session 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 支持关键词搜索和任务场景匹配。
  • 可结合来源仓库核验具体内容。
  • 需确认权限范围和检索限制。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 适合快速定位候选结果和信息筛选。

SKILL.md

Session Restoration Skill

This skill helps restore full context when starting a new Claude session after a previous session was closed, crashed, or became too large.

When to Use

Use this skill when:

  • Starting a new session after a previous one ended
  • User asks to restore previous context
  • Session was interrupted or overflowed
  • User mentions "restore", "previous session", "last session"
  • User mentions (Russian): "восстанови", "восстанов", "предыдущая сессия", "прошлая сессия", "продолжи работу"

Restoration Process

Step 1: Find and Analyze Recent Session Files

Use the session-summary CLI tool to list recent sessions with automatic topic extraction:

# List recent sessions (default: last 12 hours, includes both projects/ and archive/)
session-summary.exe list

# Extend time window to 24 hours
session-summary.exe list --max-age-hours 24

# Only search projects directory (exclude archive)
session-summary.exe list --projects-only

What you'll see for each session:

  • Date/time: When it was last modified
  • Size: File size (indicates session length)
  • Source: [projects] or [archive]
  • Topic: Simple label (Agent tasks, User session, Tool usage, etc.)
  • Multi-vector data: Raw data from different event sources with emoji labels:

- 📋 Tasks - Agent task prompts - 💬 User - User messages - 🔧 Tools - Tool operations with file paths - ⚙️ Bash - Bash command outputs - 🔍 Search - Web search queries

Example output:

Recent Sessions:

1. 8f59d651-cada-4484-9153-5cc577137486
   Jan 26 04:33 | 32.42 MB | [projects] | Agent tasks
   📋 Tasks: Fix the dropdown z-order problem... → Fix the dropdown... → Fix the dropdown...
   💬 User: дропдауны либо с 0 опасити... → закомить работу...
   🔧 Tools: Bash, Bash, Bash, Write

2. 4e0b5d3d-c6d1-497d-9c6f-96e83980c7a0
   Jan 26 05:47 | 103.69 MB | [projects] | Agent tasks
   📋 Tasks: Implement MOEX ISS API connector... → Implement MOEX ISS API connector... → Implement MOEX ISS API connector...
   💬 User: <ide_opened_file>The user opened... → да, какие проблемы выявлены...
   🔧 Tools: Bash, Bash, Bash, Task, Task

3. 3162998f-09ca-4efc-b659-8507eb57bd37
   Jan 26 00:21 | 232.79 MB | [archive] | User session
   💬 User: Create 2-turn conversation test... → Run the tests...
   🔧 Tools: Task, Bash, Grep, Read, Write
   ⚙️ Bash: cargo check; compiling...

To load a session, use:
  1. session-summary.exe load "C:\Users\...\8f59d651-cada-4484-9153-5cc577137486.jsonl"
  2. session-summary.exe load "C:\Users\...\4e0b5d3d-c6d1-497d-9c6f-96e83980c7a0.jsonl"
  3. session-summary.exe load "C:\Users\...\3162998f-09ca-4efc-b659-8507eb57bd37.jsonl"

Ask user which session to restore, then copy-paste the corresponding load command

Step 2: Deep Dive into Selected Session

Once user selects a session, copy-paste the corresponding load command from the list output:

# Copy the full command from "To load a session" section above
session-summary.exe load "C:\Users\...\session-id.jsonl"

Example output:

═══════════════════════════════════════
Session: 8f59d651-cada-4484-9153-5cc577137486
═══════════════════════════════════════
Date: 2026-01-26 04:33:18
Size: 32.42 MB
Topic: Agent tasks

Agent Tasks 📋 (126 tasks)
  1. СРОЧНО! Dropdown перекрывается другими элементами (footer, другие UI)...
  2. Fix dropdown z-order problem in Chart Settings modal
  3. Implement hover states for dropdown items
  4. Add auto-sizing to dropdown containers
  ... (122 more)

User Messages 💬 (2 messages)
  1. закомить работу в ваших крейтах (чужую не комить)
  2. итого подведи итог что мы сделали по унификации...

Tool Operations 🔧 (7 operations)
  1. Task
  2. Bash
  3. Edit (zengeld-terminal/ui/chart_settings.rs)
  4. Read (zengeld-terminal/ui/dropdown.rs)
  ... (3 more)

Files Modified 📁 (17 files)
  1. zengeld-terminal/ui/chart_settings.rs
  2. zengeld-terminal/ui/dropdown.rs
  3. zengeld-terminal/ui/modal.rs
  ... (14 more)

Git Branch: zengeld-chart

The tool automatically:

  • Reads last segment of session from compact_boundary to end
  • Collects data from 6+ event types (AgentProgress, User, Assistant, BashProgress, QueryUpdate, FileSnapshot)
  • Shows all data vectors with counts and previews
  • Does NOT try to infer topics - just shows raw data
  • Extracts git branch and commit hints for further analysis

Step 3: Search Git History

Search for related commits to understand what was accomplished:

# Extract keywords from session (project names, features, etc.)
# Then search git log with those keywords

git log --all --oneline --grep="keyword1" --grep="keyword2" -i --since="1 week ago" | head -30

# Get detailed commit info
git show --stat <commit-hash>

Look for:

  • Commits made during or after the session timestamp
  • Commit messages describing the feature/fix being worked on
  • File changes that match the session's tracked files

Step 4: Analyze Multi-Vector Data & Provide Context Summary

IMPORTANT: The parser shows RAW DATA in multiple vectors. Your job is to ANALYZE this data and understand what was being worked on.

Look at all vectors:

  • Agent Tasks - What agents were doing (feature implementation, debugging, refactoring)
  • User Messages - What user was asking for, decisions made
  • Tool Operations - Which files were read/edited, what operations performed
  • Bash Activities - Build/test commands, git operations
  • Web Searches - Research topics, API documentation lookups
  • Files Modified - Scope of changes

Present a structured summary:

## Session Restoration Summary

**Session**: [session-id]
**Date**: [timestamp]
**Project**: [project-name]

### What Was Being Worked On:
[Analyze the multi-vector data to determine the main task/feature/bugfix]

### Files Being Worked On:
- path/to/file1.rs (main implementation)
- path/to/file2.rs (supporting changes)
- ...

### Related Git Commits:
- [hash] commit message (date)
- [hash] commit message (date)

### Context from Session Data:
- **Agent focus**: [from Tasks vector]
- **User requests**: [from User Messages vector]
- **Technical operations**: [from Tools/Bash vectors]

### Recommendations:
- Continue from: [specific file or task]
- Next steps: [based on commit history and unfinished work]

Important Notes

  • Session files can be VERY large (2GB+) - session-summary handles this efficiently
  • Tool uses tail + reverse parsing - reads from end, stops early
  • Multi-vector approach - parser collects raw data, you analyze it
  • Don't assume topic from label - "Agent tasks" is just a simple label, analyze the actual data
  • Git commits are the best context - they show what was actually accomplished
  • Timestamps help - cross-reference session time with commit times
  • Time filtering - default 12 hours, can extend to 24 hours with --max-age-hours

Example Usage

User: "restore previous session"
Assistant: [Runs restore-session skill]

I'll list recent sessions from the last 12 hours:

[runs: session-summary.exe list]

Recent Sessions:

1. 8f59d651-cada-4484-9153-5cc577137486
   Jan 26 04:33 | 32.42 MB | [projects] | Agent tasks
   📋 Tasks: Fix the dropdown z-order problem... → Fix the dropdown... → Fix the dropdown...
   💬 User: дропдауны либо с 0 опасити... → закомить работу...
   🔧 Tools: Bash, Bash, Bash, Write

2. 4e0b5d3d-c6d1-497d-9c6f-96e83980c7a0
   Jan 26 05:47 | 103.69 MB | [projects] | Agent tasks
   📋 Tasks: Implement MOEX ISS API connector... → Implement MOEX ISS API connector...
   💬 User: <ide_opened_file>... → да, какие проблемы выявлены...
   🔧 Tools: Bash, Bash, Task, Task

3. 3162998f-09ca-4efc-b659-8507eb57bd37
   Jan 26 00:21 | 232.79 MB | [archive] | User session
   💬 User: Create 2-turn conversation test... → Run the tests...
   🔧 Tools: Task, Bash, Grep, Read
   ⚙️ Bash: cargo check; compiling...

To load a session, use:
  1. session-summary.exe load "C:\Users\...\8f59d651-cada-4484-9153-5cc577137486.jsonl"
  ...

Which session would you like to restore? (1-3)

User: "1"
Assistant: [Runs the load command]

[runs: session-summary.exe load "C:\Users\...\8f59d651-cada-4484-9153-5cc577137486.jsonl"]

[Analyzes multi-vector data]

Based on the session data:
- **Main task**: Fixing dropdown z-order issue in Chart Settings modal
- **User requested**: Commit work in your crates, summarize unification work
- **Agent worked on**: UI dropdown rendering, z-order fixes, hover states
- **Files modified**: chart_settings.rs, dropdown.rs, modal.rs

[Searches git log for related commits]
[Provides full context summary]

Implementation Tips

  1. Always start with the most recent sessions from the active project
  2. Check both locations: ~/.claude/projects/ and ~/.claude/archive/
  3. Parse JSONL carefully: Each line is a separate JSON object
  4. Cross-reference: Session files + git log = complete picture
  5. Ask user: If multiple sessions found, let user choose

Limitations

  • Cannot restore actual conversation history (that's internal to Claude)
  • Can only infer context from files and commits
  • Very old sessions might not have related commits anymore
  • Archived sessions may be compressed or incomplete

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

31.59%
按下载量换算33

Claude

31.57%
按下载量换算33

Cursor

19.57%
按下载量换算21

Gemini CLI

9.78%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/zeng3ld/claude-session-restore --skill restore-session 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills