agentleFS
lesdolesdo/ClaudeCode-ContextPlugin/skills/recover/SKILL.md

recover

Skill1 starsChanged 5 months agoMITView on GitHub

Recover work from a crashed or interrupted session. Use when Claude crashed mid-task, after an unexpected exit, when you see 'stale sessions detected', or when you lost context and need to figure out what was happening.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use status and ship.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look at .claude/context/sessions/.session-index — find entries with "status":"skeleton"

    line 17
  2. Very specific:

    If SessionStart hook already ran crash auto-fill, the skeleton's ## 自动信息 section will contain the auto-filled data — read it first

    line 19
  3. Very specific:

    Read the crashed session's .md file — check if ## 自动信息 was auto-filled (by P0 crash auto-fill)

    line 23
  4. Very specific:

    Read the crashed session's .log file — contains the full tool call history

    line 24
  5. Very specific:

    Look for CRASH: line in .log — gives exit_code, label, time

    line 25
  6. Distinctive:

    If auto-fill didn't run or data is incomplete:

    line 53
  7. Very specific:

    Read .log to see what tools were called

    line 54
  8. Very specific:

    Check project directory for modified files (compare file timestamps with session start time in session .md)

    line 55
  9. Very specific:

    Update .session-index entry from skeleton to complete

    line 57
  10. Distinctive:

    No skeletons in index: "No crashed sessions detected.

    line 61

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Recover Session

Recover work from a session that ended unexpectedly.

NOTE: For resuming planned features (with progress files), use /resume instead.

Infrastructure: This skill works with the .log forensic log + .session-index system. No git or external tools required.

Phase 0: Check session index for skeletons

  1. Look at .claude/context/sessions/.session-index — find entries with "status":"skeleton"
  2. Cross-reference with .log files: skeleton + CRASH line = crashed session
  3. If SessionStart hook already ran crash auto-fill, the skeleton's ## 自动信息 section will contain the auto-filled data — read it first

Phase 1: Examine crashed session files

  1. Read the crashed session's .md file — check if ## 自动信息 was auto-filled (by P0 crash auto-fill)
  2. Read the crashed session's .log file — contains the full tool call history
  3. Look for CRASH: line in .log — gives exit_code, label, time
  4. CRASH_SEVERITY from SessionStart output tells you the impact level:
    • L1 — short session, minimal loss, auto-filled
    • L2 — meaningful work, forensic data available, auto-filled
    • L3 — data missing, needs manual investigation

Phase 2: Present recovery summary

  1. Based on what you found, present:
Crashed session: [session-name]
Severity: [L1/L2/L3] | Exit: [exit_code] ([label])

What happened (from .log):
  - HH:MM:SS ToolName summary
  - HH:MM:SS ToolName summary
  ...

Auto-fill status: [已自动填充 / 无数据可填充]

Resume from here, start fresh with this context, or discard?
  1. Resume → continue working with the recovered context. Fresh → present findings as context only. Discard → acknowledge and move on.

Phase 3: Manual recovery (L3 / no auto-fill)

  1. If auto-fill didn't run or data is incomplete:
    • Read .log to see what tools were called
    • Check project directory for modified files (compare file timestamps with session start time in session .md)
    • Fill the session .md ## 上下文 section manually with what you can reconstruct
    • Update .session-index entry from skeleton to complete

Edge Cases

  • No skeletons in index: "No crashed sessions detected. Did you mean /resume?"
  • L1 severity: Note that loss was minimal, no action needed
  • Sessions older than 7 days: flag as "likely stale" but allow recovery
  • .log exists but no CRASH line: session ended without crash detection — check exit code in .md
  • .log missing entirely: L3, cannot recover from forensic data

$ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.