/conversation-search:conversation-searchfrom conversation-search
Find, review, and resume past AI coding conversations (Claude Code, OpenCode, Codex CLI) from their raw transcripts — returns the real session content, resumable session IDs, project paths, and the exact `claude --resume` command. Use whenever the user references a past session or prior conversation: to identify WHICH session something happened in, resume it, locate where a topic/PR/issue was discussed, or understand WHAT was discussed or decided earlier. The word "session"/"セッション" or any reference to a past conversation is the trigger — even when the user only wants the content, read the raw transcripts. A raw session UUID in the prompt ALWAYS triggers this skill — even when the transcript path looks obvious, and even when the session is only input to another task (verifying its conclusion, continuing its work); never find/grep ~/.claude/projects manually. Triggers: "find that conversation about X", "which session was that", "what did we discuss/decide", "resume that conversation", a session UUID, a GitHub PR/issue URL about past work. Japanese: "どのセッション", "過去のセッション(を確認/把握)して", "このセッションで調査してた <uuid>", "(そのセッションの)結論は合ってる/的を得てる?", "どこで話した/やった/確認した", "確認してた", "どんな内容/話だった(っけ)", "中身を把握", "~だっけ?", "あの会話", "あのPR/issue", "resume/続きやりたい".
Trending skills
7-day visitors to each skill page
Ships in conversation-search. 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.
Read when SKILL.md points to them.
Find past conversations across Claude Code, OpenCode, and Codex CLI and get the commands to resume them.
Before doing ANYTHING else, you MUST use the TodoWrite tool to create this exact checklist: (If TodoWrite is not in this session's tool list — e.g. a subagent/background context — skip the checklist and go straight to Level 0/1; do not block on it.)
- Ensure ai-conversation-search tool is installed and upgraded
- Check for a session ID in the prompt (Level 0: read it directly, skip the rest)
- Classify query type (temporal/topic/hybrid)
- Execute Level 1: focused search with ai-conversation-search
- Execute Level 2: broader search if Level 1 fails
- Execute Level 3: manual exploration if Level 1 and 2 fail
- Present results to user
CRITICAL CONSTRAINTS:
python3/json.loads/jq (piping this tool's own --json is fine; see below)ai-conversation-search (give the invocation) and MUST NOT tell it to grep/find/read ~/.claude/projects or .jsonl files directly--json output through jq is fine and expected — but reach for
the built-in flags first (--role, --no-tools, --flat, --content-chars), which
cover the common filters and return far less textMark each todo as in_progress when starting it, completed when done.
This skill reads the raw .jsonl transcripts of past sessions and returns
resumable session IDs, project paths, and the exact claude --resume
command — the real conversation, not a reconstruction.
Decision rule: If the user mentions a session or a past/prior conversation in ANY form — including just wanting to understand its content — use this skill. Reading the actual transcript is the right move even when the user only wants to know "what was discussed", because the transcript is the source of truth.
| User intent | Use this skill |
|---|---|
| "Which session was that?" / "どのセッション?" | ✅ |
| "Resume that conversation" / "続きやりたい" | ✅ |
| "Check past sessions and tell me what it was about" / "過去のセッションを確認して把握して" | ✅ |
| "What was discussed / decided in that session?" / "どんな内容/話だったっけ?" | ✅ |
| User pastes a GitHub PR/issue URL and asks where it was discussed | ✅ |
| Find a session by raw text (PR number, error message, exact phrase) | ✅ |
| User gives a session UUID and asks to verify/continue that work / "このセッションで調査してた 、結論合ってる?" | ✅ |
A session UUID in the prompt is decisive even when it makes searching look
unnecessary: do not find/grep ~/.claude/projects manually — read it with
ai-conversation-search tree <SESSION_ID> (then context <MESSAGE_UUID> to
expand around a specific message).
The presence of the word "session" / "セッション" or a reference to a past conversation is decisive — use this skill regardless of whether the user explicitly says "resume".
In Claude Code, the ai-conversation-search CLI is automatically managed by the plugin wrapper.
On first use, it downloads the correct binary for your platform and caches it.
First todo: Verify tool is available
ai-conversation-search --version
If the command is not found, the plugin may not be properly installed. Guide the user: reinstall the plugin or visit https://github.com/yoshi47/ai-conversation-search Outside Claude Code (Codex CLI, OpenCode) nothing puts the CLI on PATH — the user installs it per README "Manual Installation".
The reported version must be 0.16.0 or newer. Two things break below it. Before 0.15.0,
--json returns a bare array instead of the {"results": [...]} envelope this skill
assumes, so .results[] yields nothing and every search looks like "no matches" — a wrong
answer, not an error. Before 0.16.0, the tree flags used throughout this skill
(--role, --no-tools, --flat, --content) are rejected, and tree will not
auto-index a session that just ended. Stop and tell the user to upgrade rather than
reporting an empty result.
Do not rely on a command being rejected to notice a stale binary: the envelope change
rejects nothing. Check command -v ai-conversation-search — a manually installed binary
(e.g. in ~/.local/bin or ~/.cargo/bin) can shadow the plugin wrapper and will not
auto-upgrade; refresh that binary or adjust PATH before trusting search results.
Do not proceed with search until the version check succeeds.
Second todo: Classify the user's query
Determine which type before executing search:
User asks about time periods WITHOUT specific topics:
Action: Use list command with date filters
User asks about CONTENT/TOPICS:
Action: Use search "topic" command
User asks about TOPIC + TIME:
Action: Use search "topic" with date filters
Check Level 0 first. If it does not apply, execute Levels 1-3 in order without skipping.
If the prompt contains a session UUID — or any prefix of one of 8+ characters — you already know which conversation to read. Searching for it is pointless; go straight to the transcript:
ai-conversation-search tree <SESSION_ID> --json --role user --no-tools --flat --content --content-chars 500
That returns just the human's messages, in order, with bodies. Drop --role user to see
the assistant's replies too, and raise --content-chars when you need full text.
A session that just ended is fine. tree indexes the transcript on the spot when the
id is not in the index yet, so there is no need to run index first — and no reason to
conclude the session does not exist from a single not found.
Go to Level 4 with what you find.
Based on query classification:
For Topic or Hybrid queries:
ai-conversation-search search "search terms" --group-by-session --limit 50 --json
No date filter on the first attempt: a --days 14 window silently drops older
sessions (e.g. from months ago). Add --days/--date only when the user named
an explicit date or range ("yesterday", "last week", "6/29"). Words like
"昔/以前/あの" are the opposite signal — they mean widen the scope, not narrow it.
For Temporal queries:
ai-conversation-search list --date yesterday --json # or --days N, --since, --until
Parse the JSON output. If you find relevant matches → skip to Level 4 (present results).
Note: If results seem stale or incomplete, run ai-conversation-search index to update the index.
Only if Level 1 found nothing useful.
For topic/hybrid queries:
.truncated is true, re-run with a higher --limit
before concluding anything is absentFor temporal queries:
--days 30 instead of --days 7If matches found → skip to Level 4.
Only if Levels 1 and 2 both failed.
ai-conversation-search list --days 30 --jsonai-conversation-search tree <SESSION_ID> --json --no-tools --flatBefore asserting a match:
context_snippet/content actually matches the query's concrete anchors (proper nouns, dates, PR/issue numbers, the described context). If the tie is weak, present it as "最有力候補" with a caveat, not as a confirmed hit.--days/--repo/--date, or "全期間 (no filter)"). A narrow scope silently reported as exhaustive is how wrong sessions get presented as answers.Format results for the user:
For found conversations (results include a source field: claude_code, opencode, or codex):
**Session Details**
- **Source**: Claude Code / OpenCode / Codex CLI
- **Session**: abc-123-session-id
- **Project**: /home/user/projects/myproject
- **Time**: 2025-11-13 22:50
- **Message**: def-456-message-uuid (if applicable)
**To Resume This Conversation**
```bash
cd /home/user/projects/myproject
claude --resume abc-123-session-id
Note: OpenCode sessions have `oc:` prefix, Codex sessions have `codex:` prefix in session IDs. For these sources, resume commands are tool-specific (not `claude --resume`).
**Confirmation before launch (mandatory):** never auto-start a session.
Present `preview` and `resume-spec`, then wait for the user:
```bash
ai-conversation-search preview <SESSION_ID> --messages 12 --query "<phrase>" --no-color
ai-conversation-search resume-spec <SESSION_ID> --json
Only after explicit confirmation, resume with the resume_command (or
eval line). In a non-TTY agent shell, stop at presenting resume-spec —
do not reach for eval on your own.
For counting/analysis queries:
If not found after Levels 1-3:
ai-conversation-search index --days 90 to reindex older history--json output (two parse traps)... --json 2>/dev/null | jq, never 2>&1. The CLI writes diagnostics (Note: showing first N results..., FTS/reindex notices) to stderr on purpose; folding them into stdout makes jq/json.loads fail with "Extra data".text/snippet/.messages[]. search rows are message-level: context_snippet (matched text; full_content with --content), message_type, timestamp, session_id, resume_command, source, project_path. list rows are conversation-level and have NO context_snippet/timestamp — instead conversation_summary, first_message_at/last_message_at, message_count, plus session_id/resume_command/source/project_path. Size output with --limit/--content-chars, never by truncating the stream (head -c before json.load corrupts it).# With time scope
ai-conversation-search search "query" --days N --json
# Specific date
ai-conversation-search search "query" --date yesterday --json
ai-conversation-search search "query" --date 2025-11-13 --json
# Date range
ai-conversation-search search "query" --since 2025-11-10 --until 2025-11-13 --json
# All time
ai-conversation-search search "query" --json
# Exact phrase match (prevents FTS5 operator injection)
ai-conversation-search search "query" --exact --json
# Group results by session (best match per session)
ai-conversation-search search "query" --group-by-session --json
# Hide hits on rewound-away branches (search keeps them by default with
# is_abandoned:true; tree marks them [rewound], preview shows current path only)
ai-conversation-search search "query" --active-only --json
# Show search diagnostics (session/message counts)
ai-conversation-search search "query" -v --json
# Filter by repository (partial match on repo root path)
ai-conversation-search search "query" --repo myproject --json
# Filter by source (claude_code, opencode, codex)
ai-conversation-search search "query" --source opencode --json
# Raise the result cap (default 20 — see below)
ai-conversation-search search "query" --limit 50 --json
Date filter options:
--days N: Last N days from now--date DATE: Specific calendar day--since DATE: From date onwards--until DATE: Up to date (inclusive)yyyy-mm-dd, yesterday, today--days with --date/--since/--untilOther filter options:
--repo REPO: Filter by git repository root (partial match). Matches conversations from the same repo including worktrees and subdirectories.--project PATH: Filter by working directory (exact match, search and list).--here: Keep only sessions started at or under the current directory (prefix match, search and list).--exclude-project STR / --exclude-repo STR: Drop rows whose working directory / repository root partially matches (repeatable, OR). Typical noise filter: --exclude-project observer --exclude-project /tmp. Both are ASCII case-insensitive, no path normalization.--limit N: Max results (default: 20). Results are capped at this value. When the cap drops matches, a Note: showing first N results (more matches exist) line is printed to stderr — do not read a capped list as "nothing else exists". Raise it before concluding a topic is absent.--content: Show fuller message content instead of the 200-character snippet. Works for
human output, --group-by-session, and --json (which gains full_content and
full_content_truncated per row). Capped at --content-chars (default 300) in both
modes — raise it deliberately, since 50 uncapped bodies run to ~175KB of context.Every search/list --json row carries project_exists (bool, null when
project_path is null) and project_basename (last path segment, for telling
worktrees apart). Skip rows with project_exists == false before presenting
candidates: jq '.results | map(select(.project_exists != false))'.
ai-conversation-search list --date yesterday --json
ai-conversation-search list --days 7 --json
ai-conversation-search list --since 2025-11-10 --until today --json
# Filter by repository
ai-conversation-search list --days 7 --repo myproject --json
# Filter to the current directory and below
ai-conversation-search list --days 7 --here --json
# Filter by source
ai-conversation-search list --source codex --json
Like search, list is capped by --limit — the default cap can return only sessions newer than a target date and drop the older one you want. See the .truncated note below.
# Check index health, coverage, and unindexed files
ai-conversation-search status --json
ai-conversation-search context <MESSAGE_UUID> --json
ai-conversation-search tree <SESSION_ID> --json
# SESSION_ID accepts a full UUID or any unique prefix
ai-conversation-search tree 1c538017 --json
tree reports an error instead of guessing when a prefix matches more than one
session; pass more characters to disambiguate. When the id resolves to nothing, tree
indexes that session's transcript and retries once, so a conversation that ended moments
ago is readable without running index.
The short prefix works for tree/context only. claude --resume does NOT resolve prefixes — always put the full session_id (UUID) from the tree/search result into the resume command.
tree options — use these instead of post-processing the tree yourself:
| Flag | Effect |
|---|---|
--role user / --role assistant | Keep only that side of the conversation |
--no-tools | Drop [Tool: X] / [Tool result] / interrupt nodes, and empty bodies. Also drops the command text on [Tool: X] nodes and any message text that shares a node with a [Tool result] marker — skip this flag, or narrow with --role, when that text matters. (Tool output itself — bash stdout, fetched pages — is never indexed, so --no-tools is not why it's missing.) |
--flat | Return a flat list instead of nested children, in timestamp order |
--content | Include message bodies (omitted by default) |
--content-chars N | Cap each body at N characters (default 300) |
Read what the human actually said in one command:
ai-conversation-search tree <SESSION_ID> --json --role user --no-tools --flat --content --content-chars 500
Filtering keeps total_messages at the session total and adds returned_messages for the
count you got back. If a filter matches nothing, .warning says so — that is not the same
as an empty conversation.
Bodies are opt-in on purpose: a long session serialises to hundreds of KB, which is worth
avoiding unless you need the text. Nodes carry full_content_truncated so you can tell a
capped body from a complete one.
Agent completion notices appear as user messages prefixed [Task notification] . They are
often worth reading — that is where a subagent's findings live — but the prefix lets you
skip them when you only want what the human typed.
Always use --json for structured output.
search, search --group-by-session and list return {"results": [...], "truncated": bool} —
read rows from .results, and check .truncated. When it is true, --limit cut the answer
off and "no match" is not a conclusion you can draw yet; re-run with a higher --limit.
tree, context and status return their own objects, not this envelope.
Typing in the picker runs a live full-text search against message bodies via SQLite FTS5 (trigram tokenizer, Japanese/CJK friendly). Matching happens server-side on every keystroke, so the picker is not limited to titles/summaries.
# Browse recent sessions and filter by typing (searches titles + body)
ai-conversation-search pick
# Pre-fill the query at startup
ai-conversation-search pick "authentication bug"
# Scope to current directory (90-day window, up to 100 sessions)
ai-conversation-search pick --here
# Filter by project or time range
ai-conversation-search pick --days 30 --repo myproject
# Pick a session and execute the resume command
eval "$(ai-conversation-search pick)"
Example 1: Topic query
User: "Find that conversation where we fixed the authentication bug"
Todo workflow:
ai-conversation-search search "authentication bug" --group-by-session --limit 50 --jsonai-conversation-search search "auth bug" --group-by-session --limit 50 --jsonExample 2: Temporal query
User: "What did we work on yesterday?"
Todo workflow:
ai-conversation-search list --date yesterday --jsonExample 3: Hybrid query
User: "Show me yesterday's authentication work"
Todo workflow:
ai-conversation-search search "authentication" --date yesterday --jsonExample 4: Counting/analysis query
User: "How many times did you say 'absolutely right' in the past week?"
Todo workflow:
ai-conversation-search search "absolutely right" --days 7 --jsonmessage_type == "assistant", count resultsExample 5: GitHub PR/Issue URL
User: "このPRのレビューしてたのってどのセッション? https://github.com/org/repo/pull/23064"
PR/Issue numbers appear verbatim in transcripts → high-precision FTS hit.
Todo workflow:
23064)ai-conversation-search search "23064" --jsonclaude --resume commandsStay with ai-conversation-search for this — manual grep over .jsonl files
returns non-resumable results and misses the structured session metadata.
Tool not installed:
Database not found:
ai-conversation-search init~/.conversation-search/index.dbEmpty results:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub yoshi47/ai-conversation-search --plugin conversation-search