find-session
Skill0 starsChanged 3 months agoMITView on GitHub
List or search recent Claude Code sessions with their IDs, original launch directories, and last-active times, so you can resume the right one. Searches full conversation bodies, so it finds a topic discussed mid-session. Use when you need to find or resume a past session by recency, directory, branch, work item, or keyword.
12 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 versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- 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
2 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 repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- buildSkill
- cleanup-worktreeSkill
- db-querySkill
- db-searchSkill
- dd-errorsSkill
- devops-wiki-updateSkill
- devops-workitem-createSkill
- devops-workitem-readSkill
- devops-workitem-updateSkill
- finalize-taskSkill
- find-codeSkill
- merge-mainSkill
- panel-review-fixSkill
- panel-reviewSkill
- prSkill
- rebase-mainSkill
- starttaskSkill
- testSkill
- ask-codexSkill
- ask-geminiSkill
- councilSkill
- dailySkill
- merged-prsSkill
- mm-notifySkill
- optimize-promptSkill
- qSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
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
- Very specific: line 83
No matches / no sessions: If the helper returns nothing with a filter, say so and offer to list recent sessions instead (re-run with no …
- Very specific: line 85
If ~/.claude/projects doesn't exist, tell the user no sessions are tracked yet.
- Distinctive: line 109
Only lines whose raw text contains the needle get parsed as JSON, which keeps the scan fast (~1-3s over ~175 MB / ~95 transcripts, incl.
“Common” is measured: kept by at least 6 in 10 of the 9 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
Lists recent Claude Code sessions (or searches them) using the
Get-ClaudeSessions.ps1 helper in this skill directory. The helper reads each
session transcript under ~/.claude/projects/ and reports, per session:
its session ID, original launch directory (where it must be resumed
from), last-active time, git branch, and first prompt.
With -Match, it also scans every message in the transcript, so a topic
raised in the middle of a long session is found — not just one named in the
opening prompt.
Instructions
Run the helper. It lives next to this file. Pass
$ARGUMENTSas the-Matchfilter when the user gave a search term; omit it to list the most recent sessions.# List the 15 most recently active sessions & "$env:USERPROFILE\.claude\skills\find-session\Get-ClaudeSessions.ps1" -Limit 15 # Search everything — id, dir, branch, first prompt, and full conversation & "$env:USERPROFILE\.claude\skills\find-session\Get-ClaudeSessions.ps1" -Match "$ARGUMENTS" -Limit 15Always pass
-ExcludeSession <current session id>when searching. The live conversation contains the search term by definition — the user just typed it — so without this it ranks first and buries the real answer. Take the id from the scratchpad path in your system prompt (the UUID segment).& "$env:USERPROFILE\.claude\skills\find-session\Get-ClaudeSessions.ps1" ` -Match "$ARGUMENTS" -ExcludeSession '<this-session-uuid>' -Limit 15A full-corpus body scan takes ~1-3s. Add
-HeadOnlyto restrict the match to id / dir / branch / first prompt if you only want to identify a session by where it ran.Display the returned objects as a clear list, best match first. The launch directory is the single most important field — it's where the user must
cdbefore resuming. For each session show:<ShortId> — "<Summary>" Launch dir : C:\work\12345_ShortTitle ← cd here to resume Branch : feature/12345_ShortTitle Last active : 2026-06-16 14:02 (0d 2h ago) Mentioned : 2026-06-16 13:41 (16 times, last by assistant) Context : "...<Snippet>..." Resume : cd "C:\work\12345_ShortTitle"; claude --resume <full SessionId>Report
LastMentionwhen it's present — for "when did we last discuss X" that is the answer, and it can differ a lot fromLastActive(a session touched today for unrelated work may have discussed the term days ago). Quote theSnippetso the user can confirm it's the thread they meant.The helper emits a ready-to-paste
ResumeCmd. You can also format the raw objects directly, e.g.... | Format-Table ShortId, MatchedIn, MatchHits, LastMention, Branch, Summary -AutoSize -Wrap.Rank and qualify by
MatchedIn. Results are already ordered so real mentions come first, but say which kind each is:MatchedInMeaning Headid / launch dir / branch / first prompt Bodysaid in conversation by the user or Claude — the strongest signal Head+Bodyboth Toolonly inside tool traffic (a grep result, an API response, a file read) — usually incidental, e.g. a /dailyrun that swept the transcripts. Mention these as "possibly incidental", don't lead with them.MatchHitscounts spoken occurrences;ToolHitscounts tool traffic.- No matches / no sessions. If the helper returns nothing with a filter,
say so and offer to list recent sessions instead (re-run with no
-Match). If~/.claude/projectsdoesn't exist, tell the user no sessions are tracked yet.
Notes
- Last-active comes from the transcript file's modified time — the real signal for "which session did I touch most recently."
- Subagent sidechain transcripts (
agent-*.jsonl) and empty/aborted sessions are excluded automatically. - The per-directory
sessions-index.jsonfiles are unreliable placeholders in this environment, so the helper deliberately reads the transcripts directly. - Don't hand-roll this with
rg/Select-Stringover the.jsonlfiles. The helper exists because raw grep on transcripts is wrong in three ways, all observed in practice:- False positives — a bare number matches metadata. Searching
12345"hit" a session that never discussed it: the digits sit inside the message UUIDc1234567-.... Token counts and request ids collide the same way. The helper only matches inside message content. - Injected context — every session carries
CLAUDE.md/MEMORY.mdinside<system-reminder>blocks, so grepping any term those files mention matches nearly every session. The helper strips those blocks before counting. - Missed files —
Select-String -Listsilently skipped a transcript holding 13 occurrences (very long single-line JSON). The helper's per-lineIndexOfscan does not.
- False positives — a bare number matches metadata. Searching
- Only lines whose raw text contains the needle get parsed as JSON, which keeps the scan fast (~1-3s over ~175 MB / ~95 transcripts, incl. a 46 MB one).
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.

