session-logs

Search and analyze OpenClaw session JSONL transcripts using jq and ripgrep.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill session-logs-jerome-prakash-l
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/JEROME-PRAKASH-L/openclaw/tree/main/skills/session-logs
Command: npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill session-logs-jerome-prakash-l

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, ripgrep.

What problem does it solve? When a user references older or parent conversations that are 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 session JSONL files. ## Core Features & Use Cases - Full-History Search: Find keywords or phrases across all session transcripts using ripgrep, or filter messages by role with jq. - Session Analytics: Compute per-session and daily cost totals, message counts, token usage, and tool-call breakdowns from JSONL metadata. - Use Case: A user asks "what did we decide about the deployment last Tuesday?" You locate the session file by date, extract the user and assistant text messages, and summarize the relevant discussion. ## Quick Start Use the session-logs skill to find what we discussed about database migration in my previous conversations.

Frequently Asked Questions about session-logs

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

FAQPage Schema
How do I search my past OpenClaw conversations?▼

Use ripgrep to search across all session JSONL files in the sessions directory for a keyword, then use jq to extract the matching messages. Session files live under $OPENCLAW_STATE_DIR/agents/<agentId>/sessions/.

How do I extract only user messages from a session log?▼

Pipe the session JSONL file through jq with a filter selecting entries where message.role equals user, then pull text content blocks. The Skill provides the exact jq command for this extraction.

Where are OpenClaw session logs stored?▼

Session logs are stored under $OPENCLAW_STATE_DIR/agents/<agentId>/sessions/, defaulting to ~/.openclaw/agents/<agentId>/sessions/. Each session is a <session-id>.jsonl file, indexed by sessions.json.

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

Yes, sum the message.usage.cost.total fields across all lines of the session JSONL file using jq. The Skill also includes a daily cost summary command aggregating costs across all sessions by date.

What tools are required to analyze session JSONL files?▼

The Skill requires jq for JSON parsing and ripgrep (rg) for fast text search. Both can be installed via Homebrew using the formulas jq and ripgrep.