From session-historian
Read and analyze Claude Code session history stored in ~/.claude/projects/. Use when asking about previous sessions, debugging past workflows, finding error patterns, searching conversations, understanding what agents did, or maintaining continuity across sessions. Triggers on questions like "what did the last session do", "show errors from recent sessions", "find sessions about X", "summarize session Y", "which sessions modified Z file".
How this skill is triggered — by the user, by Claude, or both
Slash command
/session-historian:session-historianThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read and analyze Claude Code session history for debugging, continuity, and workflow analysis.
Read and analyze Claude Code session history for debugging, continuity, and workflow analysis.
# List recent sessions
python ${CLAUDE_PLUGIN_ROOT}/scripts/list_sessions.py --project claude-life-dev --days 7
# Summarize a session
python ${CLAUDE_PLUGIN_ROOT}/scripts/summarize_session.py --session-id <uuid>
# Search sessions
python ${CLAUDE_PLUGIN_ROOT}/scripts/search_sessions.py --project claude-life-dev --text "WebSocket" --days 7
# Find errors
python ${CLAUDE_PLUGIN_ROOT}/scripts/find_errors.py --project claude-life-dev --days 3
# Deep context for debugging
python ${CLAUDE_PLUGIN_ROOT}/scripts/get_session_context.py --session-id <uuid>
# Cross-session patterns
python ${CLAUDE_PLUGIN_ROOT}/scripts/cross_session_analysis.py --project claude-life-dev --days 7 --focus failures
List sessions with metadata summary.
python ${CLAUDE_PLUGIN_ROOT}/scripts/list_sessions.py --project <name> --days <n> [--limit <n>]
Output fields: session_id, start_time, end_time, duration_minutes, tool_calls, tools_used, error_count, git_branch, cwd, message_count, user_messages, assistant_messages, summary, file_path, file_size_kb
Timeline and summary of a specific session.
python ${CLAUDE_PLUGIN_ROOT}/scripts/summarize_session.py --session-id <uuid>
Output fields: session_id, file_path, timeline, tools_used, files_touched (read/written/edited), commands_run, final_status, total_messages, total_tool_calls, session_summary, start_time, end_time
Flexible search with composable filters.
python ${CLAUDE_PLUGIN_ROOT}/scripts/search_sessions.py --project <name> --days <n> [filters...]
Filters:
| Flag | Description |
|---|---|
--text <str> | Full-text search in messages |
--tool <name> | Sessions using specific tool (Bash, Read, etc.) |
--command <str> | Sessions running specific command (substring match in Bash) |
--file <path> | Sessions that touched specific file |
--min-duration <min> | Minimum session duration in minutes |
--has-errors | Only sessions with errors |
--has-pr | Only sessions that touched PRs |
--limit <n> | Max results to return |
Error patterns across sessions.
python ${CLAUDE_PLUGIN_ROOT}/scripts/find_errors.py --project <name> --days <n>
Output fields: total_sessions, sessions_with_errors, error_rate, total_errors, patterns (categorized errors), affected_sessions, recent_errors
Full context extraction for deep debugging.
python ${CLAUDE_PLUGIN_ROOT}/scripts/get_session_context.py --session-id <uuid> [--include-messages]
Output fields:
metadata - start/end time, duration, cwd, git_branch, versionstatistics - message counts, tool calls, errors, parse_warningstool_calls - list of all tool invocations with inputstool_results - list of tool outputs with error detectionerrors - extracted error events with contextmessages - full message content (only with --include-messages)Pattern analysis across multiple sessions.
python ${CLAUDE_PLUGIN_ROOT}/scripts/cross_session_analysis.py --project <name> --days <n> --focus <area>
Focus areas:
| Focus | Analysis |
|---|---|
failures | Error rates, worst sessions, errors by branch |
tools | Tool usage frequency, usage rates, avg calls per session |
duration | Min/max/avg/median duration, duration buckets, 90th percentile |
commands | Slash command and git/gh command frequency |
Sessions are stored in ~/.claude/projects/{encoded-path}/:
/home/user/project encodes to -home-user-project.jsonl file with the session UUID as filenameSee references/session_format.md for JSONL schema.
If you get {"status": "error", "error": "Project 'X' not found"}:
ls ~/.claude/projects//home/user/project becomes -home-user-project--project myproject matches -home-user-myprojectScripts track malformed JSONL lines in parse_warnings field. Non-zero value means some lines were skipped but analysis continued.
0 = Success (check "status": "success" in JSON)1 = Error (check "error" field for details)Debug a failed workflow:
python ${CLAUDE_PLUGIN_ROOT}/scripts/find_errors.py --project myproject --days 3
python ${CLAUDE_PLUGIN_ROOT}/scripts/get_session_context.py --session-id <uuid> --include-messages
Understand what happened yesterday:
python ${CLAUDE_PLUGIN_ROOT}/scripts/list_sessions.py --project myproject --days 1
python ${CLAUDE_PLUGIN_ROOT}/scripts/summarize_session.py --session-id <uuid>
Find sessions about a topic:
python ${CLAUDE_PLUGIN_ROOT}/scripts/search_sessions.py --project myproject --text "authentication" --days 14
Analyze patterns over time:
python ${CLAUDE_PLUGIN_ROOT}/scripts/cross_session_analysis.py --project myproject --days 30 --focus tools
python ${CLAUDE_PLUGIN_ROOT}/scripts/cross_session_analysis.py --project myproject --days 30 --focus failures
npx claudepluginhub kyletabor/claude_plugins --plugin session-historianSearches Claude Code session history using full-text search on summaries, commits, projects, and branches. Use for queries like 'find where I discussed X' or 'search for Y'.
Analyzes Claude Code session history JSONL files to extract insights, summaries, and patterns from conversations. Processes current project or all sessions with bash, jq, and subagents.
Analyzes Claude Code session logs to extract tool usage stats, thinking blocks, error patterns, debug trajectories, and generate actionable productivity recommendations. Provides cc-session CLI for overviews, timelines, searches.