recent-history

Extract recent chat sessions from .claude/sessions/history.xml to restore user context.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/towry/dots --skill recent-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recent-history
Source: https://github.com/towry/dots/tree/main/conf/claude-local-marketplace/skills/recent-history
Command: npx skills add https://github.com/towry/dots --skill recent-history

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When context is lost in a conversation, this skill helps retrieve and present recent chat history to reconnect the dialogue.

Core Features & Use Cases

  • History Retrieval: Generate or extract history.xml content from .claude/sessions.
  • Query & Filter: List recent sessions, extract specific lines, and search for keywords in history.
  • Practical Workflow: Quick steps to get the last session or search for a topic in history.

Quick Start

  • Generate history file: bunx repomix --header-text "file path parent dir: .claude/sessions/" --quiet --no-dot-ignore --no-gitignore --no-file-summary --no-directory-structure .claude/sessions/ -o .claude/sessions/history.xml
  • Then query recent sessions: rg -n '<file path="[^"]+' .claude/sessions/history.xml

Frequently Asked Questions about recent-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve recent chat history to restore conversation context?

Recent chat history retrieves messages from .claude/sessions/history.xml using bunx and rg to extract and filter past sessions. Run bunx repomix to generate the history file, then query it with rg to list recent sessions and restore context when conversations drift.

How do I generate and query the history.xml file from my sessions?

Generate history.xml by running bunx repomix on .claude/sessions with output to history.xml, then search it with rg to find file paths and extract specific lines. This captures all session data in a searchable format for context restoration.

Can I search for specific keywords or topics in my chat history?

Yes, use rg to search history.xml for keywords after generating it with repomix. Combine rg with sed and tail to filter, extract, and prioritize relevant historical messages across multiple interactions.

What tools do I need to access and filter my chat history?

You need bunx, repomix, rg, sed, and tail to generate history.xml from .claude/sessions and perform extraction, filtering, and keyword search for context restoration in long-running chat assistants.

When should I use history retrieval instead of manual context re-entry?

Use history retrieval when conversations drift or context is lost in long-running chat sessions. It automatically identifies and extracts the last session and relevant historical messages faster than manual re-entry, especially across multiple interactions.