claude-file-recovery

作者 hjtenklooster已验证

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

101
Stars
2
Forks
Python
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

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

快速入门

使用 claude-file-recovery 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "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

常见问题

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.

评论 (0)

暂无评论,成为第一个分享想法的人!

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 工具ai-skillsantigravity
查看详情

happy

by slopus

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

23,4501,980TypeScript
CLI 工具
查看详情

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 工具
查看详情

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

12,5471,869JavaScript
CLI 工具
查看详情

ccstatusline

by sirmalloc

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

12,508545TypeScript
CLI 工具
查看详情

开发者还喜欢

基于喜欢此 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 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

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 服务器apisai-tools
查看详情

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 智能体ai-agentsanthropicclaude-code
查看详情

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 智能体claude-codeai-tools
查看详情