← All Reviews

Recovering Lost Code from Claude Code Sessions: Does This Skill Actually Work?

claude-code-history-files-finder on GitHub
📦 claude-code-history-files-finder
812
Stars
🍴
0
Forks
🐛
0
Issues
🕐
6
Min Read
📝
1,322
Words
Stable
View on GitHub →

Recovering Lost Code from Claude Code Sessions: Does This Skill Actually Work?

812 stars on SkillsMP with zero movement in the last seven days. That's not a skill going viral — that's a skill that found its audience and stayed there. Stable stars on a utility tool usually means people installed it, used it when they needed it, and didn't uninstall it. That's a decent signal.

I've been burned enough times by Claude Code sessions where I let the AI write something useful, didn't save it properly, and then spent twenty minutes trying to reconstruct it from memory. When I saw this skill, I wanted to know if it actually solves that problem or just adds ceremony around something you could do with grep and a bit of patience.

What This Skill Actually Does

Claude Code stores conversation history as JSONL files under ~/.claude/projects/<normalized-project-path>/<session-id>.jsonl. Every tool call, every file write, every edit — it's all in there. This skill gives Claude structured instructions and a set of Python scripts to navigate that data.

The core use cases are: - You deleted a file that Claude wrote in a previous session and you want it back - You remember working on something two weeks ago but can't find the code - You want to audit what Claude actually did across a series of sessions - You're trying to pick up interrupted work and need context fast

The skill doesn't do anything magical. It teaches Claude how to point analyze_sessions.py and recover_content.py at your session files and interpret the output. The heavy lifting is Python scripts reading JSONL line by line.

Why This Matters

Here's the gap this fills: Claude Code's session history is genuinely useful forensic data, but it's completely opaque unless you know the file format and are willing to write tooling against it. Most developers don't. They just accept that if they didn't save something properly, it's gone.

It's not gone. It's sitting in a JSONL file in your home directory. The problem is that without a structured approach, recovering it means manually parsing JSON blobs, figuring out which tool calls correspond to file writes, and deduplicating across multiple writes to the same path. That's annoying enough that most people don't bother.

This skill removes that friction. It gives Claude a clear mental model of the file structure and a set of scripts that handle the parsing. The result is that you can say "find that React component we built last Tuesday" and get something actionable back instead of a shrug.

The Capabilities Worth Knowing About

Session search with keyword ranking. The analyze_sessions.py search command returns sessions ranked by keyword frequency with per-keyword breakdowns. This is more useful than it sounds — when you're hunting for a specific piece of work, knowing that session X mentioned "ModelLoading" fourteen times versus session Y mentioning it twice tells you where to look first.

Automatic deduplication on recovery. If Claude wrote the same file five times in a session (which happens during iterative development), recover_content.py keeps only the final version. This is the right default behavior and it's good that it's automatic rather than something you have to configure.

Streaming for large sessions. The docs explicitly mention that sessions over 100MB are handled line-by-line with constant memory usage. I've had sessions get surprisingly large on long refactoring runs. The fact that this was considered and handled is a good sign about the quality of the underlying scripts.

The --show-files flag on stats. Running stats on a session and seeing a full breakdown of file operations — how many writes, how many edits, how many reads — is actually useful for understanding what Claude did in a session you don't fully remember. It's a quick audit trail.

The recovery report. After running recover_content.py, you get a recovery_report.txt that shows full output paths. Small thing, but it means you're not hunting through a directory tree trying to figure out what got recovered where.

Who Should Install This

Install it if: - You use Claude Code regularly for non-trivial development work (more than a few sessions a week) - You've ever lost code because a session ended badly or you forgot to save something - You work on multiple projects and sometimes need to find "that thing Claude helped me build" without remembering which session it was - You want to audit Claude's file operations across a project for any reason — security review, onboarding documentation, whatever

Skip it if: - You're disciplined about committing everything to git immediately (if you're already running git add -p after every Claude session, most of this is redundant) - You only use Claude Code for throwaway scripts and prototypes you don't care about recovering - You're on a team with strict policies about tooling that reads session history — the security section of the SKILL.md is worth reading before you install this in a work context

How to Install

Drop the skill into your Claude skills directory:

# Global install
cp -r claude-code-history-files-finder ~/.claude/skills/

# Or project-local
cp -r claude-code-history-files-finder .claude/skills/

The skill references external scripts, so make sure you're pulling from the GitHub repo rather than just copying the SKILL.md in isolation. The Python scripts in scripts/ are what actually do the work.

Honest Concerns

The limitations section is important and easy to miss. Files that were only discussed — never written to disk via the Write tool — aren't recoverable. Files that were modified exclusively through Edit operations (which write deltas, not full content) may not be fully recoverable either. If you're hoping to recover a file that Claude outlined in prose but never actually wrote, this skill won't help you. Read the limitations table before you get your hopes up.

Path normalization is a real gotcha. The troubleshooting section mentions that project paths get normalized when stored under ~/.claude/projects/. If you can't find your sessions, you might need to do some manual ls archaeology to figure out how your project path got normalized. It's not hard, but it's a friction point that could trip up first-time users.

This skill reads session files that may contain sensitive data. The security section covers this, but it deserves emphasis: your session JSONL files potentially contain API keys, credentials, absolute paths with your username, and proprietary code. The skill itself doesn't exfiltrate anything, but if you're running this in an environment where recovered content might end up somewhere public, the sanitization steps in the security section aren't optional.

The --show-edits flag mentioned in troubleshooting doesn't appear in the main documentation. Minor inconsistency, but it made me wonder if the scripts have features that aren't fully documented. Worth checking the actual script source before assuming the SKILL.md covers everything.

No cross-project search. If you want to find something but you're not sure which project it was in, you're doing manual iteration across project directories. A global search capability would make this significantly more useful.

Verdict

Install it. It's a narrow utility skill that solves a real problem cleanly. The 812 stars reflect that it found genuine users with genuine use cases, not a viral moment. The documentation is honest about limitations, the scripts handle edge cases (large files, deduplication, path preservation), and the security guidance is practical rather than performative.

This isn't a skill you'll use every day. It's a skill you'll be grateful you installed the one time you need it. The overhead of having it in your setup is essentially zero.

The only thing I'd want before calling it essential is cross-project search. As it stands, it's very good at "find this thing I know was in this project" and less useful for "find this thing, I have no idea which project." That's a real limitation for people who work across many repos.

But for what it does, it does it well. Worth the install.


SkillsMP: https://skillsmp.com/skills/daymade-claude-code-skills-claude-code-history-files-finder-skill-md

GitHub: https://github.com/daymade/claude-code-skills/tree/main/claude-code-history-files-finder

// THE VERDICT
View claude-code-history-files-finder on GitHub →
Need help building with tools like this?
We build AI-powered applications and developer tools. 30+ years of engineering experience.
Get in Touch
claude-skillsclaude-codedeveloper-toolssession-recoveryproductivity
← Previous awesome-opensource-ai: A Curated AI Tooling List That's Actually Worth Bookmarking Next → awesome-opensource-ai: A Curated AI Tools List That's Actually Earning Its Stars
← Back to All Reviews