agentcmd: Command for Claude Code

.claude/commands/find-claude-session.md

find-claude-session is a command for Claude Code from jnarowski/agentcmd. It costs 10 tokens per session (1,035 once invoked), scanned A, original, MIT.

A command that searches saved Claude Code sessions for matching messages, tool use, and file paths, then returns a command to resume a session.

In plain words
What is it for?
Use it to find sessions about a project, feature, or file and get the corresponding Claude resume command.
Why use it?
It helps recover earlier work when you remember the task or files involved but not the session identifier.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument; mentions Claude Code; $skill-name invocation.

This is jnarowski/agentcmd's own configuration. It tells Claude Code how to work on agentcmd itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentcmd configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/jnarowski/.claude/projects.

Reuse

Borrowing it

Nothing to install: this file belongs to jnarowski/agentcmd. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jnarowski/agentcmd/main/.claude/commands/find-claude-session.md
Clone the repo
git clone --depth 1 https://github.com/jnarowski/agentcmd

Made for: Claude Code.

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 find-claude-session

README.md
[![agentmods](https://agentmods.dev/badge/commands/jnarowski/agentcmd/find-claude-session/github.svg)](https://agentmods.dev/commands/jnarowski/agentcmd/find-claude-session)
Your own site
<a href="https://agentmods.dev/commands/jnarowski/agentcmd/find-claude-session"><img src="https://agentmods.dev/badge/commands/jnarowski/agentcmd/find-claude-session/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 find-claude-session

Your own site · 80×15
<a href="https://agentmods.dev/commands/jnarowski/agentcmd/find-claude-session"><img src="https://agentmods.dev/badge/commands/jnarowski/agentcmd/find-claude-session.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,035 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.00010 $0.01035
Opus 5.5 $0.00004 $0.00414
Sonnet 5.5 $0.00002 $0.00207
Haiku 4.5 $0.00001 $0.00103

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

Security

Grade A, and why

find-claude-session 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 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.

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.

.claude/commands/find-claude-session.md · 127 lines

How it starts

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

Find Claude Session

Search through Claude Code session files to find specific sessions based on their content (messages, tool uses, file paths). Returns the command to resume the found session.

Variables

  • $search-description: $1 (required) - Description of what you're looking for (e.g., "sessions working on authentication", "sessions that edited config.ts", "sessions using WebSocket")
  • $project-path: $2 (optional) - Specific project path to search within. If not provided, searches all projects in /Users/jnarowski/.claude/projects

Instructions

  • Search through .jsonl session files in the Claude projects directory
  • Match against message content, tool uses, file paths, and text blocks
  • Use fuzzy/semantic matching - don't require exact keywords
  • Parse JSONL format correctly (one JSON object per line)
  • Extract relevant context snippets showing why each session matched
  • If multiple matches found, show top 5 with context
  • Return the full resume command: claude --resume <session-id> --project <project-path>

Workflow

  1. Determine search scope

    • If $project-path provided, search only: $project-path/.claude/projects/_/sessions/_.jsonl
    • Otherwise, search all: /Users/jnarowski/.claude/projects/*/sessions/*.jsonl
  2. Search session files

    • Read each .jsonl file line by line
    • Parse JSON objects (each line is a message/event)
    • Search in:
      • content blocks (text, tool uses, file paths)
      • Tool names (tool_use blocks)
      • File paths mentioned in any context
      • thinking blocks if present
    • Score relevance based on keyword matches and context
  3. Rank and present matches

    • Sort by relevance score (most matches, recency as tiebreaker)
    • For top 5 matches, extract:
      • Session ID (from filename or session metadata)
      • Project path
      • Timestamp/date of session
      • 2-3 relevant excerpts showing why it matched (truncate long messages)
    • Display results in a readable format
  4. Generate resume command

    • For each match, provide the exact command:
      claude --resume <session-id> --project <project-path>
      

Read the full file on GitHub · 127 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 · 127 lines · 10 tokens per session scan A b3f0eebeeb7f

Subscribe to this mod's changes

find-claude-session is a command published in the GitHub repository jnarowski/agentcmd (18 stars, last pushed 10mo ago), licensed MIT. It adds 10 tokens to every session and 1,035 once invoked, about $0.0000 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-09-01.

Related

find-claude-session compared with commands from other repositories

find-claude-session next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
find-claude-sessionjnarowski/agentcmdCommand1810mo agoMITA10Claude Code
setup-contextmohitagw15856/pm-claude-skillsCommand1.5kyesterdayMITA21Claude Code
brainmohitagw15856/pm-claude-skillsCommand1.5kyesterdayMITA17Claude Code
pull-learningsclosedloop-ai/claude-pluginsCommand123yesterdayApache-2.0A12Claude Code
vitaecontext-vitaegraphvitaecontext/vitaecontextCommand883d agoMITA12Claude Code
perf-difficult-conversationfrankxai/Starlight-Intelligence-SystemCommand10yesterdayMITA93Claude Code
culture-onboarding-90frankxai/Starlight-Intelligence-SystemCommand10yesterdayMITA101Claude Code