claude-sessions
Skill0 starsChanged 43 days agoMITView on GitHub
Finds and recovers content from Claude Code session history files. This skill should be used when searching for deleted files, tracking changes across sessions, analyzing conversation history, or recovering code from previous Claude interactions. Triggers include mentions of "session history", "recover deleted", "find in history", "previous conversation", or ".claude/projects".
3 other projects use a version of this.
Adopted by
Most recently taken up by
- wyattjoh/skillstheir own version, first seen Sep 27, 2026
- dzianisv/skillstheir own version, first seen Aug 18, 2026
- inancgumus/skillstheir own version, first seen Mar 17, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- dzianisv/skills★ 4same name
- wyattjoh/skills★ 3same name
- inancgumus/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- afkSkill
- apple-contactsSkill
- apple-devSkill
- apple-notesSkill
- apple-photosSkill
- bug-huntSkill
- catch-upSkill
- cherriSkill
- chrome-controlSkill
- coordinatorSkill
- discountsSkill
- forge-skillSkill
- groupmeSkill
- herdr-crewSkill
- iconsSkill
- imsgSkill
- language-selectionSkill
- laterSkill
- mac-controlSkill
- nix-mechanicsSkill
- notion-cliSkill
- posthogSkill
- quotaSkill
- redditSkill
- rustSkill
- scoutSkill
- semverSkill
- social-contentSkill
- spotifySkill
- travelSkill
- validate-ideaSkill
- verdictSkill
- web-reconSkill
- whatsappSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Search across every session of a project (add -i, drop -c for hits):
- Distinctive: line 56
Every file a project's sessions ever wrote:
- Very specific: line 72
Only Write calls carry full content.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Sessions
Claude Code writes every session as JSONL at
~/.claude/projects/<encoded-project-path>/<session-id>.jsonl. Everything
below is jq/rg over those files - no tooling to install.
Finding the project directory
The directory name is the project's ABSOLUTE working-directory path with
every / AND . replaced by - - never the basename. So
/Users/<name>/.config/agent-config becomes
-Users-<name>--config-agent-config, and a bare agent-config matches
nothing.
D=~/.claude/projects/$(echo /abs/path/to/project | tr '/.' '-')A failed ls is not proof there is no history - reverse-look-up instead:
ls ~/.claude/projects/ | grep -i <project-name>Sessions run from Claude Desktop's cowork / built-in Claude Code mode also land here (Desktop runs a bundled CLI); only Desktop's native chat lives elsewhere (a LevelDB store, not JSONL). "It ran inside Desktop" does not mean it is missing.
Operations
List sessions, newest first:
ls -lt "$D"/*.jsonl | headSearch across every session of a project (add -i, drop -c for hits):
rg -c 'search term' "$D"/*.jsonl | sort -t: -k2 -rn | headTool-usage breakdown for one session:
jq -r '.message.content[]?|select(.type=="tool_use")|.name' "$D"/<session>.jsonl \
| sort | uniq -c | sort -rnEvery file a project's sessions ever wrote:
jq -r 'select(.message.content|type=="array")|.message.content[]
|select(.type=="tool_use" and .name=="Write")|.input.file_path' \
"$D"/*.jsonl | sort -uRecover one of them (last write wins, so tail/redirect the final copy):
jq -r --arg f /abs/path/to/lost.py 'select(.message.content|type=="array")
|.message.content[]|select(.type=="tool_use" and .name=="Write"
and .input.file_path==$f)|.input.content' "$D"/*.jsonlOnly Write calls carry full content. Edit calls carry
old_string/new_string deltas (same filter, name=="Edit"); a file only
ever edited cannot be reconstructed whole.
Schema details and older-session field locations: references/session_file_format.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

