recover-context — скилл для Claude Code: восстановление контекста и установка
Скилл собирает контекст последней задачи из родительской сессии и отмечает её состояние, решения и следующие шаги. Нужен, когда продолжаете работу с сохранённой цепочкой сессий.
npx skills add pchalasani/claude-code-tools --skill recover-context -a claude-codeЧто делает recover-context
Скилл находит последнюю родительскую сессию в цепочке и извлекает из неё текущую задачу, её состояние, принятые решения и ожидающие шаги. Также он проверяет связанные документы и изменявшиеся файлы, например заметки о задаче и рабочие журналы.
Чтобы не загружать большой файл сессии в основной контекст, скилл поручает поиск субагенту session-searcher, а без поддержки субагентов использует aichat:session-search. В результате пользователь получает краткое описание контекста, список подходящих файлов и вопрос о том, как продолжить. Для работы нужна цепочка сессий в первом сообщении; без неё скиллу не из чего выбирать родительскую сессию.
Какие задачи решает
- восстановить последнюю задачу из родительской сессии
- понять, завершена ли задача или ещё выполняется
- найти упомянутые спецификации и рабочие файлы
- выяснить следующие шаги и принятые решения
Примеры запросов агенту
- Восстанови контекст последней задачи из цепочки сессий и перечисли связанные файлы.
- Посмотри последнюю родительскую сессию: что делали и какие шаги остались?
- Найди решения и текущий статус задачи, затем спроси, как продолжить.
Как установить recover-context
1Через Skills CLI (Vercel)
npx skills add pchalasani/claude-code-tools --skill recover-context -a claude-code2Вручную: положить файлы
~/.claude/skills/recover-context/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/recover-context/
1Через Skills CLI (Vercel)
npx skills add pchalasani/claude-code-tools --skill recover-context -a codex2Вручную: положить файлы
.agents/skills/recover-context/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add pchalasani/claude-code-tools --skill recover-context -a cursor2Вручную: положить файлы
.cursor/skills/recover-context/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install pchalasani/claude-code-tools recover-context2Вручную: положить файлы
.github/skills/recover-context/SKILL.md1Через Skills CLI (Vercel)
npx skills add pchalasani/claude-code-tools --skill recover-context -a gemini-cli2Командой платформы
gemini skills install https://github.com/pchalasani/claude-code-tools --path plugins/aichat/skills/recover-contextВручную: положить файлы
.devin/skills/recover-context/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add pchalasani/claude-code-tools --skill recover-context -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о recover-context
Как установить recover-context в Claude Code?
Выполните npx skills add pchalasani/claude-code-tools --skill recover-context -a claude-code. Файл скилла находится по пути ~/.claude/skills/recover-context/SKILL.md.
Что делает recover-context?
Он извлекает из последней родительской сессии контекст задачи, её статус, решения и дальнейшие шаги. Также проверяет связанные документы и файлы.
Что нужно для работы recover-context?
В первом сообщении должна быть цепочка сессий, по которой можно определить последнюю родительскую сессию. Для поиска скилл использует субагента session-searcher, а если субагенты недоступны — aichat:session-search.
Исходный текст
SKILL.md · MIT
---
name: recover-context
description: Extract full context of the last task from the most recent parent session
shown in the session lineage. Strategically uses sub-agents to avoid bloating your
own context.
---
# recover-context
Use this skill to extract context from a parent session when a session lineage is
present (shown in the first user message of this conversation).
## Instructions
1. **Identify the most recent parent session** from the lineage chain (the last
file in the chronological list).
2. **Use sub-agents to explore** (to avoid bloating your own context):
- If you have the Task tool with subagent support, use the `session-searcher`
subagent (subagent_type: `session-searcher`) to analyze the most recent session
- If sub-agents are NOT available, use the `aichat:session-search` skill instead
3. **Extract the following from the most recent session:**
- What was the last task being worked on?
- What was the current state of that task (completed, in-progress, blocked)?
- Any pending items or next steps mentioned?
- Key decisions made or approaches chosen
4. **Also check for associated documents:**
- Issue specs or task descriptions referenced in the session
- Any markdown files created during that session (check WORKLOG/, issues/, etc.)
- Code files that were being modified
5. **Report back concisely:**
- State your understanding of the task context
- List any files you found that are relevant
- Ask the user how they'd like to proceed
## Example Sub-agent Prompt
If using the Task tool with `session-searcher` subagent:
```
Analyze the session file at [path from lineage] and extract:
1. The last task being worked on (look at the final 20-30 messages)
2. Current state of that task
3. Any referenced markdown files (issue specs, work logs, etc.)
4. Pending next steps or blockers
Return a concise summary.
```
## Constraints
- Do NOT read large session files directly into your own context
- ALWAYS delegate to sub-agents or the session-search skill
- Keep your summary concise - the user knows what they were working on
- Focus on the LAST task, not the entire session history
© pchalasani · MIT · pchalasani/claude-code-tools