Claude History Manager — Development skill for Claude Code
CLI tool to browse, search, and optimize Claude Code session logs, history, and claude-mem databases.
How to install Claude History Manager
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open okamyuji/claude-history-manager and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude History Manager does
CLI tool to browse, search, and optimize Claude Code session logs, history, and claude-mem databases.
Alternatives in Development
- Coding Agent Session Search — Unified TUI and CLI to index and search your local coding agent session history across 11+ providers (Codex, C 708 ★
- Mem Save — Save a curated session-level summary to history 186 ★
- Compile Knowledge — Compile literature, meeting notes, session logs, and code findings into 130 ★
README
claude-history-manager
Claude Codeが `~/.claude/` 以下に保存するセッションログ、入力履歴、プランファイルなどを一覧・検索・削除できるターミナルツールです。
概要
Claude Codeは会話のたびにJSONL形式のセッションログを `~/.claude/projects/` 以下に蓄積していきます。 長期間使い続けるとファイル数が数百を超え、合計サイズも数百MBに達することがあります。
このツールを使うと、すべてのセッションを日時・プロジェクト名・最初のメッセージとともに一覧表示し、不要なものを個別または一括で削除できます。 入力履歴(`history.jsonl`)やプランファイル(`plans/`)の管理にも対応しています。
管理対象
以下の `~/.claude/` 配下にあるデータを管理できます。
| 種類 | パス | 説明 |
|---|---|---|
| セッションログ | projects/*/*.jsonl |
各会話のJSONL形式ログファイルです |
| 入力履歴 | history.jsonl |
CLIで入力したコマンドの履歴です |
| プランファイル | plans/*.md |
Claude Codeが作成したプランのMarkdownファイルです |
| デバッグログ | debug/ |
デバッグ用のログファイルです |
| シェルスナップショット | shell-snapshots/ |
シェル状態のスナップショットです |
| ファイル履歴 | file-history/ |
ファイル編集のバックアップです |
アーキテクチャ
このツールは5つのモジュールで構成されています。
graph TD
A[cli.py
対話メニューとエントリポイント]
B[storage.py
ファイルI/Oと検索・削除]
C[parser.py
JSONLセッション解析]
D[ui.py
Rich表示とフォーマット]
E[config.py
パス定数とタイムゾーン]
A -->|データ取得・削除| B
A -->|表示| D
B -->|セッション解析| C
B -->|パス参照| E
C -->|パス参照| E
D -->|タイムゾーン参照| E
各モジュールの役割は以下のとおりです。
cli.py
アプリケーションのエントリポイントです。 対話式のメインメニューを提供し、セッション管理・入力履歴管理・プラン管理・検索・一括削除の各サブメニューを呼び出します。 コマンドライン引数を渡すことで対話モードを経由せずに直接結果を表示することもできます。
storage.py
ファイルシステムとのやり取りを担当します。 セッション一覧の取得、入力履歴の読み込み、プランファイルの列挙、各種データの削除、キーワード検索、ストレージ使用量の集計を行います。
parser.py
JSONLセッションファイルのパーサーです。 ファイルを1行ずつ読み込み、タイムスタンプ・ブランチ名・最初のユーザーメッセージ・アシスタント応答概要などのメタ情報を抽出します。 十分な情報が揃った時点で残りの行数だけをカウントし、読み込みを打ち切る早期終了の仕組みを備えています。
ui.py
Richライブラリを使ったターミナル表示を担当します。 セッション一覧・詳細パネル・入力履歴テーブル・プラン一覧テーブル・ストレージ使用状況テーブルを描画します。
config.py
パス定数(`CLAUDE_DIR`, `PROJECTS_DIR`, `HISTORY_FILE`, `PLANS_DIR`)とJSTタイムゾーンを定義しています。
ディレクトリ構成
claude-history-manager/
pyproject.toml
claude_history_manager/
__init__.py
__main__.py
cli.py
config.py
parser.py
storage.py
ui.py
tests/
__init__.py
conftest.py
test_cli.py
test_parser.py
test_storage.py
test_ui
Related Skills
Context Mem History
Show session chain history — previous sessions, their summaries, and token usage
JMComic Downloader
JMComic downloader: a standalone Windows GUI (no Python needed), a portable Agent Skill for DSH/Codex/Claude C
Hindcast
Browse, search & replay every Claude Code session on your Mac. Local-first session viewer, timeline scrubber &
Purser
Session ledger for Claude Code — a native macOS app (PyObjC + WKWebView) to browse, cost, search and clean up
Agent Conv CLI
Read and continue your local Claude Code / Codex CLI / Cursor conversation history from the terminal (chats/re
Signal MCP
Ask Claude about your Signal conversations. Persistent history, full-text search, and complete signal-cli cove
Related Agents
Skill Mining
Use this agent to surface patterns from past work — what's worked, what keeps breaking, what could become a re
Memory Manager
Invoke when the user wants to save brand knowledge to persistent memory, search past campaign learnings, sync
SEO Agent
Owns keyword strategy and search positioning — builds a keyword cluster with free research methods, decides wh