| name | session-reader |
| description | Efficiently read and analyze pi agent session JSONL files. Use when asked to "read a session", "review a session", "analyze a session", "what happened in this session", "load session", "parse session", "session history", "go through sessions", or given a .jsonl session file path. |
Read Pi Sessions
Parse pi session JSONL files into readable output. Sessions live in ~/.pi/agent/sessions/<project>/ as .jsonl files.
Step 1: Find the Session
ls -t ~/.pi/agent/sessions/*<project>*/*.jsonl | head -10
Step 2: Start with Table of Contents
Always start with toc to get a numbered map of the session:
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path> --mode toc
This prints a compact numbered list of every user exchange with timestamps and tools used.
Step 3: Read the Conversation
Default mode — shows only user messages and assistant text responses. Tool calls are hidden but hinted at with [used: tool1, tool2].
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path>
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path> --offset 5 --limit 3
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path> --search "error"
Step 4: Drill Into a Turn
See everything about a specific exchange — thinking, tool calls, tool results, costs: