← ClaudeAtlas

recover-chatslisted

Recover Claude Code chats after a crash across config dirs. Use for 'my vs code crashed', 'find all my open claude chats', 'recover my lost chats', or wanting labeled `claude --resume` commands across ~/.claude (and any additional config dirs).
dylanpulver/claude-skills · ★ 0 · AI & Automation · score 73
Install: claude install-skill dylanpulver/claude-skills
# recover-chats If you run many parallel Claude Code sessions — possibly across multiple config dirs (`~/.claude` plus any additional `~/.claude-*` dirs) — a crash loses track of them all. When VS Code or the terminal crashes, the session IDs are gone from the tab strip but the transcripts survive on disk. This skill finds the real chats and hands back ready-to-run resume commands, each labeled with its opening prompt so they're recognizable. ## Run it ```bash python3 ~/.claude/skills/recover-chats/recover.py ``` Defaults: last 2 days (today + yesterday), chats with >=2 human-typed turns, all config dirs. Prints a sorted table and writes labeled resume commands to `~/resume-lost-chats.sh`. Flags: - `--days N` — look-back window (default 2). - `--min-turns N` — lower to `1` to include chats typed in only once (a tab opened right before the crash with a single message); raises noise. Raise to cut to only substantial chats. - `--project <substr>` — only sessions whose cwd/project matches (e.g. `--project acme-app`). - `--out <path>` / `--no-file` — change or skip the output file. Then tell the user: open `~/resume-lost-chats.sh`, skim the `# label` comments, paste the ones they want into **separate terminal tabs**. Don't run the file as a script — the lines are interactive `claude` launches, one per tab. Each line is `cd <real cwd> && CLAUDE_CONFIG_DIR=<dir> claude --resume <id> --dangerously-skip-permissions`. ## Why it works this way (the two traps) 1. **File mtime i