session-search

A search tool for finding earlier Claude Code and Pi agent conversations by keyword. It searches saved session transcripts and related planning files.

In plain words
What is it for?
Use it to locate a previous conversation about a topic, find earlier advice or code, or identify where a decision was made.
Why use it?
It removes the need to open old session files one by one when you need to recover a past discussion or decision.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/djrhails/dotfiles/session-search
Any agent
npx skills add DJRHails/dotfiles --skill session-search
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.00623
Opus 5 $0.00019 $0.00311
Sonnet 5 $0.00008 $0.00125
Haiku 4.5 $0.00004 $0.00062

Measured 2d ago against content hash f5e7c5c8b8bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/search.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

modules/agents/skills/session-search/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Search across all Claude Code session transcripts (every ~/.claude*/ config dir — .claude, .claude-ant, etc. — plus ~/.agents/) and Pi agent sessions (~/.pi/agent/sessions/), including Pi artifacts (plans, context docs, etc.).

When to use

  • User asks "which session did we talk about X?"
  • User wants to find a previous conversation by topic
  • User needs to recall advice, code, or decisions from past sessions

Usage

Run the helper script with a quoted search query:

python3 ~/.claude/skills/session-search/scripts/search.py "your search terms"

All terms must appear in the same text block for a match (AND logic).

Options

Flag Default Purpose
--project <str> all Filter to project dirs containing this string
--context <n> 200 Characters of context around each match
--limit <n> 10 Max sessions to display

Examples

# Find sessions discussing margin notes
python3 ~/.claude/skills/session-search/scripts/search.py "margin notes"

# Narrow to a specific project
python3 ~/.claude/skills/session-search/scripts/search.py "LoRA" --project kb

# More context, more results
python3 ~/.claude/skills/session-search/scripts/search.py "deploy" --context 400 --limit 20

Output

For each matching session the script prints:

  • Session ID and resume command (claude::resume <id> — cd's into the session's original directory and resumes via the owning config profile; defined in modules/claude/aliases.zsh)
  • Date, project, and the original prompt
  • Up to 3 matching snippets with role labels and line numbers

Notes

  • Searches ~/.claude*/projects/ (all config-dir variants), ~/.agents/projects/, and ~/.pi/agent/sessions/ for session transcripts
  • History index from every ~/.claude*/history.jsonl plus ~/.agents/history.jsonl
  • Pi sessions are identified with [pi] label and resume via pi::resume <id> (cd's into the session's directory, then pi --session <id>; defined in modules/pi/aliases.zsh)
  • Pi artifacts (markdown files under artifacts/) are also searched and labelled (pi artifact: <name>)
  • Searches text content from user and assistant messages (skips tool calls, binary data, etc.)
  • Subagent files are not searched (only top-level session files)

Read the full file on GitHub · 63 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 38 tokens per session scan A f5e7c5c8b8bf

Subscribe to this mod's changes

session-search is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed 8d ago), licensed MIT. It adds 38 tokens to every session and 623 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens

todoist-cli

Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI. Use when the user wants to view, create, update, complete, or organize Todoist items, or mentions tasks, inbox, today, upcoming, projects, labels, or filters.

joshukraine/dotfiles · 68 tokens

autopilot

Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).

joshukraine/dotfiles · 40 tokens

qa-handoff

Generate a hands-on QA testing guide as a self-contained HTML page — for Rails apps or static (Hugo) sites. --publish uploads the HTML to the project's configured QA host.

joshukraine/dotfiles · 41 tokens

walkthrough

Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.

joshukraine/dotfiles · 33 tokens

dustoff

Assess a project that's been dormant for months and produce a prioritized re-entry plan — lifecycle stage, what's stale or broken, and how far the project's tooling has drifted from current conventions — delegating every fix to the skill that owns it, and optionally capturing the plan as a tracking issue that survives…

joshukraine/dotfiles · 64 tokens