agentleFS
mikeyobrienmikeyobrien/rho/skills/session-search/SKILL.md

session-search

Skill372 starsChanged 8 months agoMITView on GitHub

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

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ml-training-recipe, replication and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • getcompanion-aiSkill

    ml-training-recipe

    Find implementable ML training recipes from papers, datasets, docs, and code. Use when the user wants to fine-tune, train, reproduce, or choose a practical ML method, dataset, hyperparameter setup, or benchmark recipe.

    Also in 3 projects that use this

  • getcompanion-aiSkill

    replication

    Plan a replication of a paper, claim, or benchmark, and execute only after an explicit environment choice. Use when the user asks to replicate results, reproduce an experiment, verify a claim empirically, or build a replication package.

    Also in 3 projects that use this

  • brainbytes-devSkill

    alpha-research

    Also in 3 projects that use this

  • JaimeParkerSkill

    paper-code-audit

    Perform three-way cross-validation of a research paper by comparing the original paper text (via Zotero), official code implementation (via Git), and personal Obsidian notes. Use this skill whenever the user wants to "audit a paper", "verify paper claims against code", "cross-check notes with implementation", "triangulate paper + code + notes", "find discrepancies between paper and code", or mentions wanting a deep, structured comparison of a paper's claims against its implementation and their own notes. Also trigger when the user asks to "analyze this paper thoroughly" with code available, or when they want to systematically reconcile what the paper says, what the code does, and what their notes claim.

    Also in 3 projects that use this

  • JimLiuSkill

    pdf-explore

    Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs content from more than one place in it: summarize the methods or any other section, compare sections, find where a topic is discussed, read a value or label off a figure or chart, or find/list/extract every instance of something across the whole document (datasets, benchmarks, citations, figures, table rows, accession numbers — including appendices). Skip it only for a single lookup of 1–4 pages quoted in your very next response — `read_file(pages=[...])` attaches pages as images that are dropped from context after one turn, so multi-section answers end up re-reading the same ranges repeatedly. Parses the PDF once in the Python kernel: `pdf_pages` (pages as persistent text), `pdf_outline` (TOC), `pdf_scan` (rank pages by relevance), `pdf_map`/`pdf_extract` (per-page summary / structured fields via parallel haiku calls). For PDF creation/manipulation, use reportlab/pypdf directly.

    Also in 3 projects that use this

  • composio-communitySkill

    weekly-digest

    Generate a weekly support digest and post it to [Slack](https://composio.dev/toolkits/slack)

    Also in 3 projects that use this

  • +1 more from getcompanion-ai

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

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

    line 9
  2. Distinctive:

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

    line 19
  3. Distinctive:

    Search the digest markdown:

    line 44
  4. Very specific:

    If session-digest reports secrets, do NOT paste results into public logs.

    line 52
  5. Distinctive:

    Search the raw session logs directly:

    line 56
  6. Distinctive:

    Prefer Method A first: it surfaces warnings via secret scanning.

    line 85
  7. Very specific:

    If you need to share excerpts, redact aggressively and re-run session-digest to confirm no secrets are present.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.