Agent skill

session-logs

Search and analyze your own session logs (older/parent conversations) using jq.

majiayu000534★ · 1 repos on radarProfile →
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/analysis/session-logs-majiayu000-claude-skill-registr-8aea862f/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 ``` ##

What's inside
Steps it walks through
  1. Trigger
  2. Location
  3. Structure
  4. Common Queries
  5. List all sessions by date and size
  6. Find sessions from a specific day
  7. Extract user messages from a session
  8. Search for keyword in assistant responses
  9. Get total cost for a session
  10. Daily cost summary
  11. Count messages and tokens in a session
  12. Tool usage breakdown
  13. Search across ALL sessions for a phrase
  14. Tips
Ships with 1 file
  • metadata.json
Commands it runs
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 -r
More from claude-skill-registry
All skills →
About this skill
What 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.

Keep going