saves

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

A command for browsing and searching saved coding-agent sessions across projects.

In plain words
What is it for?
Use it to list recent saves, filter saves by project, or search saved notes by an intent or tag such as an authentication bug.
Why use it?
It makes earlier checkpoints easier to find instead of relying on memory or manually opening every saved session.

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/saves
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 saves

README.md
[![agentmods](https://agentmods.dev/badge/commands/andrew-shwetzer/claude-code-save/saves.svg)](https://agentmods.dev/commands/andrew-shwetzer/claude-code-save/saves)
Your own site
<a href="https://agentmods.dev/commands/andrew-shwetzer/claude-code-save/saves"><img src="https://agentmods.dev/badge/commands/andrew-shwetzer/claude-code-save/saves.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,090 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.01090
Opus 5 $0.00000 $0.00545
Sonnet 5 $0.00000 $0.00218
Haiku 4.5 $0.00000 $0.00109

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

Security

Grade A, and why

saves 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 4d 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/saves.md · 122 lines

How it starts

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

Browse and search past session saves across all projects.

Arguments

The user's message after /saves determines the view:

  • Nothing (/saves): Show the 10 most recent saves across all projects
  • Project slug (/saves my-app): Show recent saves for that project with summary
  • Search (/saves search "auth bug"): Search saves by content

How to execute

Step 1: Read the index

Read ~/.claude/saves/index.jsonl. Each line is a JSON object:

{"id":"save_xxx","ts":"ISO-8601","project":"slug","type":"manual|auto","intent":"...","tags":["..."]}

If the file doesn't exist or is empty:

No saves found. Use /save to create your first checkpoint.

Parse all lines into an array. Skip any malformed lines silently.

Step 2: Filter entries

No argument: Take all entries, sort by ts descending, take the first 10.

Project slug: Filter to entries where project matches the given slug (case-insensitive). Sort by ts descending, take the first 10.

Search query (search "..."):

  1. Extract the search query (strip quotes if present)
  2. For each index entry, check if the query appears (case-insensitive) in:
    • intent
    • tags (joined with spaces)
  3. If a match is found in the index, include it
  4. If fewer than 3 matches from index alone, read the full JSON files for remaining entries and search decisions and next_steps arrays too
  5. Sort matches by ts descending, take the first 10

Step 3: Calculate relative times

For each entry, convert ts to human-readable:

  • Under 60 minutes: "Xm ago"
  • Under 24 hours: "Xh ago"
  • Yesterday: "yesterday"
  • Under 7 days: "X days ago"
  • Under 30 days: "X weeks ago"
  • Older: "YYYY-MM-DD"

Step 4: Format output

Default view (all projects):

=== Session Saves ===

ID                     Project        When          Type    Intent
save_1711152000000     my-app         2h ago        manual  Implementing JWT auth
save_1711148400000     my-app         3h ago        auto    (session exit)
save_1711134000000     api-server     yesterday     manual  Fixing rate limiter bug
save_1711120000000     my-app         2 days ago    manual  Database migration setup
...

Showing [N] of [total] saves across [project count] projects.
/saves <project> -- filter by project | /saves search "query" -- search

Read the full file on GitHub · 122 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. 4d ago First seen · 122 lines · 0 tokens per session scan A 97b0d604c048

Subscribe to this mod's changes

saves 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,090 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.