session-logs

Search JSONL session logs for historical chat messages with jq and ripgrep.

2|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/papachong/RHClaw --skill session-logs-papachong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/papachong/RHClaw/tree/main/RHClaw-Desktop/src-tauri/skills/session-logs
Command: npx skills add https://github.com/papachong/RHClaw --skill session-logs-papachong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a practical way to locate, inspect, and summarize historical conversations stored as JSONL session logs so you can recover context, verify past messages, and audit usage costs when a user references prior chats.

Core Features & Use Cases

  • Search across an agent's session JSONL files for keywords in user or assistant messages using fast text search.
  • Extract role-filtered, human-readable message content and compute session-level metrics such as total cost, message counts, and time ranges.
  • Use cases include answering "what was said earlier", reconstructing parent conversation context, cost auditing per session, and debugging multi-session workflows.

Quick Start

Run the fast text-only hint to search an agent's sessions for a keyword and inspect the matching messages and metadata.

Frequently Asked Questions about session-logs

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

FAQPage Schema
How do I search chat history logs to find specific past messages?

To search chat history logs, you can scan session JSONL files for keywords in user or assistant messages using fast text search tools like ripgrep. It locates matching messages and extracts them with metadata for troubleshooting or context retrieval.

Can I calculate token cost analysis from JSONL session logs?

Yes, you can perform cost analysis on JSONL session logs by parsing message streams with jq. It computes session-level metrics including total cost, message counts, and time ranges to audit usage per conversation.

Do I need jq and ripgrep to extract conversations from local agent stores?

Yes, you need jq and ripgrep installed to extract conversations from local agent stores. Jq handles JSONL message stream parsing while ripgrep enables fast text searches across session files stored at ~/.clawdbot/agents/<agentId>/sessions.

How do I filter JSONL chat logs by role and content type?

To filter JSONL chat logs by role and content type, you apply jq filters to the message stream. This extracts role-filtered, human-readable message content from the historical session files for conversation analysis.

What is the best way to recover context from prior chat sessions?

The best way to recover context from prior chat sessions is searching local JSONL conversation stores. It locates historical chat messages and reconstructs parent conversation context for debugging multi-session workflows.

Does session log search work for troubleshooting multi-session agent workflows?

Yes, session log search works for troubleshooting multi-session agent workflows. By extracting and inspecting historical conversations across an agent's JSONL files, you can verify past messages and debug complex multi-session interactions.