claude-sessions

Installation
SKILL.md

Claude Sessions

Locate the past Claude Code session(s) matching a project and/or topic, then summarize them. Sessions are local JSONL transcripts; individual files reach tens of MB. Never read full transcripts into the main context — rank cheaply, then dispatch one subagent per top candidate to do the heavy read in isolation.

Storage facts

  • Path: ~/.claude/projects/<dashified-cwd>/<sessionId>.jsonl. The dir name is the project's cwd with every / and . replaced by - (e.g. ~/workspace/OpenClawBot-Users-engineer-workspace-OpenClawBot).
  • One project may have sibling dir variants (…-OpenClawBot, …-OpenClawBot-2) — always consider all of them.
  • Each line is a JSON record with a type: user, assistant, custom-title (customTitle), last-prompt (lastPrompt), summary, file-history-snapshot, etc. Records carry an ISO timestamp.

Procedure

1. Rank candidates cheaply. Run the bundled ranking script (scripts/rank_sessions.py, next to this SKILL.md) — never grep raw transcripts yourself first.

python3 <skill-dir>/scripts/rank_sessions.py [--project PATH] [--days N] [--limit N] KEYWORD...
# installed location is usually:
python3 ~/.claude/skills/claude-sessions/scripts/rank_sessions.py --project ~/workspace/OpenClawBot "merge gate" enforce testing
Installs
1
Repository
dzianisv/skills
GitHub Stars
2
First Seen
Jun 2, 2026
claude-sessions — dzianisv/skills