pi-session-investigator

Forensic tools for Pi sessions - file recovery, subagent tracing, timeline reconstruction

Package details

skill

Install pi-session-investigator from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-session-investigator
Package
pi-session-investigator
Version
1.0.0
Published
Feb 18, 2026
Downloads
15/mo · 7/wk
Author
hammerhound
License
MIT
Types
skill
Size
80.7 KB
Dependencies
0 dependencies · 0 peers

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-session-investigator

An Agent Skill for forensic analysis and file recovery from pi (coding agent harness) session history.

Overview

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.

Capabilities

  • 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

Installation

git clone https://github.com/hammerhoundai/agentry.git

Then copy or symlink the skill to your agent skills directory:

# For Claude Code
cp -r agentry/skills/pi-session-investigator ~/.claude/skills/

# Or create a symlink
ln -s $(pwd)/agentry/skills/pi-session-investigator ~/.claude/skills/pi-session-investigator

Usage

In Claude Code

Invoke the skill:

/skill pi-session-investigator

Helper Scripts

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"

Documentation

Requirements

  • Python 3.8+
  • Claude Code (for skill invocation)
  • Pi session history in ~/.pi/agent/sessions/

License

Apache 2.0 - See LICENSE