You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract Claude Code session history into readable, queryable markdown files.
What it does
Reads ~/.claude/projects/<project>/*.jsonl session files and produces structured markdown in convos/ with:
Your prompts (full text)
Assistant responses (text only, tool calls compressed to one-liners)
Insight blocks collected into a summary section
Metadata table (date, branch, duration, commits)
Index file with topic clustering
Thinking blocks, system reminders, and progress noise are stripped.
Usage
/convos # current project
/convos /path/to/project # specific project
/convos --since=2026-01-01 # date filter
/convos --session=<uuid> # single session
/convos --reindex # regenerate existing files
Setup
Drop convos.md into .claude/commands/ (per-repo) or ~/.claude/commands/ (global). Add convos/ to .gitignore - these are local extracts, not version-controlled.
Extract past Claude Code conversations into readable markdown files in convos/. Highlights user prompts and assistant insights. Use for interview prep, project history, and knowledge mining.
Extract Claude Code session history into queryable markdown files. Optimized for surfacing high-signal content (your prompts, insights, decisions, architecture reasoning) while compressing low-signal content (tool I/O, file reads, bash output).
Overview
Conversations live at ~/.claude/projects/<mangled-path>/*.jsonl. Each JSONL line has:
type: user | assistant | progress | system | file-history-snapshot | queue-operation
timestamp: ISO 8601
message.content: string (user) or array of blocks (assistant)
gitBranch, sessionId, version
Step 0: Resolve Target Project
Determine which project to extract from:
If $ARGUMENTS contains a project path, mangle it: replace / with -, prepend -
e.g. /Users/tom/sandbox/git-repos/foo -> -Users-tom-sandbox-git-repos-foo
If no path given, use the current repo's mangled path
Verify ~/.claude/projects/<mangled>/ exists and has .jsonl files
PROJECT_DIR="$HOME/.claude/projects/<mangled>"
ls "$PROJECT_DIR"/*.jsonl 2>/dev/null | wc -l
Set OUTPUT_DIR to convos/ in the current working directory (the repo you're in).
Step 1: Enumerate Sessions
# List all sessions with line counts and date rangeforfin"$PROJECT_DIR"/*.jsonl;do
ID=$(basename "$f" .jsonl)
LINES=$(wc -l <"$f")
FIRST_TS=$(jq -r 'select(.timestamp) | .timestamp'"$f"| head -1)echo"$FIRST_TS$LINES$ID"done| sort
Filter by --since= if provided. If --session= provided, process only that one.
Skip sessions with <10 lines (hook-only noise).
If --reindex not set, skip sessions that already have a markdown file in convos/.
Step 2: Extract Each Session
For each session JSONL, extract into a structured markdown file. This is the core logic - it runs per session and requires judgment, not just jq piping.
2a: Metadata Header
# Extract from JSONL
jq -r 'select(.timestamp) | .timestamp'"$SESSION"| head -1 # start
jq -r 'select(.timestamp) | .timestamp'"$SESSION"| tail -1 # end
jq -r 'select(.gitBranch) | .gitBranch'"$SESSION"| head -1 # branch
jq -r '.version // empty'"$SESSION"| head -1 # CC version