Skip to main content
skill CX Codex

recover-context — Claude Code skill: restore session context and install

This skill retrieves the last task from a parent session, along with its status, decisions, and pending work. Use it when continuing from a session lineage.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pchalasani/claude-code-tools --skill recover-context -a claude-code
Open on GitHub

What recover-context does

The skill identifies the newest parent session in the lineage and extracts the task in progress, its status, decisions, and remaining steps. It also looks for related material, such as task specs, work logs, and files that were being edited.

To keep a large session file out of the main context, it delegates the search to session-searcher. When sub-agents are unavailable, it uses aichat:session-search instead. The result is a short account of the task, relevant files, and a question about how to proceed. A session lineage must appear in the first user message; otherwise there is no parent session for the skill to select.

What it helps with

  • recover the latest task from a parent session
  • check whether work is complete, ongoing, or blocked
  • locate referenced task specs and work files
  • identify decisions and outstanding next steps

Example prompts for the agent

  • Recover the last task from the session lineage and list its related files.
  • Check the newest parent session and tell me the task status and remaining steps.
  • Find the decisions made in the last session, then ask how I want to continue.

How to install recover-context

1Skills CLI (Vercel)

npx skills add pchalasani/claude-code-tools --skill recover-context -a claude-code

2Manually: put the files in place

~/.claude/skills/recover-context/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/recover-context/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about recover-context

How do I install recover-context in Claude Code?

Run npx skills add pchalasani/claude-code-tools --skill recover-context -a claude-code. The skill file is at ~/.claude/skills/recover-context/SKILL.md.

What does recover-context do?

It retrieves the task, current status, decisions, and pending steps from the latest parent session. It also looks for related documents and code files.

Does recover-context need a session lineage?

Yes. The lineage must be present in the first user message so the skill can identify the newest parent session. It searches with session-searcher, or uses aichat:session-search when sub-agents are unavailable.

Source text

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set8

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor