session-finder/SKILL.md
Smart search through Pi session history. Find past conversations by keywords, topics, date, or tools used. Resume or export sessions. Use when you need to find a previous session.
npx skillsauth add snqb/my-skills session-finderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Search Pi sessions stored in ~/.pi/agent/sessions/.
# Default location
~/.pi/agent/sessions/
# Sessions organized by working directory
~/.pi/agent/sessions/--Users-sn-Projects-myproject--/
rg -l "keyword" ~/.pi/agent/sessions/ --glob "*.jsonl"
Find sessions containing BOTH terms:
rg -l "term1" ~/.pi/agent/sessions/**/*.jsonl | xargs rg -l "term2"
rg -l "term1|term2" ~/.pi/agent/sessions/ --glob "*.jsonl"
rg -l "professional website" ~/.pi/agent/sessions/ --glob "*.jsonl"
TERM="your search term"
for f in $(rg -l "$TERM" ~/.pi/agent/sessions/**/*.jsonl 2>/dev/null); do
echo "📁 $f"
rg '"role":"user"' "$f" | head -3 | sed 's/.*"text":"/ → /; s/".*/.../' | cut -c1-120
echo ""
done
TERM="professional"
for f in $(rg -l "$TERM" ~/.pi/agent/sessions/**/*.jsonl 2>/dev/null | head -10); do
echo "🎯 $f"
rg -o '"text":"[^"]{0,100}'"$TERM"'[^"]{0,100}"' "$f" | head -2
echo ""
done
# List sessions from today
find ~/.pi/agent/sessions -name "*.jsonl" -mtime 0
# Last 7 days
find ~/.pi/agent/sessions -name "*.jsonl" -mtime -7
# Specific date range (using filename)
ls ~/.pi/agent/sessions/**/*.jsonl | grep "2026-02-05"
# Most recent first
ls -lt ~/.pi/agent/sessions/**/*.jsonl 2>/dev/null | head -20
# Sessions that used HN research
rg -l "hn-research|hn.algolia" ~/.pi/agent/sessions/**/*.jsonl
# Sessions that used browser automation
rg -l "browser-tools|playwright|puppeteer" ~/.pi/agent/sessions/**/*.jsonl
# Sessions with code changes
rg -l '"name":"Edit"' ~/.pi/agent/sessions/**/*.jsonl
# Sessions that ran git commands
rg -l "git commit|git push" ~/.pi/agent/sessions/**/*.jsonl
# Sessions with pip/npm installs
rg -l "pip install|npm install" ~/.pi/agent/sessions/**/*.jsonl
# List all project session directories
ls ~/.pi/agent/sessions/
# Search within specific project
rg "keyword" ~/.pi/agent/sessions/--Users-sn-Projects-myproject--/ --glob "*.jsonl"
pi --session /path/to/session.jsonl
pi --continue # or pi -c
pi --resume # or pi -r
pi --export /path/to/session.jsonl output.html
pi --export /path/to/session.jsonl # outputs to stdout
#!/bin/bash
# Find sessions matching multiple criteria
TERM1="professional"
TERM2="website"
echo "🔍 Searching for sessions with '$TERM1' AND '$TERM2'..."
echo ""
MATCHES=$(rg -l "$TERM1" ~/.pi/agent/sessions/**/*.jsonl 2>/dev/null | xargs rg -l "$TERM2" 2>/dev/null)
if [ -z "$MATCHES" ]; then
echo "No matches found."
exit 0
fi
for f in $MATCHES; do
echo "📁 $(basename $(dirname $f))"
echo " $f"
# Extract first user message for context
FIRST_MSG=$(rg '"role":"user"' "$f" 2>/dev/null | head -1 | sed 's/.*"text":"//; s/".*//' | cut -c1-100)
echo " → $FIRST_MSG..."
# Show matching snippet
SNIPPET=$(rg -o "[^\"]{0,50}($TERM1|$TERM2)[^\"]{0,50}" "$f" 2>/dev/null | head -1)
echo " ✓ $SNIPPET"
echo ""
done
echo "Resume with: pi --session <path>"
cat session.jsonl | jq -r 'select(.type == "message") | select(.message.role == "user") | .message.content[0].text' 2>/dev/null
cat session.jsonl | jq -r '
if .type == "session" then "📅 \(.timestamp) | \(.cwd)"
elif .type == "message" and .message.role == "user" then "👤 \(.message.content[0].text[0:80])..."
else empty end
' 2>/dev/null | head -10
cat session.jsonl | jq -s '[.[] | select(.type == "message")] | length'
"role":"user" for your original questionsrg is faster, but grep -A5 shows context| What | Command |
|------|---------|
| Recent sessions | ls -lt ~/.pi/agent/sessions/**/*.jsonl \| head -10 |
| Sessions with errors | rg -l "error\|Error\|ERROR" ~/.pi/agent/sessions/**/*.jsonl |
| Sessions with code edits | rg -l '"name":"Edit"' ~/.pi/agent/sessions/**/*.jsonl |
| Sessions about topic | rg -l "topic" ~/.pi/agent/sessions/**/*.jsonl |
| Today's sessions | find ~/.pi/agent/sessions -name "*.jsonl" -mtime 0 |
No results?
rg -li "term"Too many results?
Slow search?
--max-count 1 to stop after first match per filedocumentation
Enrich Markdown articles with inline Wikipedia links. First mention of each notable entity gets a hyperlink. Use when asked to add wiki links, enrich, or add references to .md files.
development
Structured visual QA: screenshot → batch issues → fix all → verify. Replaces the 300-cycle screenshot→edit death spiral. Optional bishkek review as exit gate. Use when building/polishing UI with browser testing, or when user asks for N iterations/reviews.
development
Find complex code, analyze intent, recommend battle-tested library replacements. Uses radon/eslint for detection, GitHub quality search for alternatives.
research
Research real-world UI patterns from curated galleries (Collect UI, Component Gallery, Mobbin). Use when exploring what exists: dropdowns, accordions, inputs, navigation, cards, modals, etc.