/clog:clogfrom clog
Searches Claude Code chat history (past sessions, threads, conversations) via the `clog` CLI. Use to find old sessions, recall discussions, look up branch/repo info, count sessions by topic, or pull message text from archived conversations.
Ships in clog. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
clog indexes every Claude Code session on this machine (~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl) and exposes search, listing, metadata, and stats. Default output is JSONL, one object per line, designed to pipe into jq.
Use clog when the user wants information about past Claude conversations, not about code or files.
clog list --limit 10 --prettyclog search "X"clog show <id-prefix>clog statsclog show <id> --messagesIt cannot see the current session. Sessions become searchable once their writes flush to disk.
clog listclog list [--cwd <substr>] [--branch <substr>] [--title <substr>] [--oldest] [-l <n>]
Newest first by default. All filters are substring matches. --title is case-insensitive. Combine freely.
clog searchclog search <regex> [--case-sensitive] [--cwd <substr>] [--branch <substr>] [-l <n>]
Regex over user and assistant message bodies. Case-insensitive by default. Returns up to 3 snippets per matching session. --limit caps total sessions (default 50).
clog showclog show <id-or-prefix> [--messages]
Prefix match on session id. Errors if ambiguous and lists the candidates. --messages dumps full user and assistant text chronologically.
clog statsclog stats
Totals plus session counts grouped by cwd and branch.
All commands emit JSONL on stdout by default. --pretty switches to human-readable tables and colors. Never parse --pretty.
list and show emit one Session per line:
{"session_id":"...","path":"...","cwd":"...","git_branch":"...","ai_title":"...","first_ts":"...","last_ts":"...","message_count":42}
search flattens Session and adds snippets:
{"session_id":"...","cwd":"...","ai_title":"...","snippets":[{"role":"user","timestamp":"...","text":"…match context…"}]}
show --messages emits the session header then one Message per line:
{"role":"user","timestamp":"...","text":"..."}
stats emits a single object:
{"sessions":122,"messages":29701,"by_cwd":{...},"by_branch":{...}}
Always pipe JSONL through jq for clean extraction.
Find every session on a branch, formatted for quick scanning:
clog list --branch noah/discord-commands \
| jq -r '"\(.session_id[:8]) \(.ai_title // "-")"'
Search for a phrase scoped to one repo:
clog search 'authentication bypass' --cwd mono \
| jq -r '"\(.session_id[:8]) \(.ai_title // "-")"'
Pull the full transcript of the most recent session:
id=$(clog list --limit 1 | jq -r .session_id)
clog show "$id" --messages \
| jq -r 'select(.role) | "=== \(.role) @ \(.timestamp) ===\n\(.text)\n"'
Top repos by session count:
clog stats | jq '.by_cwd | to_entries | sort_by(-.value) | .[:10]'
Recover the message text where a regex hit fired:
clog search 'TanStack.*supply.chain' \
| jq -r '.snippets[] | "[\(.role) @ \(.timestamp)] \(.text)"'
Do not grep the JSONL files directly. They contain hook output, tool results, and raw JSON envelopes. clog strips that and gives you clean message text.
Do not use --pretty when piping to anything but a terminal. It emits ANSI codes.
Do not pass a full UUID to show when a prefix works. 8 characters is plenty unique.
Do not assume the current session is searchable. It is not, until its writes have flushed.
clog search '<distinctive phrase>' to narrow candidates.session_id, ai_title, cwd, git_branch from the JSON.clog show <prefix> for metadata, or clog show <prefix> --messages for the full transcript.--cwd or --branch filters and re-run.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
chat-history, session-search, conversation-log, claude-history
npx claudepluginhub noahdunnagan/cafe --plugin clogOther plugins' skills for the same job