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 skills add ooooooooooooooooooop/agent-tools --skill find-sessiongit clone --depth 1 https://github.com/ooooooooooooooooooop/agent-toolsWrote 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.
[](https://agentmods.dev/skills/ooooooooooooooooooop/agent-tools/find-session)<a href="https://agentmods.dev/skills/ooooooooooooooooooop/agent-tools/find-session"><img src="https://agentmods.dev/badge/skills/ooooooooooooooooooop/agent-tools/find-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.
<a href="https://agentmods.dev/skills/ooooooooooooooooooop/agent-tools/find-session"><img src="https://agentmods.dev/badge/skills/ooooooooooooooooooop/agent-tools/find-session.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.00929 |
| Opus 5.5 | $0.00021 | $0.00372 |
| Sonnet 5.5 | $0.00011 | $0.00186 |
| Haiku 4.5 | $0.00005 | $0.00093 |
Grade A, and why
find-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 3mo 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.
What it actually says
快速定位与跟踪 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 同步)
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3mo ago First seen · 69 lines · 53 tokens per session scan A c55006e12818
find-session is a skill published in the GitHub repository ooooooooooooooooooop/agent-tools (3 stars, last pushed 2mo ago), licensed MIT. It adds 53 tokens to every session and 929 once invoked, about $0.0002 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-08-31.
find-session compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| find-sessionooooooooooooooooooop/agent-tools | Skill | 3 | 2mo ago | MIT | A | 53 | Codex |
| context-enginealirezarezvani/claude-skills | Skill | 31k | yesterday | MIT | A | 50 | Claude Code |
| learn-from-fixoliver-kriska/claude-elixir-phoenix | Skill | 580 | today | MIT | A | 46 | Claude Code |
| recalloliver-kriska/claude-elixir-phoenix | Skill | 580 | today | MIT | A | 64 | Claude Code |
| assigns-auditoliver-kriska/claude-elixir-phoenix | Skill | 580 | today | MIT | A | 47 | Claude Code |
| compound-docsoliver-kriska/claude-elixir-phoenix | Skill | 580 | today | MIT | A | 38 | Claude Code |
| handoffREMvisual/claude-handoff | Skill | 89 | 23d ago | MIT | A | 39 | Claude Code |