К основному содержанию
скилл CX Codex

cline-session-history — скилл для Claude Code

Ищет и просматривает историю сессий Cline на локальной машине. Нужен, когда надо найти старый диалог, прочитать транскрипт или экспортировать сессии.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add cline/skills --skill cline-session-history -a claude-code
npx skills add cline/skills --skill cline-session-search -a claude-code
Открыть на GitHub

Что делает cline-session-history

Скилл ищет сессии Cline по времени, тексту исходного промпта, статусу, модели, провайдеру, источнику, режиму, рабочей директории и другим признакам. Он умеет показать полный промпт или транскрипт, ограничить число сообщений, отфильтровать типы содержимого и выгрузить найденные файлы в каталог.

Внутри есть скрипт scripts/search_sessions.py, который нужно разрешать относительно каталога самого скилла. Метаданные и сообщения обычно лежат в ~/.cline/data/sessions/, а старые записи могут находиться в SQLite-базе sessions.db. Для нестандартных путей предусмотрены --sessions-dir и --db-path; при необходимости базу можно исключить флагом --no-db. Без доступа к этим локальным файлам поиск сессий не сработает.

Какие задачи решает

  • найти сессию по фрагменту промпта
  • отобрать завершённые или неудачные сессии
  • прочитать полный транскрипт диалога
  • экспортировать сессии за период в каталог
  • отфильтровать сессии по модели и рабочей директории

Примеры запросов агенту

  • Найди мою сессию за последний час, где в промпте упоминается chatgpt, и покажи полный промпт.
  • Покажи полный транскрипт сессии 1781991507587_pozk0, оставив только текст и вызовы инструментов.
  • Экспортируй сессии за последний день в ~/tmp/exported-sessions.

Как установить cline-session-history

1Через Skills CLI (Vercel)

npx skills add cline/skills --skill cline-session-history -a claude-code
npx skills add cline/skills --skill cline-session-search -a claude-code

2Вручную: положить файлы

~/.claude/skills/cline-session-search/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/cline-session-search/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о cline-session-history

Как установить cline-session-history в Claude Code?

Выполните по порядку: npx skills add cline/skills --skill cline-session-history -a claude-code, затем npx skills add cline/skills --skill cline-session-search -a claude-code, после чего проверьте файл ~/.claude/skills/cline-session-search/SKILL.md.

Что делает cline-session-history?

Он ищет сессии Cline по фильтрам, показывает метаданные и транскрипты, а также экспортирует совпавшие файлы в каталог.

Где скилл ищет историю Cline?

Основной каталог сессий — ~/.cline/data/sessions/. Старые записи могут храниться в sessions.db; для собственных путей есть --sessions-dir и --db-path.

Исходный текст

SKILL.md · Apache-2.0
---
name: cline-session-history
description: Search and browse Cline session history. Use when the user asks to find, list, inspect, or export Cline sessions by time period, prompt content, status, model, provider, source, mode, workspace, or other criteria. Also use when the user wants to read a session transcript or export sessions to a directory. Trigger phrases include "find my session", "search my session history", "show me past sessions", "what was that session where", "find the session that started with", and any mention of past Cline conversations.
---

# Cline Session History

Search and browse Cline session history stored on the local machine. Sessions live in `~/.cline/data/sessions/` as individual JSON metadata files and conversation transcript (`.messages.json`) files. Older sessions may also be in a `sessions.db` SQLite database.

## When to Use This Skill

- "Find my session from the last hour about..."
- "Find my session that started with this prompt..."
- "Find the session where I asked about..."
- "Show me sessions that used model X"
- "What sessions failed yesterday?"
- "Show me the transcript for session <id>"
- "Export sessions from last week to a folder"
- "What was that session where..."
- Any request involving past Cline conversation history

## How to Use

The search script lives alongside this file at `scripts/search_sessions.py`, relative to the skill's own directory. Resolve it against the directory that contains this `SKILL.md` — **not** the current working directory — so it works regardless of where the command is run from.

**Script path:** `scripts/search_sessions.py` (relative to this skill's directory)

The examples below use `scripts/search_sessions.py`; prefix it with the skill directory's absolute path when running from elsewhere.

All filters are optional and combine with AND logic.

### Quick Examples

```sh
# Sessions from the last 10 minutes
python3 scripts/search_sessions.py --since 10m

# Sessions between two dates with "chatgpt" in the prompt
python3 scripts/search_sessions.py --since 2026-06-01 --until 2026-06-21 --prompt chatgpt

# Find a session by its starting prompt (quoted substring match)
python3 scripts/search_sessions.py --since 1d --prompt "find some code that should be improved" --full-prompt

# Non-interactive sessions that failed
python3 scripts/search_sessions.py --no-interactive --status failed

# VS Code extension sessions using Claude models, full prompts
python3 scripts/search_sessions.py --source vscode --model "claude" --full-prompt

# Full transcript of a specific session
python3 scripts/search_sessions.py --session-id 1781991507587_pozk0 --transcript

# Export matching sessions to a directory
python3 scripts/search_sessions.py --since 1d --export ~/tmp/exported-sessions
```

### Time Filters

Both `--since` and `--until` accept:

- **Relative**: `10m`, `30min`, `2h`, `1d`, `1w` (minutes, hours, days, weeks)
- **ISO 8601**: `2026-06-20`, `2026-06-20T21:30:00Z`, `2026-06-20T21:30:00+00:00`

### All Available Filters

| Filter | Description |
|--------|-------------|
| `--since <time>` | Sessions started after this time |
| `--until <time>` | Sessions started before this time |
| `--prompt <text>` | Case-insensitive substring search in prompt |
| `--prompt-regex <pattern>` | Regex search in prompt (case-insensitive) |
| `--status <status>` | `running`, `idle`, `completed`, `cancelled`, `failed` |
| `--source <source>` | `cli`, `vscode`, etc. (exact match) |
| `--provider <name>` | Provider name, exact match (e.g. `cline`) |
| `--model <text>` | Model name substring, case-insensitive (e.g. `claude`) |
| `--mode <mode>` | `plan` or `act` |
| `--cwd <path>` | Working directory substring match |
| `--session-id <id>` | Exact session ID lookup |
| `--interactive` / `--no-interactive` | Filter by interactive flag |
| `--team-only` / `--no-team` | Filter by team session flag |
| `--subagents` / `--no-subagents` | Include/exclude subagent sessions |

### Output Options

| Option | Description |
|--------|-------------|
| `--full-prompt` | Show full prompt text instead of truncated |
| `--transcript` | Print full conversation transcript |
| `--max-messages <n>` | Limit messages in transcript output |
| `--content-types <types>` | Comma-separated: `text,thinking,tool_use,tool_result,image` |
| `--export <dir>` | Copy matching session files to a directory |
| `--limit <n>` | Max number of sessions to return |
| `--json` | Output as JSON |

### Data Source Options

| Option | Description |
|--------|-------------|
| `--sessions-dir <path>` | Custom sessions directory (default: `~/.cline/data/sessions`) |
| `--db-path <path>` | Custom sessions.db path |
| `--no-db` | Skip SQLite DB, only scan JSON files |

## Workflow

1. Start by running the search with the user's criteria to get a list of matching sessions.
2. If the user wants to see details, use `--full-prompt` or `--transcript`.
3. For transcript inspection, consider `--max-messages` and `--content-types` to focus on relevant parts.
4. For bulk export, use `--export <dir>` to copy session files.

## Session Data Structure

Each session on disk has:
- `<session_id>.json` — Metadata: session_id, started_at, status, source, provider, model, cwd, prompt, metadata (mode, systemPrompt, cost, usage), etc.
- `<session_id>.messages.json` — Full conversation transcript with messages containing content blocks (text, thinking, tool_use, tool_result, image).

The SQLite `sessions.db` may contain older sessions with similar fields plus `transcript_path`, `hook_path`, `parent_session_id`, `agent_id`, `is_subagent`.

© cline · Apache-2.0 · cline/skills

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
session-history rohitg00 Показывает историю недавних сессий проекта в виде временной шкалы. Нужен, чтобы быстро восстановить прошлую работу. CX Codex +1 13 900установок claude-history-ingest Ar9av Переносит историю сессий Claude Code в базу знаний Obsidian в виде готовых заметок. Пригодится, чтобы сохранять контекст проектов и наработки из чатов. CX Codex +1 3 000установок codex-history-ingest Ar9av Разбирает логи сессий Codex CLI и складывает из них страницы Obsidian. Пригодится, если накопились сотни rollout-файлов, а знаний из них не достать. CX Codex +1 2 600установок session-to-skill entireio Превращает сессии и чекпоинты Entire в черновик скилла: берёт повторяющийся рабочий процесс и описывает его как будущее поведение агента. CX Codex +1 426установок recall arjunkmrm Ищет по истории сессий Claude Code, Codex, pi и Grok полнотекстовым поиском с ранжированием BM25. Пригодится, когда нужно вспомнить, что вы уже обсуждали с агентом. CX Codex +1 579установок cline-sdk cline Скилл помогает писать агентов на базе Cline SDK: выбирать между Agent и ClineCore, настраивать инструменты и подписываться на события. CX Codex +1 4 700установок

Из того же набора29

cosmosdb-best-practices Скилл по оптимизации Azure Cosmos DB с набором из 73 правил по партиционированию, индексам, запросам и SDK. Помогает ревьюить и рефакторить код работы с базой. CX Codex +1 859установок windsor-ai-business-data Помогает агенту запрашивать бизнес-данные из маркетинговых сервисов, CRM и e-commerce через Windsor.ai. Пригодится при сборке дашбордов и отчётов. CX Codex +1 845установок teamcity-cli Скилл учит агента гонять сборки TeamCity через CLI: смотреть логи упавших билдов, разбирать цепочки зависимостей, править пайплайны. CX Codex +1 741установок dsql Скилл для работы с Amazon Aurora DSQL: схемы, запросы, миграции, планы запросов и массовая загрузка данных прямо из агента. CX Codex +1 735установок dr-bedrock Разбирает ошибки авторизации и региона AWS Bedrock в Cline CLI: находит причину и подсказывает, что поправить. CX Codex +1 692установок sap-fiori-add-visual-filter Скилл добавляет в SAP Fiori Elements визуальные фильтры с диаграммами Bar или Line. Он пригодится при настройке панели фильтров или окна выбора значений для OData V4. CX Codex +1 680установок spanner-data Скилл для изучения структуры Google Cloud Spanner и запуска SQL-запросов. Помогает просматривать таблицы, графы и выполнять выборки данных. CX Codex +1 666установок gcp-to-aws Проводит миграцию рабочих нагрузок с Google Cloud на AWS в шесть фаз: от инвентаризации ресурсов до генерации артефактов и оценки затрат. CX Codex +1 647установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой