pi-session-summarizer

Extracts pi agent session records by date range and generates project-grouped Markdown summaries.

7|Updated May 13, 2026
One-click install
npx skills add https://github.com/DawnMoon1542/agents-skills --skill pi-session-summarizer-dawnmoon1542
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-session-summarizer
Source: https://github.com/DawnMoon1542/agents-skills/tree/main/pi-session-summarizer
Command: npx skills add https://github.com/DawnMoon1542/agents-skills --skill pi-session-summarizer-dawnmoon1542

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing weeks of pi agent session history manually is tedious and unstructured. This Skill scans JSONL session logs within a specified date range, extracts the first user message from each session, and organizes them into a structured Markdown report grouped by project for periodic reviews and work archiving. ## Core Features & Use Cases - Date-Range Extraction: Scans ~/.pi/agent/sessions for JSONL files within a start and end date, pulling each session's first user message as the task description. - Project-Grouped Reporting: Groups sessions by working directory, sorts projects by activity, and generates a Markdown document with statistics, task tables, and key theme summaries. - Use Case: At the end of a sprint, run the Skill over the past two weeks to produce a work log showing which projects you worked on, what tasks were requested, and the main themes—ready for a status report or personal archive. ## Quick Start Summarize all my pi agent sessions from 2026-05-01 to 2026-05-18 into a Markdown report grouped by project.

Frequently Asked Questions about pi-session-summarizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I summarize pi agent session history by date range?

Run the bundled extract-sessions.py script with --from and --to dates in YYYY-MM-DD format. It scans ~/.pi/agent/sessions, extracts each session's first user message, and outputs JSON grouped by project for building a Markdown summary.

How to extract the first user message from JSONL session logs?

Parse each JSONL line and find the first record with type "message" and role "user", then concatenate its text content parts. The extract-sessions.py script implements this and also captures the session timestamp and working directory.

Does the session extraction require external Python dependencies?

No, the extraction script uses only Python standard library modules: argparse, json, os, sys, collections, and datetime. It runs directly with python3 or uv run without installing any packages.

Can I use a custom sessions directory instead of the default?

Yes, pass the --sessions-dir argument to point at any directory containing pi session JSONL files. The default is ~/.pi/agent/sessions, and subdirectories are scanned recursively.

Why are some sessions missing from the summary output?

Sessions are excluded if their filename date falls outside the date range, if the file is named subagents.jsonl, or if no user message exists in the file. Files with unparseable JSON lines are skipped silently.