session-logs

Search and analyze JSONL session transcripts for past conversation content.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/Polealpha/XINNIAN_PI --skill session-logs-polealpha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/Polealpha/XINNIAN_PI/tree/main/app%20windows/vendor/openclaw-runtime/skills/session-logs
Command: npx skills add https://github.com/Polealpha/XINNIAN_PI --skill session-logs-polealpha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, rg.

What problem does it solve?

session-logs eliminates the friction of remembering what was said earlier by enabling fast, self-serve search over your archived OpenClaw session transcripts.

Core Features & Use Cases

  • Keyword search across past conversations: Locate prior user questions and assistant answers by searching within JSONL transcripts.
  • Session discovery and filtering: Use the sessions directory index to enumerate sessions and pinpoint sessions by date or size.
  • Structured log analysis: Extract user/assistant messages, identify tool usage patterns, and summarize cost totals per session for review.

Quick Start

Ask: "Search my OpenClaw session logs for 'keyword' and show the matching user messages and any assistant replies from the most 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 conversation history for a specific keyword in my JSONL transcripts?

Search conversation history by applying rg-compatible filtering to locate prior user questions and assistant answers within your JSONL transcripts. The Skill enumerates sessions from the local filesystem index and pinpoints matching messages for deterministic extraction.

Can I analyze session logs to calculate cost totals per chat session?

Analyze session logs to summarize cost totals per session by parsing the JSONL transcripts. The Skill applies jq-compatible filtering to extract user and assistant messages, enabling structured log analysis and cross-session cost review for a given agentId.

What do I need to parse JSONL session logs for past chat review?

Parsing JSONL session logs requires local filesystem access to the ~/.openclaw/agents/<agentId>/sessions/ directory. You also need jq and rg installed to perform structured JSONL parsing and deterministic keyword extraction.

How to retrieve parent conversation context from previous OpenClaw sessions?

Retrieve parent conversation context by accessing the sessions directory index stored on your local filesystem. The Skill enumerates available sessions, allowing you to pinpoint specific transcripts by date or size for historical chat review.

Does session log keyword search work with jq and rg for structured extraction?

Session log keyword search works directly with jq and rg for deterministic extraction. These dependencies enable structured log analysis, allowing you to identify tool usage patterns and extract specific user or assistant messages from JSONL files.

What is the best way to discover and filter past chat sessions by date?

Discover and filter past chat sessions by querying the local sessions directory index. The Skill enumerates all stored JSONL transcripts, allowing you to pinpoint specific historical sessions by date or file size for targeted conversation review.