session-logs
Search and analyze your own session logs (older/parent conversations) using jq.
Profile →npx skills add majiayu000/claude-skill-registry --skill session-logs-majiayu000-claude-skill-registr-8aea862f --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 ``` ##
- Trigger
- Location
- Structure
- Common Queries
- List all sessions by date and size
- Find sessions from a specific day
- Extract user messages from a session
- Search for keyword in assistant responses
- Get total cost for a session
- Daily cost summary
- Count messages and tokens in a session
- Tool usage breakdown
- Search across ALL sessions for a phrase
- Tips
for f in ~/.clawdbot/agents/<agentId>/sessions/*.jsonl; do
echo "$date $size $(basename $f)"
done | sort -r
head -1 "$f" | jq -r '.timestamp' | grep -q "2026-01-06" && echo "$f"
done
jq -r 'select(.message.role == "user") | .message.content[]? | select(.type == "text") | .text' <session>.jsonl
jq -r 'select(.message.role == "assistant") | .message.content[]? | select(.type == "text") | .text' <session>.jsonl | rg -i "keyword"
jq -s '[.[] | .message.usage.cost.total // 0] | add' <session>.jsonl
echo "$date $cost"
done | awk '{a[$1]+=$2} END {for(d in a) print d, "$"a[d]}' | sort -rWhat does the session-logs skill do?
Search and analyze your own session logs (older/parent conversations) using jq.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill session-logs-majiayu000-claude-skill-registr-8aea862f --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.