session-logs

Search and analyze JSONL session logs of prior conversations using jq and ripgrep.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill session-logs-amirulandalib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/AmirulAndalib/Vilvona-AI/tree/main/skills/session-logs
Command: npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill session-logs-amirulandalib

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, ripgrep.

What problem does it solve? When a user references an older or parent conversation that is no longer in context, there is no built-in way to recall what was said. This Skill lets you search, filter, and analyze your complete conversation history stored as JSONL session files. ## Core Features & Use Cases - Full-Text Session Search: Find any phrase across all past sessions using ripgrep, or filter messages by role and content type with jq. - Usage and Cost Analytics: Compute per-session and daily cost totals, message counts, and token statistics from the usage metadata embedded in each log line. - Tool Usage Breakdown: Aggregate which tools were called and how often within any session transcript. - Use Case: A user asks "what did we decide about the database migration last Tuesday?" You locate sessions from that date, extract the user and assistant text messages, and surface the relevant discussion. ## Quick Start Search my session logs for any past conversation mentioning "deployment checklist" and summarize what was discussed.

Frequently Asked Questions about session-logs

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

FAQPage Schema
How do I search past conversation history stored in JSONL files?

Use ripgrep to search across all .jsonl session files for a keyword, then use jq to extract readable text by filtering for message entries with content of type text. Session files live under the agent's sessions directory.

How to extract only user messages from a session transcript?

Pipe the session JSONL file through jq with a filter selecting entries where message.role equals user, then expand the content array and keep only items of type text. This yields clean human-readable user messages.

Can I calculate the total API cost of a past session?

Yes. Each message entry contains a usage.cost.total field. Slurp the JSONL file with jq -s and sum all cost totals to get the per-session cost, or loop over files and group by date for a daily cost summary.

What tools are required to analyze session JSONL logs?

You need jq for parsing and aggregating the JSON lines and ripgrep (rg) for fast keyword search across files. Both can be installed via Homebrew with the formulas jq and ripgrep.

Why does my session search return no results for a deleted conversation?

Deleted sessions are renamed with a .deleted.<timestamp> suffix, so glob patterns matching only *.jsonl will skip them. Include those suffixed files explicitly if you need to search deleted sessions.