← ClaudeAtlas

find-claude-sessionlisted

Search across all past Claude Code sessions (across every working directory) to recall what was discussed and locate the original cwd. Use this skill whenever the user wants to find a past conversation, recall which directory a session was in, search their Claude history for a topic, or asks things like '我之前在哪個對話/目錄聊過 X', '幫我找之前討論 X 的 session', 'which directory did we talk about X in', 'search my Claude transcripts for Y'. Especially useful when the user opens throwaway conversations via `cd $(mktemp -d)` and later forgets which tmp directory hosted a discussion.
chenwei791129/agent-skills · ★ 0 · AI & Automation · score 56
Install: claude install-skill chenwei791129/agent-skills
# Find Claude Session Search across the user's full Claude Code conversation history (`~/.claude/projects/`) by keyword, and report back which working directory (cwd) each match originated from. Useful when the user knows they discussed something with Claude before but doesn't remember when or where the conversation happened — particularly common when they spin up throwaway sessions in `mktemp -d` directories. ## How conversation storage works Every Claude Code session is persisted as a JSONL transcript at: ``` ~/.claude/projects/<encoded-cwd>/<session-uuid>.jsonl ``` `<encoded-cwd>` is the cwd at session start with `/`, `_`, `.` all replaced by `-`, which makes decoding lossy. Don't try to decode the directory name. Instead, read the `cwd` field directly from message records inside the JSONL — every user/assistant message in a Claude Code transcript carries it. Subagent transcripts live under `<session-dir>/subagents/agent-*.jsonl` and usually duplicate the parent session's cwd. They're excluded by default to keep output clean. ## Usage Run the search script with one or more keywords. All keywords must appear (case-insensitive) in a transcript for it to match. ```bash uv run ~/.claude/skills/find-claude-session/scripts/search_sessions.py <keyword> [more keywords...] [options] ``` The script uses PEP 723 inline metadata (stdlib only, no external deps), so `uv run` handles execution without any project setup. ### Options | Flag | Purpose | |------|---------| | `--d