From workflow
Search through past Claude Code conversations to find specific sessions by topic, content, date, or working directory. Use when the user asks to find a previous conversation, recall what was discussed, locate a session they worked on, or resume past work. Trigger on "find that conversation", "which session did we", "we talked about X before", "find the session where", "I was working on X yesterday", "resume that conversation", "open that session", or any reference to past Claude Code conversations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/workflow:find-conversationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Search through past Claude Code conversation history stored as JSONL files.
Search through past Claude Code conversation history stored as JSONL files.
~/.claude/projects/{encoded-cwd}/{sessionId}.jsonl/ → -, spaces → - (e.g., -Users-zarz-dev-kb-personal, -Users-zarz-dev-projects-daitw-2026; older sessions encoded under -Users-zarz-dev-life-os before the multi-repo split){UUID}.jsonl — the UUID is the session IDEach line is a JSON object:
{
"sessionId": "UUID",
"type": "user|assistant|system|progress|last-prompt|file-history-snapshot",
"timestamp": "ISO 8601 UTC",
"cwd": "/working/directory",
"version": "2.1.73",
"gitBranch": "master",
"isMeta": false,
"message": {
"role": "user|assistant",
"content": "string or array"
}
}
Run claude --resume non-interactively to get recent sessions with their first messages. This is the fastest way to scan recent work:
# List recent sessions (pipe to grep to search)
echo "" | claude --resume 2>&1 | head -50
If this doesn't work well non-interactively, skip to Step 2.
Search across ALL project directories. Never filter by file mtime — sessions can span days and mtime reflects last write, not content dates.
# Search for keywords in user messages across all sessions
grep -rl "search term" ~/.claude/projects/*/ --include="*.jsonl" | head -20
# For more targeted search (user messages only)
grep -l '"type":"user".*search term' ~/.claude/projects/*/*.jsonl
Use multiple keyword variants — the user may describe the topic differently than how it appeared in the conversation.
For each matching file, extract context:
# Get session ID from filename
basename /path/to/session.jsonl .jsonl
# Get first user message (skip isMeta records)
python3 -c "
import json, sys
with open(sys.argv[1]) as f:
for line in f:
r = json.loads(line)
if r.get('type') == 'user' and not r.get('isMeta'):
content = r['message'].get('content', '')
if isinstance(content, list):
content = ' '.join(c.get('text','') for c in content if c.get('type')=='text')
print(f\"First msg ({r['timestamp']}): {content[:200]}\")
break
" /path/to/session.jsonl
# Get working directory
python3 -c "
import json, sys
with open(sys.argv[1]) as f:
r = json.loads(f.readline())
print(f\"CWD: {r.get('cwd', 'unknown')}\")
" /path/to/session.jsonl
# Get date range (first and last timestamps)
python3 -c "
import json, sys
lines = open(sys.argv[1]).readlines()
first = json.loads(lines[0])
last = json.loads(lines[-1])
print(f\"Range: {first.get('timestamp','?')} → {last.get('timestamp','?')}\")
" /path/to/session.jsonl
Long sessions get compacted — content from early in the session may not appear in grep results because it was summarized/removed. If you suspect this:
grep -rl "keyword" ~/.claude/plans/*.mdtype: "system" records with compaction markersFor each candidate session, show:
Let the user pick. Then offer to open it:
# Resume in current terminal
claude --resume {sessionId}
# Resume in new tmux window
tmux new-window -n "session-name" "cd {cwd} && claude --resume {sessionId}"
~/.claude/plans/*.md persist even when conversation context is compactednpx claudepluginhub kzarzycki/agent-skills --plugin workflowCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.