Claude Session Parser — Communication skill for Claude Code
Streaming parser for Claude Code session JSONL files: token usage, chat events, and activity classification.
How to install Claude Session Parser
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open sevenevesai/claude-session-parser and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Session Parser does
Streaming parser for Claude Code session JSONL files: token usage, chat events, and activity classification.
Alternatives in Communication
- Lark Coding Agent Bridge — Bot that bridges Feishu/Lark messenger with a local Claude Code or Codex CLI 2.4k ★
- Claudix - Claude Code For VSCode — by Haleclipse - A VSCode extension that brings Claude Code directly into your editor with interactive chat int 1k ★
- Claude Code Webui — Web-based interface for Claude CLI with streaming chat responses 969 ★
README
Streaming parser for Claude Code session JSONL files
[](https://github.com/sevenevesai/claude-session-parser)
[
](https://crates.io/crates/claude-session-parser)
Pulls structured token-usage and chat-event data out of the `.jsonl` files [Claude Code](https://claude.com/claude-code) writes to `~/.claude/projects//.jsonl`. Streaming, read-only, no network, no subprocess, no writes.
Install
[dependencies]
claude-session-parser = "0.2"
Usage
use std::path::Path;
use claude_session_parser::{parse_jsonl_entries, parse_chat_events, reduce_session};
let path = Path::new("/path/to/session.jsonl");
// Usage / billing view: one UsageEntry per assistant turn
let parsed = parse_jsonl_entries(path)?;
let summary = reduce_session(&parsed.entries, "claude-opus-4-7", "session-id");
if let Some(s) = summary {
println!(
"turns={} cost=${:.4} cache_hit={:.1}%",
s.message_count, s.estimated_cost_usd, s.cache_hit_pct
);
}
// Chat view: flat, timestamp-ordered event stream
let events = parse_chat_events(path)?;
for evt in events {
println!("{:?}", evt);
}
# Ok::<(), std::io::Error>(())
API
| Function | What it returns |
|---|---|
parse_jsonl_entries(path) |
Vec — one per assistant message (tokens, model, tool uses, cache stats, activity class, hooks) |
parse_chat_events(path) |
Vec — flat, timestamp-ordered user / assistant / thinking / tool-use / tool-result events |
reduce_session(entries, model, session_id) |
Option — totals, cost, context-window %, cache-hit rate |
cost_for_entry(&UsageEntry) |
Related Skills
Discord Digest
Scan Alex's friend group Discord server for events, plans, and activity.
CodePet
A desktop pet for Codex, Antigravity, Claude Code, and Grok, with live agent activity, usage tracking, account
Web To Cc
Resume the web chat in Claude Code. The JSONL session converter & importer. Continue from your idea.
Claude Telegram Bridge
Telegram bridge for Claude Code — chat with Claude via your own subscription (Pro/Max/Team), with live streami
Claude Juice
A Claude Code status line that shows your usage limits as batteries: your 5-hour session, your weekly and Fabl
Agent Peers MCP
Peer discovery + messaging MCP letting multiple Claude Code and Codex CLI sessions coordinate on one machine.
Related Agents
Stats Analyzer
Analyzes ~/.claude/stats-cache.json and history.jsonl to produce a concise usage report with model token break
Usage Efficiency Analyst
Analyses one account's out/ /summary.json + samples.jsonl for token efficiency and wasted effort. Use during /
Decisions Sync
Reviews the current session's chat transcript (~/.claude/projects/ / .jsonl) for decisions the user made, capt