A Claude Code Skill for forensic analysis and file recovery from pi (coding agent harness) session history.
Pi session history is stored as JSONL files in ~/.pi/agent/sessions/. Each session contains complete records of tool calls, file writes, reads, subagent executions, and conversation flow. This skill provides multi-dimensional analysis: file recovery, subagent chain tracing, content analysis, chronology reconstruction, and work mode investigation.
- File Recovery - Extract deleted or lost files from session archives
- Subagent Tracing - Follow execution chains, analyze work distribution
- Session Analysis - Content themes, tool usage, timing patterns
- Chronology Reconstruction - Timeline of work across sessions
- Mode Investigation - Determine single-agent vs multi-agent execution
git clone https://github.com/YOURUSER/agent.gitThen copy or symlink the skill to your Claude Code skills directory:
# For Claude Code
cp -r agent/skills/pi-session-investigator ~/.claude/skills/
# Or create a symlink
ln -s $(pwd)/agent/skills/pi-session-investigator ~/.claude/skills/pi-session-investigatorInvoke the skill:
/skill pi-session-investigator
The scripts/ directory contains standalone Python scripts for direct use:
cd skills/pi-session-investigator/scripts
# List all available sessions
python3 list_sessions.py
# Search for a file across all sessions
python3 find_file_in_sessions.py "mission-control.md"
# Extract a specific file from a session
python3 extract_file.py ~/.pi/agent/sessions/WORKSPACE/session.jsonl "filename.md"- SKILL.md - Complete skill documentation with workflows
- references/jsonl-format.md - JSONL format reference
- references/recovery-examples.md - Real-world recovery examples
- Python 3.8+
- Claude Code (for skill invocation)
- Pi session history in
~/.pi/agent/sessions/
Apache 2.0 - See LICENSE