hazat/pi-config · Archived

session-reader

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.

First seen May 9, 2026

Installation

$ npx skills add hazat/pi-config --skill session-reader

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from hazat/pi-config · top by installs.

npx skills add hazat/pi-config

Browse all from hazat/pi-config

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 443
License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,244 B
  • docs SUMMARY.md 302 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 7 installs

SKILL.md

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].

# Full conversation (default mode)
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path>

# Specific range
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path> --offset 5 --limit 3

# Search for specific topic
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:

uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <path> --mode turn --turn 7

Mode Reference

Mode Shows Use for
conversation User + assistant text only (default) Reading what happened
toc Numbered exchange list Navigation, finding the right turn
turn Full detail for one exchange Drilling into specifics
issues Errors, failures, retries, user complaints Finding what broke
overview Metadata + exchange summaries Quick session assessment
full Everything including tool I/O Deep debugging
tools Tool calls and results only Understanding agent actions
costs Token usage and cost per turn Cost analysis
subagents Subagent task/status/cost/paths Reviewing delegated work

Flags

Flag Effect
--offset N Skip first N exchanges
--limit N Show at most N exchanges
--turn N Exchange number to drill into (with --mode turn)
--search TERM Filter exchanges containing TERM (case-insensitive)
--max-content N Max chars per block (default: 3000, 0=unlimited)

Typical Workflow

  1. --mode toc → scan the session, find interesting exchanges
  2. Default (conversation) → read the human-readable flow
  3. --mode turn --turn N → drill into specific exchanges
  4. --mode subagents → review delegated work and follow subagent session paths

Subagent Drill-Down

Subagent session files can be read with the same script:

# From --mode subagents output, grab the JSONL path
uv run ${CLAUDE_SKILL_ROOT}/scripts/read_session.py <subagent-jsonl-path> --mode toc

Session Format Reference

Read ${CLAUDESKILLROOT}/references/session-format.md only if custom parsing is needed.