save

save is a command for coding agents from andrew-shwetzer/claude-code-save. It costs 0 tokens per session (1,773 once invoked), scanned A, original, MIT.

A command that saves the current coding session as a structured checkpoint, including project and version-control details.

In plain words
What is it for?
Use it before pausing work or handing a project to another session, so progress, branch information, recent commit, and unfinished changes are recorded.
Why use it?
It gives you a recoverable record of where work stopped and what should happen next.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/andrew-shwetzer/claude-code-save/save
Clone the repo
git clone --depth 1 https://github.com/andrew-shwetzer/claude-code-save

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for save

README.md
[![agentmods](https://agentmods.dev/badge/commands/andrew-shwetzer/claude-code-save/save.svg)](https://agentmods.dev/commands/andrew-shwetzer/claude-code-save/save)
Your own site
<a href="https://agentmods.dev/commands/andrew-shwetzer/claude-code-save/save"><img src="https://agentmods.dev/badge/commands/andrew-shwetzer/claude-code-save/save.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01773
Opus 5 $0.00000 $0.00886
Sonnet 5 $0.00000 $0.00355
Haiku 4.5 $0.00000 $0.00177

Measured 3d ago against content hash 75aa58838460, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

save scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/save.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Save session progress as a structured checkpoint. Like a video game save: captures where you are, what you were doing, and what to do next.

How to execute

Step 1: Detect project

Identify the project using this priority order:

  1. Look for .claude-save-config.json in CWD or any parent directory. Read its project.slug and project.name.
  2. Check ~/.claude/saves/config.json for a projects mapping that matches the CWD.
  3. Use the git repository name (from git rev-parse --show-toplevel).
  4. Use the current directory name as a fallback.
  5. If ambiguous or CWD is $HOME, ask: "Which project should I save under?"

Convert the slug to kebab-case: lowercase, alphanumeric and hyphens only.

Trivial session check: If the session was only Q&A, a single config tweak, or produced no file output, output:

Skipping save. Session was trivial (no substantive work to checkpoint).

And stop.

Step 2: Gather git state

Run these in the CWD (skip if not a git repo):

git branch --show-current
git log --oneline -1
git status --porcelain

Capture: branch name, last commit (hash + subject), count of dirty files, and the porcelain output lines (max 20).

Step 3: Compose save state from session context

From your conversation context, determine:

  • intent (string): What was the user trying to accomplish? Write in past progressive tense. Example: "Implementing JWT authentication for the API endpoints." This answers "what were you in the middle of?" not "what did you finish?"
  • files_modified (array): Files created, modified, or deleted. Include a brief description of what changed in each. Use paths relative to the project root.
  • decisions (array of strings): Choices made during the session and their rationale. Example: "Used RS256 over HS256 for JWT signing because we need key rotation support."
  • next_steps (array of strings): What should happen next, ranked by priority. Be specific and actionable. "Implement the refresh token endpoint in src/auth.ts" not "continue working." Each step should be completable in a single session.
  • lessons (array of objects with title/finding/implication): Only if a technical pitfall was solved, a strategic insight was confirmed, or a useful pattern was discovered. Most sessions have zero lessons. Don't force it.
  • tags (array of strings): 2-5 descriptive tags for searchability. Examples: "auth", "bugfix", "refactor", "database", "api".

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 183 lines · 0 tokens per session scan A 75aa58838460

Subscribe to this mod's changes

save is a command published in the GitHub repository andrew-shwetzer/claude-code-save (2 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,773 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.