Claude Session Restore banner
ZENG3LD ZENG3LD

Claude Session Restore

Data community intermediate

Description

Efficiently restore context from previous Claude Code sessions by analyzing session files and git history.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude Session Restore

Efficiently restore context from previous Claude Code sessions by analyzing session files and git history.

Features

  • Multi-Vector Data Collection: Extracts tasks, user messages, tool operations, bash activities, and web searches
  • Time-Based Filtering: Filter sessions by last modification time (12-24 hours)
  • Efficient Parsing: Tail-based reverse parsing for large session files (2GB+)
  • Claude Code Integration: Works seamlessly with Claude Code skill system

Components

1. Session Summary CLI

A command-line tool for analyzing Claude Code session files.

**Commands:**

  • list - List recent sessions with multi-vector summaries
  • load - Load full context from a selected session

**Example:**

# List sessions from last 12 hours
session-summary list

# Extend to 24 hours
session-summary list --max-age-hours 24

# Load full context
session-summary load "/path/to/session-id.jsonl"

2. Claude Code Skill

A skill for Claude Code that enables automatic session restoration.

**Usage:** Simply say "restore session" or "восстанови сессию" and Claude will:

  1. List recent sessions with multi-vector data
  2. Let you select which session to restore
  3. Analyze the session data and provide context summary
  4. Search git history for related commits

Installation

Prerequisites

  • Rust 1.70+ (for building from source)
  • Claude Code CLI

Build from Source

git clone https://github.com/ZENG3LD/claude-session-restore
cd claude-session-restore
cargo build --release --workspace

The binary will be at `target/release/session-summary` (or `session-summary.exe` on Windows).

Install to PATH

Linux/macOS

cargo install --path session-summary

Windows (Git Bash/MSYS2)

cargo build --release
cp target/release/session-summary.exe ~/.local/bin/

Install Claude Code Skill

# Copy skill to Claude Code skills directory
mkdir -p ~/.claude/skills/restore-session

...