extracting-session-data

Extract structured data from Claude Code session logs via command-line scripts.

129|15|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/bitwarden/ai-plugins --skill extracting-session-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extracting-session-data
Source: https://github.com/bitwarden/ai-plugins/tree/main/plugins/claude-retrospective/skills/extracting-session-data
Command: npx skills add https://github.com/bitwarden/ai-plugins --skill extracting-session-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

Users struggle to manually sift through Claude Code session logs to find specific information like errors, tool usage, or session statistics. This Skill eliminates that tedious process, providing structured access to your session history.

Core Features & Use Cases

  • Efficient Log Access: Programmatically locate, list, filter, and extract specific data from Claude Code's native session logs (~/.claude/projects/{project-dir}/{session-id}.jsonl).
  • Targeted Data Extraction: Pull out metadata, user prompts, tool usage statistics, errors, thinking blocks, or full session statistics.
  • Flexible Filtering: Filter sessions by timeframe, git branch, size, line count, error presence, or keywords to quickly find relevant sessions.
  • Use Case: Quickly find all sessions from the last week that had errors, then extract the specific error messages and tool usage statistics to debug a recurring issue.

Quick Start

Use the extracting-session-data skill to list all my Claude sessions from the last week.

Frequently Asked Questions about extracting-session-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract specific data from Claude Code session logs?

Extract session data using the command-line interface with --type, --session, and --format options to pull metadata, prompts, tool usage, errors, thinking blocks, or statistics directly from ~/.claude/projects/{project-dir}/{session-id}.jsonl files.

Can I filter Claude sessions by timeframe, branch, or errors?

Filter sessions by timeframe, git branch, size, line count, error presence, or keywords to quickly locate relevant sessions, then extract targeted data types for downstream analysis.

How do I find and analyze errors across multiple Claude Code sessions?

List sessions from a specific timeframe, filter by error presence, and extract error messages and tool usage statistics together to debug recurring issues across your session history.

What data types can I extract from Claude session logs?

Extract metadata, user prompts, tool usage, errors, thinking, text responses, and session statistics in structured formats ready for analysis with jq or other downstream tools.

Do I need command-line knowledge to use session log extraction?

The Skill uses a command-line, script-based interface; familiarity with terminal commands and jq filtering is helpful for locating logs and processing extracted data efficiently.