claude-session-jsonl

Parse Claude Code session logs to compute token usage, cost, and tool activity.

Updated May 2, 2020
One-click install
npx skills add https://github.com/vankichi/dotfiles --skill claude-session-jsonl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-session-jsonl
Source: https://github.com/vankichi/dotfiles/tree/main/claude/ja/skills/claude-session-jsonl
Command: npx skills add https://github.com/vankichi/dotfiles --skill claude-session-jsonl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill helps users analyze Claude Code session logs to understand token usage, cost estimation, and tool activity, providing insights into Claude's performance and usage patterns.

Core Features & Use Cases

  • Session Log Analysis: Parse and analyze Claude Code session logs to extract valuable metrics.
  • Token and Cost Metrics: Calculate token usage and cost for each session to monitor usage patterns and budget.
  • Tool Usage Insights: Identify which tools are being used during sessions and their respective usage statistics.
  • Use Case: For developers who want to track the usage and performance of Claude Code in their development workflow.

Quick Start

Analyze the session logs for the current project to get an overview of token and cost usage.

Frequently Asked Questions about claude-session-jsonl

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

FAQPage Schema
How do I analyze Claude Code session logs for token usage and cost estimation?

To analyze Claude Code session logs for token usage and cost estimation, you can parse the JSONL session files to compute token metrics and calculate costs for each session. This provides insights into usage patterns and budgets.

What's the best way to track tool activity in Claude Code session logs?

The best way to track tool activity in Claude Code session logs is to parse the JSONL files to identify which tools are used during sessions and extract their respective usage statistics, helping you monitor Claude's performance.

What do I need to parse Claude Code session logs and compute metrics?

To parse Claude Code session logs and compute metrics, you need knowledge of the JSONL format and the Claude Code session log structure, including its specific event types, to accurately extract token and tool data.

Can I monitor Claude Code token usage across multiple development sessions?

Yes, you can monitor Claude Code token usage across multiple development sessions by parsing and analyzing the session logs to calculate token usage and cost for each session, providing an overview of your usage patterns.

How does JSONL session log analysis work for Claude Code cost tracking?

JSONL session log analysis for Claude Code cost tracking works by parsing the structured event data to compute token usage and estimate costs, allowing developers to monitor their usage in development workflows.