session-search

session-search is a skill for Claude Code, Codex from DJRHails/dotfiles. It costs 38 tokens per session (623 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Good fit Use it to locate a previous conversation about a topic, find earlier advice or code, or identify where a decision was made.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/djrhails/dotfiles/session-search
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.

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.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/djrhails/dotfiles/session-search/github.svg)](https://agentmods.dev/skills/djrhails/dotfiles/session-search)
Your own site
<a href="https://agentmods.dev/skills/djrhails/dotfiles/session-search"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/session-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/djrhails/dotfiles/session-search"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/session-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00038 $0.00623
Opus 5.5 $0.00015 $0.00249
Sonnet 5.5 $0.00008 $0.00125
Haiku 4.5 $0.00004 $0.00062

Measured 3mo ago against content hash f5e7c5c8b8bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 3d ago), licensed MIT. It adds 38 tokens to every session and 623 once invoked, about $0.0002 per session on Opus 5.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

session-search compared with skills from other repositories

session-search next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
session-searchDJRHails/dotfilesSkill23d agoMITA38Claude Code, Codex
todoist-clijoshukraine/dotfilesSkill4307d agoMITA68Claude Code
autopilot-batchjoshukraine/dotfilesSkill4307d agoMITA75Claude Code
autopilotjoshukraine/dotfilesSkill4307d agoMITA40Claude Code
qa-handoffjoshukraine/dotfilesSkill4307d agoMITA41Claude Code
walkthroughjoshukraine/dotfilesSkill4307d agoMITA33Claude Code
dustoffjoshukraine/dotfilesSkill4307d agoMITA64Claude Code