find-session
Skill0 starsChanged 27 days agoMITView on GitHub
Search past Claude Code sessions by keyword and produce a resume command for the one you pick. Use when the user wants to find, recall, or resume an earlier session, or asks whether something was discussed before. Filters to the current repo by default.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- WingedGuardian/x4-ai-toolkittheir own version, first seen Nov 8, 2026
- WingedGuardian/skyrimvr-claude-toolkittheir own version, first seen Nov 8, 2026
- theyoungastronauts/polaristheir own version, first seen Nov 1, 2026
- ooooooooooooooooooop/agent-toolstheir own version, first seen Oct 22, 2026
- ooooooooooooooooooop/personal-aitheir own version, first seen Oct 22, 2026
- Aman-Kothari7/claude-code-skillstheir own version, first seen Oct 20, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- fleurytian/awesome-claude-skills★ 316same name
- WingedGuardian/skyrimvr-claude-toolkit★ 21same name
- kauffj/agent-config★ 8same name
- ooooooooooooooooooop/agent-tools★ 4same name
- ooooooooooooooooooop/personal-ai★ 4same name
- theyoungastronauts/polaris★ 4same name
- FooJiaYin/dev-skills★ 2same name
- LiozShor/claude-code-skills★ 2same name
- WingedGuardian/x4-ai-toolkit★ 2same name
- wardawgmalvicious/agent-config★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- arch-reviewSkill
- explain-diffSkill
- explainSkill
- prep-compactSkill
- prep-prSkill
- prune-commentsSkill
- remove-commentsSkill
- resume-planSkill
- review-pr-comments-loopSkill
- review-pr-commentsSkill
- runbookSkill
- session-review-loopSkill
- session-reviewSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
If the user passed no pattern, ask for one in plain text and stop until they answer.
- Distinctive: line 30
Do not guess a pattern from the conversation.
- Very specific: line 53
If the output is No matches for: <pattern>, tell the user, and suggest a shorter or less specific pattern.
- Very specific: line 58
Default: keep only results whose cd path ends in /<repo>, or contains /<repo>/ (this keeps worktrees of the same repo).
- Distinctive: line 69
If more than 4 results survive the filter, say how many there are, and suggest a narrower pattern.
- Distinctive: line 80
Read the user's prompts from it to build the summary:
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
find-session
Find an earlier Claude Code session that mentions a pattern, then hand the user the command to resume it.
This skill wraps the claude-find script (~/.local/bin/claude-find, alias cf),
which searches the JSONL session logs under ~/.claude/projects/.
You cannot resume a session yourself. claude --resume needs a fresh terminal.
The skill ends by printing the command for the user to run.
Arguments
/find-session <pattern> [all]
<pattern>— a ripgrep regex, matched case-insensitively. Required.all— skip the repo filter and search every project.
Steps
1. Get the pattern
If the user passed no pattern, ask for one in plain text and stop until they answer. Do not guess a pattern from the conversation.
2. Determine repo context
Run:
basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "no-repo"Store the result as <repo>.
3. Search
Run:
claude-find "<pattern>" 25Each result block holds a title, a cd <cwd>; claude --resume <id> line, and a
snippet. Results are newest-first by session mtime.
If the output is No matches for: <pattern>, tell the user, and suggest a shorter or
less specific pattern. Stop here.
4. Filter
- Default: keep only results whose
cdpath ends in/<repo>, or contains/<repo>/(this keeps worktrees of the same repo). - If the user passed
all, or<repo>isno-repo: keep everything. - If the filter leaves zero results: say so, then show the unfiltered list instead.
5. Present options
Take the first 4 results. Use AskUserQuestion to let the user pick one. Label each
option with the session title. Put the snippet in the option description, trimmed to
one readable line — strip the JSON escaping so it reads as text.
If more than 4 results survive the filter, say how many there are, and suggest a narrower pattern.
6. Summarize the pick
The session file is ~/.claude/projects/<slug>/<id>.jsonl. Find it with:
ls ~/.claude/projects/*/<id>.jsonlRead the user's prompts from it to build the summary:
jq -r 'select(.type=="user") | .message.content
| if type=="string" then . else [.[] | select(.type=="text") | .text] | join(" ") end' \
<file> 2>/dev/null | head -20.message.content is a string on some records and an array of blocks on others, so the
if branch is needed. The first entries are often slash-command scaffolding rather than
the user's words — skip lines that start with <command or Base directory for this skill.
Give a 2–4 sentence summary: what the session was about, what was decided, and where it appeared to stop.
7. Print the resume command
End with the resume command on its own line, in a bash block, so the user can copy it:
cd <cwd>; claude --resume <id>Tell the user to run it in a new terminal.
Notes
- The search covers the raw session log, so it matches tool output and file contents, not only what the user typed. A common word returns noise. Prefer a distinctive term.
- Claude Code deletes old session logs on a retention schedule. A session that this skill cannot find may already be gone.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

