find-session
Skill4 starsChanged 21 days agoMITView on GitHub
按对话标题或正文关键词快速定位 DSH 历史会话并读取内容/统计;用于“根据对话名跟踪对话”“查找之前的会话”“查看某会话 token 消耗”等请求。
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-toolsword for word, first seen Oct 22, 2026
- Aman-Kothari7/claude-code-skillstheir own version, first seen Oct 20, 2026
- rhvdbergh/claude-skillstheir own version, first seen Oct 16, 2026
Other versions11 projects use a version of this.
Word for word · 1
- ooooooooooooooooooop/agent-tools★ 4100% same
Edited · 0
None found.
Wrote their own version · 10
- fleurytian/awesome-claude-skills★ 316same name
- WingedGuardian/skyrimvr-claude-toolkit★ 21same name
- kauffj/agent-config★ 8same 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
- Aman-Kothari7/claude-code-skills★ 0same name
- rhvdbergh/claude-skills★ 0same name
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 repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dsh-config/AGENTS.mdAGENTS.md
- chatgpt-web-bridgeSkill
- clarify-before-changeSkill
- decision-gatesSkill
- dsh-config-syncSkill
- environment-bootstrapSkill
- evolution-proposalSkill
- execution-disciplineSkill
- minimal-implementationSkill
- natural-rewriteSkill
- personal-ai-operations-reviewSkill
- publish-and-reuseSkill
- research-labSkill
- simulate-elite-expertsSkill
- skill-quality-gateSkill
- skill-repository-maintainerSkill
- subagent-execution-governanceSkill
- systematic-optimizationSkill
- task-mode-routerSkill
- unified-taskflowSkill
- world-model-runtimeSkill
- your-skill-nameSkill
The file
Files
快速定位与跟踪 DSH 会话
用于用户要求"按对话名/标题找会话""跟踪某个对话""查看某次会话内容或 token 消耗"时。统一入口是本 Skill 包内脚本 scripts/find_session.py(相对本 Skill 目录),不临场另写遍历逻辑。
路径提示:Skill 包在
~/.dsh/skills/find-session/(仓库源在skills/find-session/)。以下命令均假设当前目录为本 Skill 目录,或把scripts/find_session.py换成绝对路径~/.dsh/skills/find-session/scripts/find_session.py。
触发边界
- 适用:按标题关键词搜索会话、按正文关键词搜索会话、读取某会话消息内容、查看会话 token/时间统计、按项目或时间范围过滤。
- 不适用:修改/删除会话、DSH 内部状态变更、跨设备同步。这些不得套用本 Skill。
数据源与固定事实
- 索引:
~/.dsh/storages/session_projcache.json(title/cwd/createdAt/sessionStats/tokenUsage)。 - 内容:
~/.dsh/sessions/<项目>/<session>/session.jsonl.zstd(多帧 zstd,必须流式解压,单帧 decompress 只解第一帧)。 - 正文搜索默认只扫最近 30 个会话(全量解压 200+ 会话慢),需要全量时加
--full。
固定执行
标题搜索(快,走索引):
python scripts/find_session.py <关键词> # 列出匹配会话(按时间倒序) python scripts/find_session.py <关键词> --content # 搜索后直接读最新匹配会话内容正文全文搜索(慢,需解压):
python scripts/find_session.py --grep <关键词> # 默认最近 30 个会话 python scripts/find_session.py --grep <关键词> --full # 全量扫描按会话 id 操作:
python scripts/find_session.py --id <session-id> # 读取消息内容 python scripts/find_session.py --id <id> --stats # token/时间统计过滤与排序(标题/正文搜索均生效):
python scripts/find_session.py <关键词> --project 桌面 # 按项目路径过滤 python scripts/find_session.py <关键词> --since 2026-08-01 --until 2026-08-31 python scripts/find_session.py <关键词> --sort tokens # time|tokens|turns python scripts/find_session.py <关键词> --max 5 # 结果条数上限
输出与失败报告
- 输出完整 token 消耗(未缓存输入 + 缓存读 + 输出 + 缓存写),来自
tokenUsage.totals,不用单一 decodeTokens。 - 搜索无匹配时报告"无匹配会话",不以空结果冒充成功;会话文件缺失时给出明确提示。
- 只读操作,不改动任何会话数据。
验证
- 每次使用后核对:搜索关键词是否命中预期会话、token 统计是否与
~/.dsh/storages/session_projcache.json中tokenUsage.totals一致。 - 改动脚本后回归:至少跑一次标题搜索、一次
--grep正文搜索、一次--id --stats,确认三项路径输出正常。
脚本是唯一入口:
- find_session.py(skill 包内自带,随 Skill 同步)
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.

