Session-logs
Search and analyze your own session logs (older/parent conversations) using jq. Skill: Session-logs Owner: guogang1024 Summary: Search and analyze your own session logs (older/parent conversations) using jq. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-03T16:33:47.000Z | auto Initial release of session-logs. - Enables searching and analyzing your session logs (past conversations) with jq and ripgrep (rg). - Provides bash command examples for session discovery, keyword searches, extractin
Rank
62
Safety
84
Downloads
37k
Updated
May 16, 2026
Version
1.0.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 37.1K downloads reported by the source. Last updated 5/16/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed May 16, 2026
- Protocol compatibility
- OpenClawcompatibility · observed May 16, 2026
- Adoption signal
- 37.1K downloadsadoption · observed May 16, 2026
- Latest release
- 1.0.0release · observed Feb 3, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install publishers:guogang1024:session-logs- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-guogang1024-session-logs-2/snapshot"
Documentation
CLAWHUB
4,370 characters of source documentation, loaded on request.
Extracted files
2 files captured from the source.
SKILL.md
---
name: session-logs
description: Search and analyze your own session logs (older/parent conversations) using jq.
metadata: {"openclaw":{"emoji":"📜","requires":{"bins":["jq","rg"]}}}
---
# session-logs
Search your complete conversation history stored in session JSONL files. Use this when a user references older/parent conversations or asks what was said before.
## Trigger
Use this skill when the user asks about prior chats, parent conversations, or historical context that isn’t in memory files.
## Location
Session logs live at: `~/.clawdbot/agents/<agentId>/sessions/` (use the `agent=<id>` value from the system prompt Runtime line).
- **`sessions.json`** - Index mapping session keys to session IDs
- **`<session-id>.jsonl`** - Full conversation transcript per session
## Structure
Each `.jsonl` file contains messages with:
- `type`: "session" (metadata) or "message"
- `timestamp`: ISO timestamp
- `message.role`: "user", "assistant", or "toolResult"
- `message.content[]`: Text, thinking, or tool calls (filter `type=="text"` for human-readable content)
- `message.usage.cost.total`: Cost per response
## Common Queries
### List all sessions by date and size
```bash
for f in ~/.clawdbot/agents/<agentId>/sessions/*.jsonl; do
date=$(head -1 "$f" | jq -r '.timestamp' | cut -dT -f1)
size=$(ls -lh "$f" | awk '{print $5}')
echo "$date $size $(basename $f)"
done | sort -r
```
### Find sessions from a specific day
```bash
for f in ~/.clawdbot/agents/<agentId>/sessions/*.jsonl; do
head -1 "$f" | jq -r '.timestamp' | grep -q "2026-01-06" && echo "$f"
done
```
### Extract user messages from a session
```bash
jq -r 'select(.message.role == "user") | .message.content[]? | select(.type == "text") | .text' <session>.jsonl
```
### Search for keyword in assistant responses
```bash
jq -r 'select(.message.role == "assistant") | .message.content[]? | select(.type == "text") | .text' <session>.jsonl | rg -i "keyword"
```
### Get total cost for a session
```bash
jq -s '[.[] | .message.usage.cost.total // 0] | add' <session>.jsonl
```
### Daily cost summary
```bash
for f in ~/.clawdbot/agents/<agentId>/sessions/*.jsonl; do
date=$(head -1 "$f" | jq -r '.timestamp' | cut -dT -f1)
cost=$(jq -s '[.[] | .message.usage.cost.total // 0] | add' "$f")
echo "$date $cost"
done | awk '{a[$1]+=$2} END {for(d in a) print d, "$"a[d]}' | sort -r
```
### Count messages and tokens in a session
```bash
jq -s '{
messages: length,
user: [.[] | select(.message.role == "user")] | length,
assistant: [.[] | select(.message.role == "assistant")] | length,
first: .[0].timestamp,
last: .[-1].timestamp
}' <session>.jsonl
```
### Tool usage breakdown
```bash
jq -r '.message.content[]? | select(.type == "toolCall") | .name' <session>.jsonl | sort | uniq -c | sort -rn
```
### Search across ALL sessions for a phrase
```bash
rg -l "phrase" ~/.clawdbot/agents/<agentId>/sessions/*.jsonl
```
## Tips
- Sessions are append-only JSONL (one JSON object per line)
- Larg_meta.json
{
"ownerId": "kn7e8qx3t885vqaya3vk3q7z0180fxd2",
"slug": "session-logs",
"version": "1.0.0",
"publishedAt": 1770136427000
}activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"label": "Vendor",
"value": "Clawhub",
"category": "vendor",
"href": "https://clawhub.ai/guogang1024/session-logs",
"sourceUrl": "https://clawhub.ai/guogang1024/session-logs",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-05-16T06:11:59.243Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "protocols",
"label": "Protocol compatibility",
"value": "OpenClaw",
"category": "compatibility",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-guogang1024-session-logs-2/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-guogang1024-session-logs-2/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-05-16T06:11:59.243Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "traction",
"label": "Adoption signal",
"value": "37.1K downloads",
"category": "adoption",
"href": "https://clawhub.ai/guogang1024/session-logs",
"sourceUrl": "https://clawhub.ai/guogang1024/session-logs",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-05-16T06:11:59.243Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "latest_release",
"label": "Latest release",
"value": "1.0.0",
"category": "release",
"href": "https://clawhub.ai/guogang1024/session-logs",
"sourceUrl": "https://clawhub.ai/guogang1024/session-logs",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-03T16:33:47.000Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "handshake_status",
"label": "Handshake status",
"value": "UNKNOWN",
"category": "security",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-guogang1024-session-logs-2/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-guogang1024-session-logs-2/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true,
"metadata": {}
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.0",
"description": "Initial release of session-logs. - Enables searching and analyzing your session logs (past conversations) with jq and ripgrep (rg). - Provides bash command examples for session discovery, keyword searches, extracting messages, cost summaries, and tool usage breakdowns. - Documents JSONL session file structure, roles, and content types. - Lists session log file locations and naming conventions. - Includes tips for managing and querying large, append-only session histories.",
"href": "https://clawhub.ai/guogang1024/session-logs",
"sourceUrl": "https://clawhub.ai/guogang1024/session-logs",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-03T16:33:47.000Z",
"isPublic": true,
"metadata": {}
}
]
}Record generated Oct 9, 2026.
