find-session

Searches DSH session history by title or content and reads messages and token statistics.

3|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/ooooooooooooooooooop/personal-ai --skill find-session-ooooooooooooooooooop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-session
Source: https://github.com/ooooooooooooooooooop/personal-ai/tree/main/skills/find-session
Command: npx skills add https://github.com/ooooooooooooooooooop/personal-ai --skill find-session-ooooooooooooooooooop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zstandard, and includes scripts (resource) components.

What problem does it solve? Locating a past DSH conversation by its title or something said inside it normally requires manually traversing session directories and decompressing multi-frame zstd files one by one. This Skill replaces that with a single script that searches the session index, scans message bodies, and reports content and token usage. ## Core Features & Use Cases - Title Search: Query the session_projcache.json index by title keyword, with filters for project path, date range, and sorting by time, tokens, or turns. - Full-Text Body Search: Grep inside session message content across the most recent 30 sessions, or all sessions with the --full flag. - Content and Stats Reading: Read a session's messages by ID or view duration, turns, tool calls, and complete token usage (uncached input, cache read, output, cache write). - Use Case: You remember discussing "context overflow" in an earlier conversation but not its title. Run a body search to find the matching sessions with message snippets, then open the full content or check its token consumption by session ID. ## Quick Start Ask the agent to find the previous DSH conversation about a topic you remember and show how many tokens that session consumed.

Frequently Asked Questions about find-session

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

FAQPage Schema
How do I search DSH session history by keyword?

Run the find_session.py script with a title keyword to query the session index, or use the --grep flag to search inside message bodies. Body search scans the 30 most recent sessions by default; add --full to scan all sessions.

How to check token usage of a past chat session?

Pass the session ID with the --stats flag to see duration, turns, tool calls, and complete token totals including uncached input, cache read, output, and cache write. The data comes from the tokenUsage.totals field in the session index.

Can I filter session search results by project or date?

Yes, the script supports --project to filter by working directory path, plus --since and --until with YYYY-MM-DD dates to bound the creation time range. These filters work for both title and body searches.

Why does zstd decompression only read part of a session file?

DSH session files are multi-frame zstd streams, so a single-frame decompress call only decodes the first frame. The script uses a streaming reader to decompress all frames before parsing the JSONL events.

What are the limitations of full-text session search?

Body search requires decompressing each session file, so it defaults to the 30 most recent sessions for speed. It is also read-only and cannot modify, delete, or sync sessions across devices.