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/loulanyue/awesome-claude-notes/save-sessiongit clone --depth 1 https://github.com/loulanyue/awesome-claude-notesWrote 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/loulanyue/awesome-claude-notes/save-session)<a href="https://agentmods.dev/commands/loulanyue/awesome-claude-notes/save-session"><img src="https://agentmods.dev/badge/commands/loulanyue/awesome-claude-notes/save-session.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.1 | $0.00028 | $0.02203 |
| Opus 5 | $0.00014 | $0.01102 |
| Sonnet 5 | $0.00006 | $0.00441 |
| Haiku 4.5 | $0.00003 | $0.00220 |
Grade A, and why
save-session 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 2d 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.
Copies of this mod
4 near-identical copies found in the catalogue:
- save-session — 88% identical, 7 lines differ
- save-session — 86% identical, 43 lines differ
- save-session — 84% identical, 49 lines differ
- save-session — 80% identical, 93 lines differ
How it starts
The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Save Session Command
Capture everything that happened in this session — what was built, what worked, what failed, what's left — and write it to a dated file so the next session can pick up exactly where this one left off.
When to Use
- End of a work session before closing Claude Code
- Before hitting context limits (run this first, then start a fresh session)
- After solving a complex problem you want to remember
- Any time you need to hand off context to a future session
Process
Step 1: Gather context
Before writing the file, collect:
- Read all files modified during this session (use git diff or recall from conversation)
- Review what was discussed, attempted, and decided
- Note any errors encountered and how they were resolved (or not)
- Check current test/build status if relevant
Step 2: Create the sessions folder if it doesn't exist
Create the canonical sessions folder in the user's Claude home directory:
mkdir -p ~/.claude/sessions
Step 3: Write the session file
Create ~/.claude/sessions/YYYY-MM-DD-<short-id>-session.tmp, using today's actual date and a short-id that satisfies the rules enforced by SESSION_FILENAME_REGEX in session-manager.js:
- Allowed characters: lowercase
a-z, digits0-9, hyphens- - Minimum length: 8 characters
- No uppercase letters, no underscores, no spaces
Valid examples: abc123de, a1b2c3d4, frontend-worktree-1
Invalid examples: ABC123de (uppercase), short (under 8 chars), test_id1 (underscore)
Full valid filename example: 2024-01-15-abc123de-session.tmp
The legacy filename YYYY-MM-DD-session.tmp is still valid, but new session files should prefer the short-id form to avoid same-day collisions.
Step 4: Populate the file with all sections below
Write every section honestly. Do not skip sections — write "Nothing yet" or "N/A" if a section genuinely has no content. An incomplete file is worse than an honest empty section.
Step 5: Show the file to the user
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.
- 2d ago First seen · 283 lines · 28 tokens per session scan A 3fabdcc3424f
save-session is a command published in the GitHub repository loulanyue/awesome-claude-notes (270 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 2,203 once invoked, about $0.0001 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.
Other commands, from other repositories
context-stats
Display context window usage and token statistics.
run
Execute prompt(s) from ./prompts/ with automatic archiving - for structured prompt-based work.
help
Explain Ralph Wiggum technique and available commands.
cancel-ralph
Cancel active Ralph Wiggum loop.
handoff
Create a handoff document for seamless session continuity.
context-health
Dashboard de salud del contexto activo con predicción de degradación y recomendaciones de compactación. Usa cuando el usuario dice "context health", "salud del contexto", "degradation", "compactar contexto", "context overflow", "tokens", "session health", "compact", "contexto lleno". Monitorea degrdación del contexto…