session-search · glebis — Claude Code skill: what it does, how to install
session-search is a Claude Code skill that finds past sessions by meaning, keywords, and related concepts. Find earlier debugging work or research.
MIT 192 installs ★ 414 updated 2026-10-23
npx skills add glebis/claude-skills --skill session-search -a claude-codeWhat session-search does
This skill searches Claude Code session transcripts from a natural-language request. scripts/search.py first narrows the session set with keyword matching, then the agent judges relevance from synonyms, related concepts, tool usage, and domain context. It can return useful excerpts from the strongest matches.
The script accepts a query, a result limit, and a lookback period: python3 scripts/search.py "<query>" [max_results] [max_age_days]. Its defaults are 10 results and 90 days. Results are then ranked from 0 to 10 and shown with the project, date, a short summary, and claude --resume <session-id>.
Session data lives in JSONL files under ~/.claude/projects/. That directory is required for Claude Code searches, so a local transcript store is part of the setup.
What it helps with
- find earlier sessions about a topic
- recover when a specific task was discussed
- surface debugging work through related wording
- resume a matching session by its identifier
Example prompts for the agent
- Find earlier sessions about an API authorization error.
- When did I work on search in the Obsidian vault? Use
/session-search. - Show up to 20 relevant sessions from the last 180 days with
/session-search "refactoring" 20 180.
How to install session-search
1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill session-search -a claude-code2Manually: put the files in place
~/.claude/skills/session-search/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/session-search/
1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill session-search -a codex2Manually: put the files in place
.agents/skills/session-search/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill session-search -a cursor2Manually: put the files in place
.cursor/skills/session-search/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install glebis/claude-skills session-search2Manually: put the files in place
.github/skills/session-search/SKILL.md1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill session-search -a gemini-cli2Platform CLI
gemini skills install https://github.com/glebis/claude-skills --path session-searchManually: put the files in place
.devin/skills/session-search/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill session-search -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about session-search
How do I install session-search in Claude Code?
Run npx skills add glebis/claude-skills --skill session-search -a claude-code, then check ~/.claude/skills/session-search/SKILL.md.
What does session-search do?
It searches earlier Claude Code transcripts, narrows candidates by keywords, and ranks them by relevance using synonyms, related concepts, and context.
Where does session-search look for sessions?
It reads JSONL session files from ~/.claude/projects/. A matching session can then be reopened with claude --resume <session-id>.
Source text
SKILL.md · MIT
--- name: session-search description: This skill should be used when searching Claude Code session transcripts with semantic understanding. Triggers on queries like "find sessions about X", "when did I work on Y", "search previous conversations". Supports natural language queries with synonym matching. --- # Session Search Search Claude Code session transcripts by combining keyword pre-filtering with semantic evaluation. Finds previous sessions about specific topics, debugging conversations, research tasks, or any past work. ## Workflow ### Step 1: Run the search script Execute `scripts/search.py` with the user's query: ```bash python3 scripts/search.py "<query>" [max_results] [max_age_days] ``` - `query` (required): Natural language search query - `max_results` (optional, default 10): Maximum results to return - `max_age_days` (optional, default 90): How far back to search The script performs keyword pre-filtering across all sessions, then extracts meaningful excerpts from top candidates. Output contains a `SESSIONS_DATA` JSON block. ### Step 2: Evaluate results semantically After receiving the script output, evaluate each session's relevance to the query. Consider: - **Synonym matching**: "bug" matches "error", "issue", "problem", "fix" - **Related concepts**: "debugging" matches sessions with test failures or error messages - **Tool patterns**: "refactoring" matches Edit-heavy sessions - **Domain context**: "obsidian" matches vault-related work Assign a relevance score (0-10) to each session based on excerpt content and query intent. ### Step 3: Present results Display the top results (up to `max_results`) sorted by relevance, formatted as: ``` ### [Relevance: N/10] Project — Date Summary of what the session was about (1-2 sentences based on excerpts) `claude --resume <session-id>` ``` If no relevant results are found, report that and suggest alternative queries. ## Session Storage Sessions are stored as JSONL files in `~/.claude/projects/`. Each file contains events with user/assistant messages and tool calls. The search script handles file discovery and text extraction automatically. ## Customization To search older sessions or get more results: ``` /session-search "query" 20 180 ``` (20 results, 180 days lookback)
© glebis · MIT · glebis/claude-skills
Similar skills
All skills for Agent setup: memory, context, orchestration →session-search by other authors comes first.