session-logs

Search and analyze OpenClaw agent session JSONL transcripts for messages and stats.

Updated May 4, 2026
One-click install
npx skills add https://github.com/234194027-cpu/xianclaw --skill session-logs-234194027-cpu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/234194027-cpu/xianclaw/tree/main/resources/openclaw/config/skills/session-logs
Command: npx skills add https://github.com/234194027-cpu/xianclaw --skill session-logs-234194027-cpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, rg.

What problem does it solve?

Session-logs helps you find what was said earlier by searching your own saved conversation history when the relevant context isn’t available in the current memory.

Core Features & Use Cases

  • Search by time and content: Filter sessions by date, extract user/assistant messages, and locate keywords across transcripts.
  • Analyze session structure and cost: Compute totals such as message counts and usage cost per session or per day.
  • Inspect tool usage: Summarize which tool calls were used in a session to understand prior actions and outcomes.

Quick Start

Ask your agent to “search session logs for the phrase ‘refund policy’ and return the matching user and assistant messages from the relevant sessions.”

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 agent conversation history for a specific keyword?

You can search past conversation history by scanning saved JSONL session transcripts. The tool uses ripgrep for fast text matching to locate specific keywords across user and assistant messages stored locally.

How do I extract older user and assistant messages from JSONL session logs?

Extract older messages from JSONL session logs by parsing files with jq. It filters structured transcript data to retrieve parent conversation context and specific content from sessions saved locally.

Can I calculate token usage cost and message counts from saved session transcripts?

Yes, you can calculate token usage cost and message counts from saved session transcripts. The tool uses jq to compute session-level stats, aggregating totals per session or per day.

How do I summarize which tool calls were used in previous agent sessions?

Summarize tool calls from previous agent sessions by parsing the JSONL transcripts with jq. It inspects session structure to identify which tools were invoked and understand prior actions.

Do I need jq and rg installed to search my agent session logs?

Yes, you need both jq and rg installed. The Skill requires jq for local JSONL parsing and rg for fast text matching while reading files from the agents sessions directory.

What is the best way to find older context across multiple OpenClaw session transcripts?

The best way to find older context across multiple transcripts is using keyword extraction with rg and jq. It reads saved JSONL files to locate matching user and assistant messages across many sessions.