session-search — скилл для Claude Code: что делает и как установить
Ищет прошлые диалоги с агентом через граф session-brain и загружает стенограмму в текущую беседу. Пригодится, чтобы вспомнить решение давней задачи.
npx skills add Ar9av/obsidian-wiki --skill session-search -a claude-codeЧто делает session-search
Скилл выполняет поиск по сохранённым сессиям агента через команду obsidian-wiki sessions-query. Ранжирование объединяет четыре фактора: косинусное сходство TF-IDF, общий кластер тем, флаги закладок и затухание по времени с полураспадом 90 дней. Кластерный анализ выводит наверх нужную сессию, даже если ключевое слово не встречалось в ней дословно.
Результаты выводятся компактной таблицей с названием проекта, датой и причиной совпадения. Контекст загружается максимум для трёх сессий. Скилл проверяет наличие локальных расширений claude-session-load или bookmark-load в каталоге ~/.claude/skills/. Если их нет, агент читает данные через obsidian-wiki sessions-show либо фильтрует реплики пользователя скриптом на Python.
Без предварительно собранного файла graph.json поиск завершится с ошибкой. При возрасте графа более 7 дней инструмент предложит сборку заново, но не запустит её сам. Если у сессии стоит флаг loadable: false, её стенограмма уже стёрта с диска: агент честно сообщит об этом и ответит только по сохранившимся текстам промптов.
Какие задачи решает
- найти сессию агента по теме давней задачи
- загрузить стенограмму прошлого разговора в текущий контекст
- проверить дату последней работы над конкретной фичей
- отфильтровать реплики человека из многомегабайтного лога JSONL
Примеры запросов агенту
- В какой из прошлых сессий мы настраивали сборку через Docker?
- Найди сессию по проекту auth и подгрузи её контекст
- Когда в последний раз обсуждалась миграция базы данных?
Как установить session-search
1Через Skills CLI (Vercel)
npx skills add Ar9av/obsidian-wiki --skill session-search -a claude-code2Вручную: положить файлы
~/.claude/skills/session-search/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/session-search/
1Через Skills CLI (Vercel)
npx skills add Ar9av/obsidian-wiki --skill session-search -a codex2Вручную: положить файлы
.agents/skills/session-search/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Ar9av/obsidian-wiki --skill session-search -a cursor2Вручную: положить файлы
.cursor/skills/session-search/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Ar9av/obsidian-wiki session-search2Вручную: положить файлы
.github/skills/session-search/SKILL.md1Через Skills CLI (Vercel)
npx skills add Ar9av/obsidian-wiki --skill session-search -a gemini-cli2Командой платформы
gemini skills install https://github.com/Ar9av/obsidian-wiki --path .skills/session-searchВручную: положить файлы
.devin/skills/session-search/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Ar9av/obsidian-wiki --skill session-search -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о session-search
Как установить session-search в Claude Code?
Выполните в терминале команду npx skills add Ar9av/obsidian-wiki --skill session-search -a claude-code.
Что делает скилл session-search?
Он запрашивает граф session-brain по теме, находит подходящие диалоги из истории и переносит их стенограмму в текущий диалог.
Что произойдёт, если стенограмма сессии удалена с диска?
Сессии со статусом loadable: false остаются только в истории. Скилл предупредит об отсутствии полной стенограммы и построит ответ по сохранившемуся тексту пользовательских промптов.
Исходный текст
SKILL.md · MIT
---
name: session-search
description: >
Search the session-brain graph for a past agent session by topic and load the winning transcript into the current conversation. Use for finding which session handled X, when Y was last worked on, or whether this was done before. Read-only; requires a session-brain graph.
---
# Session Search
Answers "which of my past sessions was about X" and then pulls that session's context in.
## Step 1: Check the graph exists and is fresh
```bash
obsidian-wiki sessions-query "<topic>" --json
```
If this exits 1 with "run sessions-build first", tell the user and offer `/session-brain`. If
`graph.json` is more than ~7 days old, mention it and offer a rebuild — but **do not silently
rebuild**, since that is a multi-second operation the user did not ask for.
## Step 2: Rank
The scoring already combines four signals, so take the ordering as given rather than re-ranking:
- **similarity** — TF-IDF cosine against the session's text
- **cluster lift** — a session inside the best-matching topic scores higher even if its own words
never matched. This is why a session that never said "telemetry" can still surface for it.
- **bookmark boost** — a human already flagged this session as worth keeping
- **time decay** — 90-day half-life, applied with a floor so an old exact match still outranks a
fresh weak one
Useful filters: `--project NAME`, `--cluster N`, `--since DATE`, `--top N`.
## Step 3: Present
Show the top ~5 as a compact table — title, project, date, topic, and the `why` string, which
already explains the match. Do not dump the raw JSON at the user.
Two things must be stated honestly rather than glossed over:
- Entries with `loadable: false` are **history-only**: the transcript has been pruned from disk
and only the prompts survive. They are listed in `unloadable` with a reason. Say the transcript
is gone; do not imply it can be retrieved.
- If everything relevant is unloadable, answer from the prompt text that *is* there and say that
is all that remains.
## Step 4: Load — hand off, do not reimplement
`should_load` holds at most 3 session ids worth opening, already filtered to ones with
transcripts.
**Prefer an existing loader skill if the user has one installed:**
- `claude-session-load` — loads a Claude session by id
- `bookmark-load` — use when the hit is bookmarked
⚠️ Those skills live in the user's personal skills directory (`~/.claude/skills/`), **not in this
repo**. They may not exist. Do not assume them and do not error if they are absent — fall back to
reading the transcript directly:
```bash
# the path is in the query result as `transcript`
obsidian-wiki sessions-show <session-id> --pretty
```
The transcript is JSONL and can be tens of MB. **Never read one whole.** Filter to the human turns
first:
```bash
grep -c '' <transcript> # size check before anything else
python3 -c "
import json,sys
for line in open(sys.argv[1], errors='replace'):
try: r = json.loads(line)
except ValueError: continue
if r.get('type')=='user' and not r.get('isSidechain') and not r.get('isMeta'):
c = (r.get('message') or {}).get('content')
if isinstance(c,str) and not c.lstrip().startswith('<'): print('>', c[:400])
" <transcript>
```
## Step 5: Answer
Synthesise from what you loaded and cite the session ids you used. If the answer came from a
history-only session's prompts rather than a real transcript, say so — the user needs to know how
much of the context you actually have.
## Related
- `/session-brain` — build or refresh the graph, survey and name topics
- `wiki-query` — search compiled vault knowledge; this skill searches raw session history instead
- `wiki-agent` — pull a topic out of *another* agent's history and distil it into the vault
© Ar9av · MIT · Ar9av/obsidian-wiki