Sign in
Explore
Prompts · PromptData & AIReviewed

save-session

Save current session state to a dated file in ~/.claude/session-data/ so work can be resumed in a future session with full context.

Kind
Prompt
Works with
Claude Code, Codex
Source
affaan-m/ECC @ d3b8a3e90890
Path
commands/save-session.md
License
MIT
Jobs
Context management
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Save Session Command

Capture everything that happened in this session — what was built, what worked, what failed, what's left — and write it to a dated file so the next session can pick up exactly where this one left off.

## When to Use

- End of a work session before closing Claude Code
- Before hitting context limits (run this first, then start a fresh session)
- After solving a complex problem you want to remember
- Any time you need to hand off context to a future session

## Process

### Step 1: Gather context

Before writing the file, collect:

- Read all files modified during this session (use git diff or recall from conversation)
- Review what was discussed, attempted, and decided
- Note any errors encountered and how they were resolved (or not)
- Check current test/build status if relevant

### Step 2: Create the sessions folder if it doesn't exist

Create the canonical sessions folder in the user's Claude home directory:

```bash
mkdir -p ~/.claude/session-data
```

### Step 3: Write the session file
…