Skip to content

Instantly share code, notes, and snippets.

@eeshansrivastava89
Created March 8, 2026 04:23
Show Gist options
  • Select an option

  • Save eeshansrivastava89/7081e4de436e86a488aede47bec1e794 to your computer and use it in GitHub Desktop.

Select an option

Save eeshansrivastava89/7081e4de436e86a488aede47bec1e794 to your computer and use it in GitHub Desktop.
Claude Code skill — context-restore (resumes from previous session)
name context-restore
description Restore session context from previous session
disable-model-invocation false

Context Restore

Resume work from where the last session ended. Read actual codebase along with this file.

Steps

1. Check for Context File

ls -la .claude/context.md 2>/dev/null

If no context file exists, fall back to git-based restoration.

2. Read Context File

Read .claude/context.md and parse:

  • Project Anchor
  • Git State
  • What We Were Doing
  • Decisions Made
  • Open Questions
  • Next Actions

3. Quick scan of actual codebase and docs

  • Quick scan codebase (docs and git are usually lagging)
  • Read key planning & implementation docs

4. Verify Against Current State

Check for discrepancies. Run these as separate parallel Bash calls — never chain with &&:

git status --short
git log --oneline -5
  • New commits since context was saved?
  • Files changed externally?
  • Branch switched?

5. Present Restoration Summary

## Session Restored

**Project:** [name]
**Branch:** [current branch]

### Where We Left Off

[Task, approach, where we stopped]

### Decisions From Last Session

[Key decisions that carry forward]

### Open Questions

[Unresolved items]

### Codebase Changes Since Last Save

[Any changes detected, or "None"]

### Recommended First Action

[First item from Next Actions]

---

Ready to continue. What would you like to work on?

6. Confirm with User

  • "Does this match your recollection?"
  • "Should we continue with [first action], or do something else?"

Rules

  • Codebase is truth — Context file is memory, not authority
  • Verify, don't assume — Check git state against context
  • Surface discrepancies — If things changed, say so
  • Be ready to pivot — User may want to do something different
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment