claude-file-recovery

by hjtenkloosterVerified

Recover files created and modified by Claude Code from JSONL session transcripts

101
Stars
2
Forks
Python
Language
8/24/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/hjtenklooster/claude-file-recovery

Getting Started

Guides for using skills like claude-file-recovery.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

claude-file-recovery

PyPI version Python versions License: MIT

Recover files created and modified by Claude Code from its JSONL session transcripts — even if you lost track of them across sessions.

Claude Code stores a full log of every tool call in ~/.claude/projects/. This tool parses those transcripts, replays Write, Edit, and Read operations in order, and reconstructs the files so you can browse, search, and extract them.

claude-file-recovery TUI demo

Features

  • Interactive TUI with fuzzy search and vim keybindings (j/k/g/G, / to search)
  • Point-in-time recovery — reconstruct files at any historical snapshot, not just the latest
  • Colored diff view showing how files changed over time (unified, full-context, and raw modes)
  • Batch extraction — select multiple files and extract them all at once
  • Fast scanning — parallel session parsing with orjson and fast-reject byte checks that skip ~77% of lines before parsing
  • Symlink deduplication — detects aliased paths and merges them into canonical entries
  • Smart-case search — case-sensitive only when your query contains uppercase (like ripgrep)

Installation

# Recommended
uv tool install claude-file-recovery

# Or with pipx
pipx install claude-file-recovery

# Or with pip
pip install claude-file-recovery

Requires Python 3.10+.

Quick Start

# Launch the interactive TUI (default command)
claude-file-recovery

# List all recoverable files
claude-file-recovery list-files

# Filter by pattern
claude-file-recovery list-files --filter '*.py'

# Export as CSV
claude-file-recovery list-files --filter '*.ts' --csv

# Extract files to disk
claude-file-recovery extract-files --output ./recovered --filter '*.py'

# Recover files as they were before a certain time
claude-file-recovery list-files --before '2025-02-20 14:00'

# Point to a different Claude data directory
claude-file-recovery --claude-dir /path/to/claude-backup

How It Works

  1. Scan — Discovers all JSONL session files under ~/.claude/projects/ and parses them in parallel using a thread pool. A fast-reject byte check skips progress and history-snapshot lines (~77% of all lines) before touching the JSON parser.

  2. Correlate — Links tool-use requests in assistant messages to their results in user messages via tool_use_id. This is how file content (which only appears in results, not requests) gets attached to each operation.

  3. Reconstruct — Replays operations in chronological order per file path. Write ops set content, Edit ops apply string replacements, and Read ops capture snapshots. The --before flag uses binary search to cut off at any point in time.

  4. Present — The TUI lets you browse all recovered files, search with fuzzy matching, view colored diffs between snapshots, and batch-extract to disk.

TUI Keybindings

KeyAction
j / kMove up/down
g / GJump to top/bottom
/Search
Ctrl+RCycle search mode (fuzzy / glob / regex)
x or SpaceToggle file selection
EnterView file detail + diffs
dCycle diff mode (unified / full-context / raw)
Ctrl+EExtract selected files
qBack / quit

Privacy and Data Access

claude-file-recovery runs entirely on your local machine.

What it reads:

  • JSONL session files in ~/.claude/projects/ (or the directory you specify via --claude-dir)
  • File-history snapshots in ~/.claude/file-history/

What it writes (only when you explicitly ask):

  • Extracted files to a directory you specify via --output

What it does NOT do:

  • No network requests — the tool works fully offline
  • No telemetry, analytics, or usage tracking
  • No data collection of any kind
  • No modification of your Claude Code session files (read-only access)

The source code is MIT-licensed and fully open for audit.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

MIT — Rikkert ten Klooster

Frequently Asked Questions

What is claude-file-recovery?

claude-file-recovery is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by hjtenklooster. Recover files created and modified by Claude Code from JSONL session transcripts. It has 101 GitHub stars.

Is claude-file-recovery safe to use?

Yes. claude-file-recovery passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-file-recovery?

Clone the repository with "git clone https://github.com/hjtenklooster/claude-file-recovery" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-file-recovery written in?

claude-file-recovery is primarily written in Python. It is open-source under hjtenklooster on GitHub, so you can review or fork the full source.

Are there alternatives to claude-file-recovery?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-file-recovery against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI Toolsai-skillsantigravity
View details

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI Tools
View details

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI Tools
View details

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI Tools
View details

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI Tools
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details