smithery.ai

session-search

Search across pi session JSONL logs (user prompts, tool calls, results). Uses the session-digest tool and ripgrep for fast triage.

First seen Mar 21, 2026

Installation

$ npx skills add https://smithery.ai

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 smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

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

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,231 B
  • docs SUMMARY.md 152 B

History

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

SKILL.md

Session Search

Search historical pi sessions stored under ~/.pi/agent/sessions/.

This skill assumes the session-digest helper exists at ~/bin/session-digest.

Where sessions live

On this Termux setup, sessions are typically stored in:

  • ~/.pi/agent/sessions/--data-data-com.termux-files-home--/*.jsonl

If you are unsure which directory is active, list the session roots:

ls -la ~/.pi/agent/sessions

Method A (recommended): generate digests, then search the digests

session-digest parses session JSONL into readable markdown and writes files to:

  • ~/.rho/digests/YYYY-MM-DD.md
  1. Generate digests for a time window:
# last 7 days
session-digest --week >/dev/null

# or a single date
session-digest 2026-02-04 >/dev/null

# or all history (can be slow)
session-digest --all >/dev/null
  1. Search the digest markdown:
rg -n "<query>" ~/.rho/digests

Notes:

  • This is the safest way to skim history because session-digest also flags potential secrets.
  • If session-digest reports secrets, do NOT paste results into public logs.

Method B: direct grep over raw JSONL (fastest, messiest)

Search the raw session logs directly:

SESSION_ROOT=~/.pi/agent/sessions/--data-data-com.termux-files-home--
rg -n --hidden "<query>" "$SESSION_ROOT"/*.jsonl

Useful variants:

# show a little context around matches
rg -n -C 2 "<query>" "$SESSION_ROOT"/*.jsonl

# case-insensitive
rg -n -i "<query>" "$SESSION_ROOT"/*.jsonl

Common queries

  • Find when a specific tool was used:

- rg -n '"type":"toolCall"' ... | rg '"name":"vault_search"'

  • Find a user prompt:

- rg -n '"role":"user"' ... | rg "<phrase>"

  • Find a specific file path mentioned:

- rg -n "projects/rho" ...

Guardrails

  • Session logs can contain credentials (tokens, API keys, private URLs).
  • Prefer Method A first: it surfaces warnings via secret scanning.
  • If you need to share excerpts, redact aggressively and re-run session-digest to confirm no secrets are present.