save-state

save-state is a command for Claude Code from eddiebelaval/squire. It costs 8 tokens per session (355 once invoked), scanned A, original, MIT.

A checkpoint workflow that records the current session's progress, decisions, changed files, and recovery information.

In plain words
What is it for?
Use it before refactoring, switching work areas, running destructive operations, or taking a break from development.
Why use it?
It gives you a saved point to return to before risky changes, experiments, or interruptions.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it before refactoring, switching work areas, running destructive operations, or taking a break from development.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eddiebelaval/squire/save-state
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.

Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

Made for: Claude Code.

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-state

README.md
[![agentmods](https://agentmods.dev/badge/commands/eddiebelaval/squire/save-state/github.svg)](https://agentmods.dev/commands/eddiebelaval/squire/save-state)
Your own site
<a href="https://agentmods.dev/commands/eddiebelaval/squire/save-state"><img src="https://agentmods.dev/badge/commands/eddiebelaval/squire/save-state/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for save-state

Your own site · 80×15
<a href="https://agentmods.dev/commands/eddiebelaval/squire/save-state"><img src="https://agentmods.dev/badge/commands/eddiebelaval/squire/save-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00008 $0.00355
Opus 5 $0.00004 $0.00178
Sonnet 5 $0.00002 $0.00071
Haiku 4.5 $0.00001 $0.00036

Measured 5d ago against content hash fc5ae87b5f64, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

save-state 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 5d 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-state.md · 75 lines

What it actually says

/save-state - Force Checkpoint

Creates an immediate checkpoint of the current session state. Use this before:

  • Major refactoring
  • Experimental changes
  • Switching to a different part of the codebase
  • Any risky operation

Usage

Basic Save

/save-state

Save with Reason

/save-state Before implementing auth system

What Gets Saved

A checkpoint includes:

  • Current session status and progress
  • All task statuses and assignments
  • Files modified in this session
  • Decisions made during development
  • Last tool outputs
  • Recovery instructions

Implementation

Run this command in the session-resilience-agents project:

cd ~/Development/session-resilience-agents && npm run checkpoint -- --reason="$REASON"

Where $REASON is the argument provided to this command (or "Manual checkpoint" if none).

When to Use

Use /save-state before:

  • Risky refactoring
  • Switching focus to different feature
  • Taking a break
  • Experimenting with approach
  • Running destructive operations

The system auto-saves:

  • Every 5 tool uses (Write, Edit, Bash, etc.)
  • After each task completion
  • Before running tests

Verification

After saving, verify with:

cd ~/Development/session-resilience-agents && npm run status

You should see an incremented checkpoint count.

Recovery

If anything goes wrong, resume from the checkpoint:

cd ~/Development/session-resilience-agents && npm run resume --checkpoint=CP-XXXXXX
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. 5d ago First seen · 75 lines · 8 tokens per session scan A fc5ae87b5f64

Subscribe to this mod's changes

save-state is a command published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 24d ago), licensed MIT. It adds 8 tokens to every session and 355 once invoked, about $0.0000 per session on Opus 5. 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-09-03.