session-logs
Search and analyze your own session logs (older/parent conversations) using jq.
Install via CLI (Recommended)
clawhub install openclaw/openclaw/skills/session-logsWhat This Skill Does
The session-logs skill acts as an intelligent retrieval system for your OpenClaw conversation history. By interacting with JSONL-formatted logs located in your agent's local directory, this skill allows the AI to perform complex queries, data analysis, and historical context extraction. It essentially bridges the gap between active memory and long-term storage, enabling the AI to recall specific instructions, past reasoning chains, or previous task outcomes that exist outside of current context windows.
Installation
You can install this skill directly via the ClawHub command-line interface. Simply execute the following command in your terminal:
clawhub install openclaw/openclaw/skills/session-logs
Ensure you have read permissions set for the ~/.openclaw/agents/ directory to allow the tool to index and search your session files properly.
Use Cases
- Context Retrieval: Recovering specific technical decisions or code snippets from older sessions to inform current development tasks.
- Cost Tracking: Calculating exactly how much a long-term project has cost in token usage by aggregating the
message.usage.cost.totalfield across multiple session logs. - Behavioral Analysis: Performing a breakdown of tool usage frequency to identify which skills you rely on most and which might be underutilized.
- Audit Trails: Searching for specific phrases or keywords across all past sessions to verify whether a particular topic was discussed or a specific task was completed.
- Data Aggregation: Summarizing conversation intensity by date to identify peak usage days for your agent.
Example Prompts
- "Check my logs from January 6th and tell me what the final consensus was regarding the API integration architecture."
- "How much total money have I spent on the agent's token usage since I started using this session ID?"
- "Find the last session where I used the web-search tool and list all the URLs I visited during that conversation."
Tips & Limitations
- Efficiency: Since this skill utilizes
jqandrg(ripgrep) for processing, it is extremely fast even with large datasets. Always leverage these tools for filtering before passing data to the LLM to save on token costs. - Formatting: Remember that logs are stored as JSONL. If you notice issues, ensure the metadata
typeis set correctly to 'message' to avoid parsing session headers as conversation content. - Data Privacy: This skill reads local files. Since it processes raw logs, ensure your logs do not contain sensitive credentials or PII before sharing your
~/.openclawdirectory with others. - Filtering: Use the provided pipeline examples (e.g., piping
jqintorg) to isolate specific metadata, such as costs or timestamps, to keep the agent's memory efficient and focused on relevant details.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-openclaw-session-logs": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, code-execution
Related Skills
apple-notes
Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
sherpa-onnx-tts
Local text-to-speech via sherpa-onnx (offline, no cloud)
goplaces
Query Google Places for text search, place details, resolve, reviews, or scriptable JSON via goplaces.
skill-creator
Create, edit, improve, tidy, review, audit, or restructure AgentSkills and SKILL.md files.
video-frames
Extract frames or short clips from videos using ffmpeg.