← ClaudeAtlas

cc-historylisted

Reference documentation for analyzing Claude Code conversation history files
gcharang/claude-config · ★ 0 · AI & Automation · score 70
Install: claude install-skill gcharang/claude-config
# Claude Code History Analysis Reference documentation for querying and analyzing Claude Code's conversation history. Use shell commands and jq to extract information from JSONL conversation files. ## Directory Structure ``` ~/.claude/projects/{encoded-path}/ |-- {session-uuid}.jsonl # Main conversation |-- {session-uuid}/ |-- subagents/ | |-- agent-{hash}.jsonl # Subagent conversations |-- tool-results/ # Large tool outputs ``` ## Project Path Resolution Convert working directory to project directory: ```bash PROJECT_DIR="~/.claude/projects/$(echo "$PWD" | sed 's|^/|-|; s|/\.|--|g; s|/|-|g')" ``` Encoding rules: - Leading `/` becomes `-` - Regular `/` becomes `-` - `/.` (hidden directory) becomes `--` Examples: - `/Users/bill/.claude` -> `-Users-bill--claude` - `/Users/bill/git/myproject` -> `-Users-bill-git-myproject` ## Message Types | Type | Description | | ----------------- | --------------------------------------------- | | `user` | User input messages | | `assistant` | Model responses (thinking, tool_use, text) | | `system` | System messages | | `queue-operation` | Background task notifications (subagent done) | ## Message Structure Each line in a JSONL file is a message object: ```json { "type": "assistant", "uuid": "abc123", "parentUuid": "xyz789", "timestamp": "2025-