session-search

session-search is a skill for Claude Code from pchalasani/claude-code-tools. It costs 33 tokens per session (657 once invoked), scanned C, original, MIT.

A command-line workflow for searching previous coding-agent sessions for decisions, code patterns, or completed work.

In plain words
What is it for?
Use it to search session records, inspect up to three relevant files, and summarize the findings with session references.
Why use it?
It helps recover specific information from older sessions when the current agent cannot use separate helper agents.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Part of the aichat plugin — 2 skills, 1 command, 1 agent shipped together

Good fit Use it to search session records, inspect up to three relevant files, and summarize the findings with session references.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pchalasani/claude-code-tools/session-search
About the project

pchalasani/claude-code-tools is a collection of command-line tools, skills, agents, hooks, plugins, and commands for improving work with Claude Code, Codex-CLI, and similar coding agents. It is used by developers who want reusable productivity features and workflows for terminal-based AI coding assistants. The catalogue entries are components of, or extensions for, these coding-agent workflows.

pchalasani/claude-code-tools · 2,031 stars · on GitHub

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 pchalasani/claude-code-tools --skill session-search
Clone the repo
git clone --depth 1 https://github.com/pchalasani/claude-code-tools

Made for: Claude Code.

Or install aichat, the plugin that ships this one along with the rest of its 2 skills, 1 command, 1 agent.

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/pchalasani/claude-code-tools/session-search/github.svg)](https://agentmods.dev/skills/pchalasani/claude-code-tools/session-search)
Your own site
<a href="https://agentmods.dev/skills/pchalasani/claude-code-tools/session-search"><img src="https://agentmods.dev/badge/skills/pchalasani/claude-code-tools/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/pchalasani/claude-code-tools/session-search"><img src="https://agentmods.dev/badge/skills/pchalasani/claude-code-tools/session-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 657 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
SkillSpector: 2 findings, up to low

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • low Supply Chain · line 77
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
  • low Supply Chain · line 78
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
How audits are shown
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.00033 $0.00657
Opus 5.5 $0.00013 $0.00263
Sonnet 5.5 $0.00007 $0.00131
Haiku 4.5 $0.00003 $0.00066

Measured 2mo ago against content hash 9c70c233950c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

session-search scanned grade C with 2 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 2mo ago.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -LsSf https://astral.sh/uv/install.sh | sh # uv

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -LsSf https://astral.sh/uv/install.sh | sh # uv
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/aichat/skills/session-search/SKILL.md · 80 lines

How it starts

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

If you are Claude Code: Do NOT use this skill directly. Use the session-searcher subagent via the Task tool instead - it handles this more efficiently without polluting your context.

Search and find previous code agent sessions (Claude-Code or Codex-CLI) for specific work, decisions, or code patterns.

Workflow

  1. Understand the query: Identify what the user is looking for (code patterns, decisions, specific work, design direction)
  2. Search with aichat: Run aichat search --json -n 10 "[query]" (use -g "project" to filter by project)
  3. Parse results: Use jq to extract fields from JSONL output (session_id, project, created, snippet, file_path)
  4. Deep dive if needed: Read session files at ~/.claude/projects/*/[session-id].jsonl (max 3 files)
  5. Summarize: Return a focused summary with key findings and references

Run aichat search --help to see all options (date filters, branch filters, etc.) and JSONL field names.

Output Format

Return a concise summary containing:

  1. Key Findings: 2-3 bullet points answering the query
  2. Relevant Sessions: Session IDs and dates for reference
  3. Specific Content: Code snippets or quotes if directly relevant

Format as clean markdown, not raw JSON.

Example

Query: "Find sessions where we discussed authentication design"

aichat search --json -n 10 "authentication design"

Summary:

  • Session abc123 (Dec 10): Discussed JWT vs session-based auth, decided on JWT
  • Session def456 (Dec 8): Implemented refresh token rotation pattern

Constraints

  • ALWAYS use --json flag with aichat search (otherwise it spawns interactive UI)
  • NEVER return raw JSON output to the user - summarize and distill findings
  • NEVER read more than 3 session files per query
  • If no results found, suggest alternative search terms
  • ONLY report information directly observed in files - never infer or extrapolate

Error Handling

If aichat search command fails or is not found, ask user to install:

Read the full file on GitHub · 80 lines

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. 2mo ago First seen · 80 lines · 33 tokens per session scan C 9c70c233950c

Subscribe to this mod's changes

session-search is a skill published in the GitHub repository pchalasani/claude-code-tools (2,031 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 657 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

session-search compared with skills from other repositories

session-search next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
session-searchpchalasani/claude-code-toolsSkill2.0kyesterdayMITC33Claude Code
obsidianlvndry/jazzSkill55yesterdayMITA71Claude Code, Codex
knowledge-session-state-and-context-active-turn-interactions-and-recoveryechoVic/blade-codeSkill18124d agoMITA161Claude Code, Codex
knowledge-session-state-and-context-session-catalog-fork-rewind-and-exportechoVic/blade-codeSkill18124d agoMITA140Claude Code, Codex
knowledge-session-state-and-context-compaction-pipeline-and-checkpointsechoVic/blade-codeSkill18124d agoMITA144Claude Code, Codex
knowledge-session-state-and-contextechoVic/blade-codeSkill18124d agoMITA133Claude Code, Codex
contextepicsagas/epic-harnessSkill20yesterdayApache-2.0A33Claude Code