session-finder
БесплатноЗапускает вложенные скриптыНе проверенThis skill should be used when the user wants to find, search, or resume previous Claude Code sessions based on conversation content, files edited, or tools…
Об этом скилле
Session Finder
Overview
This skill enables searching through Claude Code session history to find previous conversations based on actual content, not just metadata. It provides accurate search results by parsing session JSONL files and ranking matches by relevance score.
When to Use This Skill
Use this skill when the user requests:
- "Find sessions where I worked on [topic]"
- "Search for sessions that edited [filename]"
- "Show me sessions about [feature/bug/task]"
- "Find when I used [tool name]"
- "Resume the session where I worked on [something]"
Quick Start
To search sessions, execute the scripts/search_sessions.py script:
python3 scripts/search_sessions.py "search terms" [optional-project-path]
Examples:
# Search current project for Pino log rotation work
python3 scripts/search_sessions.py "pino log rotation"
# Search specific project for authentication sessions
python3 scripts/search_sessions.py "authentication JWT" /Users/username/Dev/myproject
# Find sessions that edited config files
python3 scripts/search_sessions.py "config.ts"
# Find WebSocket-related work
python3 scripts/search_sessions.py "websocket refactor"
How It Works
Search Process
- Parse search terms - Split the search description into keywords
- Locate session directory - Find the Claude sessions directory for the project
- Scan JSONL files - Parse each session file line-by-line
- Filter content - Search only
message.contentfields (not metadata) - Score matches - Rank results by relevance:
- Tool name matches: +2 points
- Tool input matches: +1 point
- Text content matches: +1 point per keyword
- Tool result matches: +0.5 points
- Display results - Show top 5 sessions with context and resume commands
What Gets Searched
Included (high-value signals):
- Message text content (user and assistant messages)
- Tool names (Read, Write, Edit, Bash, etc.)
- Tool inputs (file paths, command arguments, etc.)
- Tool results (command output, file content, etc.)
Excluded (to avoid false positives):
- Session metadata (
sessionId,gitBranch,cwd) - Timestamps and UUIDs
- Version information
Output Format
Results include:
- Session ID - Unique identifier for the session
- Date - When the session occurred
- Relevance score - High/Medium/Low based on match quality
- Context snippets - Excerpts showing why it matched
- Files mentioned - File paths that were edited or accessed
- Tools used - Which tools appeared in the session
- Resume command - Ready-to-use command to resume the session
Usage Tips
Effective Search Terms
Good searches (specific and meaningful):
- "pino log rotation" - Multiple related keywords
- "authentication JWT" - Feature + technology
- "config.ts websocket" - File + context
- "prisma migration" - Tool + action
Poor searches (too broad or generic):
- "error" - Too common, matches everything
- "file" - Generic term, low signal
- "a" - Single character, meaningless
Multi-Keyword Strategy
Use multiple keywords to improve relevance:
- Single keyword: May match hundreds of sessions
- Multiple keywords: Narrows to relevant sessions
- Related terms: "log rotate daily" better than just "log"
File Path Searches
Search for specific files:
- "server.ts" - Find work on that file
- "config" - Find all config file work
- "prisma schema" - Find schema-related sessions
Tool-Based Searches
Search by tools used:
- "Edit config" - Sessions that edited config files
- "Bash npm" - Sessions running npm commands
- "Read schema" - Sessions reading schema files
Technical Details
Session File Location
Claude stores sessions at:
~/.claude/projects/<project-directory>/<session-id>.jsonl
Where <project-directory> is the project path with slashes replaced by dashes.
Example:
- Project:
/Users/jnarowski/Dev/myproject - Directory:
~/.claude/projects/-Users-jnarowski-Dev-myproject/
JSONL Structure
For detailed information about the JSONL format, content blocks, and search strategy, refer to references/jsonl_format.md.
Key points:
- Each line is a complete JSON object (one message)
- Only
message.contentfields contain conversation content - Root-level fields are metadata (skip during search)
- Content blocks have types:
text,tool_use,tool_result,image
Script Behavior
The search_sessions.py script:
- Automatically determines the session directory from the project path
- Handles both absolute paths and current working directory
- Skips malformed JSON lines gracefully
- Sorts results by relevance score and recency
- Limits output to top 5 results for readability
- Provides resume commands with correct project paths
Troubleshooting
No Sessions Found
Possible causes:
- No sessions exist for this project
- Search terms too specific
- Wrong project path specified
- Sessions stored in different directory
Установить session-finder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл session-finder?
This skill should be used when the user wants to find, search, or resume previous Claude Code sessions based on conversation content, files edited, or tools used. Use this skill when the user asks to find sessions where they worked on specific topics, edited particular files, or used certain tools.
Как установить скилл session-finder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-finder запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic