mcpField
S
session-finder

session-finder

github.com/glebisAgent workflows401162 installsUpdated 1d ago
Repository

About session-finder

session-finder searches Claude Code sessions semantically using Gemini embeddings. It helps users locate and reopen past sessions based on a query rather than relying only on session names.

Key features

  1. 01Index Claude Code session records
  2. 02Search sessions by semantic similarity
  3. 03Open the top matching session
  4. 04Show index statistics
  5. 05Extract session summaries and tool usage

Use cases

  1. 01Find a past session by describing its task
  2. 02Locate sessions from a project or work pattern
  3. 03Resume a relevant session in Claude Code

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/glebis/claude-skills --skill session-finder

After installing, type/session-finderin Claude Code to confirm it loaded.

Bundled files.claude-plugin/plugin.jsonscripts/session_finder.py

Details

From the project README

Session Finder

Semantic search across Claude Code sessions using Gemini embeddings.

Commands

Index sessions
python3 ~/.claude/skills/session-finder/scripts/session_finder.py index [--max-age-days 90]
Search
python3 ~/.claude/skills/session-finder/scripts/session_finder.py search "query" [--top 5]
Open best match directly
python3 ~/.claude/skills/session-finder/scripts/session_finder.py open "query"
Stats
python3 ~/.claude/skills/session-finder/scripts/session_finder.py stats

How it works

  1. Document extraction — deterministic, no LLM. Each session JSONL is parsed into a structured document:
    • away_summary events (pre-existing Claude recaps) if available
    • First user message (task description)
    • Follow-up user messages (condensed)
    • First assistant response
    • Tools used
    • Project name
  2. Embedding — documents are embedded with gemini-embedding-exp-03-07 via llm CLI
  3. Storage — SQLite at ~/.claude/session-finder.db
  4. Search — query is embedded, cosine similarity ranks all sessions, top match is the default to open

Workflow

When user asks to find a session:

  1. Run search with their query
  2. Present results with confidence scores
  3. Offer to resume the top match via claude --resume <id>

Comments

Markdown supported