Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save eeshansrivastava89/a5b5b52f208536becccb8589f151e32b to your computer and use it in GitHub Desktop.
Claude Code skill — context-save (saves session state for seamless resumption)
name context-save
description Save session context for resuming later
disable-model-invocation false

Context Save

Capture session state so the next session can resume seamlessly.

Steps

1. Gather Git State

git status --short
git log --oneline -5
git branch --show-current

2. Analyze Conversation

Review conversation history to extract:

  • Task: What we were working on
  • Approach: How we decided to solve it
  • Progress: What's done, what's not
  • Where we stopped: Exactly what state we're in
  • Decisions made: Key choices with rationale
  • Open questions: Unresolved issues

3. Write Context File

Write to .claude/context.md:

# Session Context
<!-- Auto-generated by /context-save -->
<!-- Last saved: YYYY-MM-DD -->

## Project Anchor

**Project:** [name and description]
**Current Phase:** [status]

## Git State

**Branch:** [branch name]
**Last Commit:** [hash] [message]
**Uncommitted Changes:**
- [file][what changed]

## What We Were Doing

### Task
[Specific task]

### Progress
- [x] [Done]
- [ ] [Not done]

### Where We Stopped
[Exactly where]

## Decisions Made

| Decision | Rationale | Files |
|----------|-----------|-------|
| [Decision] | [Why] | [Where] |

## Next Actions

1. [First thing when resuming]
2. [Second thing]

## Conversation Essence

[Key context: preferences, gotchas, things discussed but not implemented]

4. Confirm

Context saved to .claude/context.md

Summary:
- Task: [what]
- Status: [where]
- Next: [first action]

Ready to close session.

Rules

  • Overwrite, don't append — Each save replaces previous
  • Be specific — Vague context is useless
  • Include uncommitted work — Often where we stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment