agentleFS
GopalGBGopalGB/claude-code-toolkit/skills/save-session/SKILL.md

save-session

Skill1 starsChanged 7 months agoMITView on GitHub

Freeze current session state so the next session can pick up exactly where we left off.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use 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.
  • AWSSkill

    ship

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

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the following to understand current context:

    line 28

“Common” is measured: kept by at least 6 in 10 of the 18 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

Save Session

Freeze the current state so the next session can pick up exactly where we left off.

Trigger

Activate when: /save-session, "save session", "save state", "save progress", or when the PreCompact hook fires.

Purpose

Captures a complete snapshot of the current session's work, decisions, failures, and next steps into a timestamped file. This is the write half of MAX's session memory system. The goal is zero context loss between sessions.

Procedure

Step 1: Gather State

Read the following to understand current context:

  1. Git status -- run git status and git diff --stat in the project root to see what changed
  2. Recent tool activity -- review files created/modified during this session
  3. .max/state/CURRENT.md -- current system state
  4. Conversation context -- what G asked for, what was discussed, what decisions were made

Step 2: Create Session File

Generate a file at .max/sessions/YYYY-MM-DD_HH-MM.md using the current timestamp.

The file MUST contain ALL of these sections. Do not skip any, even if empty (write "None" if nothing applies):

# Session: YYYY-MM-DD HH:MM

## What Was Built
- [List every file created or significantly modified, with full paths]
- [Include the purpose of each change]

## What Worked
- [List things that succeeded, with evidence]
- [Include test results, successful outputs, confirmed behaviors]

## What FAILED
- [CRITICAL: List every approach that did NOT work]
- [Include WHY it failed so the next session doesn't retry it]
- [Include error messages if relevant]

## Decisions Made
- [Architectural choices and why]
- [Trade-offs considered]
- [Things explicitly ruled out and why]

## Blockers
- [Unresolved issues preventing progress]
- [Dependencies waiting on external input]
- [Questions for G that weren't answered]

## Exact Next Step
[One clear sentence: what the next session should do FIRST before anything else]

## Active Files
- [Full paths to key files being actively worked on]

## Queue State
- [LinkedIn queue: X posts scheduled / Y published]
- [Social media: any pending posts or campaigns]
- [Cron jobs: any pending or recently modified]
- [Write "N/A" if no queue-related work was done]

Step 3: Confirm

After saving, output:

Session saved to .max/sessions/YYYY-MM-DD_HH-MM.md
Next session should: [exact next step from above]

Rules

  • Never fabricate -- if you're unsure what happened, say so. Don't invent successes or failures.
  • Failures are gold -- the "What FAILED" section is the most important. Skipping it means the next session wastes time retrying broken approaches.
  • Paths must be absolute -- all file paths in "Active Files" must be absolute from the project root.
  • One file per save -- don't append to existing session files. Each save creates a new file.
  • Timestamp accuracy -- use the actual current time, not an approximation.

Integration Points

  • PreCompact hook triggers this skill automatically before context compaction
  • SessionEnd hook may trigger this if significant work was done
  • Resume Session (/resume-session) reads the files this skill creates
  • Morning Briefing (/morning) reads the latest session file for continuity
  • Nightly Evolution (/evolve) prunes old session files (keeps last 5 + any tagged ## KEEP)

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.

Reviews can't be read right now.

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.