find-claude-sessionlisted
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