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 skills add IlyaGorsky/memory-toolkit --skill session-restoregit clone --depth 1 https://github.com/IlyaGorsky/memory-toolkitWrote 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/skills/ilyagorsky/memory-toolkit/session-restore)<a href="https://agentmods.dev/skills/ilyagorsky/memory-toolkit/session-restore"><img src="https://agentmods.dev/badge/skills/ilyagorsky/memory-toolkit/session-restore/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.
<a href="https://agentmods.dev/skills/ilyagorsky/memory-toolkit/session-restore"><img src="https://agentmods.dev/badge/skills/ilyagorsky/memory-toolkit/session-restore.svg" alt="Reviewed on agentmods" width="80" 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.00025 | $0.01309 |
| Opus 5.5 | $0.00010 | $0.00524 |
| Sonnet 5.5 | $0.00005 | $0.00262 |
| Haiku 4.5 | $0.00003 | $0.00131 |
Grade A, and why
session-restore 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 1mo 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 — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Session Restore — backup and context restoration
Parses .jsonl files of Claude Code sessions, extracts chronology and key decisions.
Where data is stored
~/.claude/projects/-<project-key>/
├── <UUID>.jsonl # current session (or completed)
├── <UUID>.jsonl.bak # backup before last compact
└── <UUID>/
└── subagents/ # subagent logs
Commands
/session-restore list
Show all sessions with dates and sizes:
SESSIONS_DIR=~/.claude/projects/-$(pwd | tr '/.' '-' | sed 's/^-//')
ls -lat "$SESSIONS_DIR"/*.jsonl 2>/dev/null | head -20
Output a table: | File | Date | Size | .bak |
/session-restore restore
Restore context from the latest (or specified) session:
- Find the file — by default the most recent
.jsonl, or by UUID from the argument - Parse — extract USER and CLAUDE messages using python3:
import json, sys
path = sys.argv[1]
with open(path) as f:
lines = f.readlines()
for i, line in enumerate(lines):
try:
obj = json.loads(line.strip())
role = obj.get('role', '?')
msg_type = obj.get('type', '?')
c = obj.get('message', {}).get('content', obj.get('content', ''))
if isinstance(c, list):
for item in c:
if isinstance(item, dict):
tp = item.get('type', '')
if tp == 'text':
text = item.get('text', '').strip()
if role == '?' and msg_type == 'user':
if text and not text.startswith('<ide_') and not text.startswith('<system') and not text.startswith('<local-command') and not text.startswith('<command-') and len(text) > 5:
print(f'USER [{i}]: {text[:200]}')
elif role == '?' and msg_type == 'assistant':
if text and len(text) > 20:
print(f' CLAUDE [{i}]: {text.split(chr(10))[0][:200]}')
elif isinstance(c, str):
clean = c.strip()
if role == '?' and msg_type == 'user' and clean and not clean.startswith('<') and len(clean) > 3:
print(f'USER [{i}]: {clean[:200]}')
elif role == '?' and msg_type == 'assistant' and clean and len(clean) > 20:
print(f' CLAUDE [{i}]: {clean.split(chr(10))[0][:200]}')
except:
pass
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.
- 1mo ago First seen · 177 lines · 25 tokens per session scan A 0bb1fd21d374
session-restore is a skill published in the GitHub repository IlyaGorsky/memory-toolkit (13 stars, last pushed 10d ago), licensed MIT. It adds 25 tokens to every session and 1,309 once invoked, about $0.0001 per session on Opus 5.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-08-30.
Other skills, from other repositories
67-agency-vendor-brief-global
Use when briefing or managing an EXTERNAL agency, freelancer, or production vendor — scope of work, deliverable specs, revision rounds, approval process, USD payment milestones, IP assignment and confidentiality terms, communication rules, and a post-project vendor scorecard. Trigger on 'brief an agency', 'hire a…
nav-compact
Clear conversation context while preserving knowledge via context marker. Use when user says "clear context", "start fresh", "done with this task", or when approaching token limits.
context
Transfer context from the current Claude Code terminal session to the Telegram bot session. Use when the user says "send this to telegram", "transfer context", "telegram:context", "teleport to telegram", or wants the Telegram bot to continue work from this session.
close
Commit the session to durable vault memory and prepare a clean resume point.
context-capsule
The capsule verb, invoked explicitly — reconcile from the live memory, write a resume-ready capsule, then stop. Mid-session checkpoint or completion capsule; a rolling best-effort version of the same write also runs automatically on every Stop event via daemons/stop-capsule-writer.mjs.
Promote
Take a slice of the current conversation and promote it to a durable vault artifact — concept note, project update, person profile, or doctrine entry. Pairs with /close. /close writes the daily note (transient outcome record); /promote elevates specific insights to permanent vault content the framework can refer back…