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.
npx agentmods add commands/jnarowski/agentcmd/find-claude-sessiongit clone --depth 1 https://github.com/jnarowski/agentcmdWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.01035 |
| Opus 5 | $0.00005 | $0.00517 |
| Sonnet 5 | $0.00002 | $0.00207 |
| Haiku 4.5 | $0.00001 | $0.00103 |
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 today.
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.
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
.jsonlsession 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
-
Determine search scope
- If $project-path provided, search only:
$project-path/.claude/projects/_/sessions/_.jsonl - Otherwise, search all:
/Users/jnarowski/.claude/projects/*/sessions/*.jsonl
- If $project-path provided, search only:
-
Search session files
- Read each
.jsonlfile line by line - Parse JSON objects (each line is a message/event)
- Search in:
contentblocks (text, tool uses, file paths)- Tool names (
tool_useblocks) - File paths mentioned in any context
thinkingblocks if present
- Score relevance based on keyword matches and context
- Read each
-
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
-
Generate resume command
- For each match, provide the exact command:
claude --resume <session-id> --project <project-path>
- For each match, provide the exact command:
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.
- today First seen · 127 lines · 10 tokens per session scan A b3f0eebeeb7f
find-claude-session is a command published in the GitHub repository jnarowski/agentcmd (18 stars, last pushed 8mo ago), licensed MIT. It adds 10 tokens to every session and 1,035 once invoked, about $0.0001 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-09-01.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.