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.
npx agentmods add commands/andrew-shwetzer/claude-code-save/savesgit clone --depth 1 https://github.com/andrew-shwetzer/claude-code-saveWrote 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.
[](https://agentmods.dev/commands/andrew-shwetzer/claude-code-save/saves)<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>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.
| Model | Per session | Once 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 |
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.
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 "..."):
- Extract the search query (strip quotes if present)
- For each index entry, check if the query appears (case-insensitive) in:
intenttags(joined with spaces)
- If a match is found in the index, include it
- If fewer than 3 matches from index alone, read the full JSON files for remaining entries and search
decisionsandnext_stepsarrays too - Sort matches by
tsdescending, 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
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.
- 4d ago First seen · 122 lines · 0 tokens per session scan A 97b0d604c048
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.
Other commands, from other repositories
resume
Resume a previous session. Reads recent session logs, open tasks, and last decisions — gives Claude full context without re-explaining the project.
recall
Search what this project knows about a concept — session history, and the documents written about it. Usage: /recall.
learn
Manually run the continuous-learner. Extract patterns from this session and write to .greatcto/lessons.md. Use when SessionEnd hook missed something or you want to capture a lesson mid-session.
ccr
CCR (Compressed Context with Retrieval) — recall the full original of context that greatcto compressed/filtered out, by its short id. The retrieval half of the compression layer.
save
Save this conversation as a new or existing reusable context.
import
Import a shared context bundle, or take a teammate's newer copy of one you already have.