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 skills/ilyagorsky/memory-toolkit/session-restorenpx 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.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.00025 | $0.01309 |
| Opus 5 | $0.00013 | $0.00655 |
| Sonnet 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 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 — 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.
- 4d 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 4mo ago), licensed MIT. It adds 25 tokens to every session and 1,309 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-08-30.
Other skills, from other repositories
acontext-installer
Install Acontext, Login & Init Acontext Project, Add Skill Memory to Agent.
init
Initialize structured context for this project. Scaffolds .scs/ with all 11 concern bundles, scans the project, and recommends where to start.
context-ingest
The single entry point for getting anything new into your context architecture. Takes any input (documents, URLs, YouTube, meeting notes, pasted content) and triages it: dump to inbox, park in planned, or integrate into active docs. WHEN TO USE: "Here's a document — integrate it into my context" "Save this for later"…
context-audit
Audits context architecture for CLEAR compliance, boundary enforcement, and consistency. WHEN TO USE: User says "audit context for CLEAR" User asks "check for duplication across data points" User requests "find boundary violations in [area]" Planning restructuring work Before adding new data points (cleanup existing…
context-routing
Cross-zone retrieval and task-driven bundle resolution for BCOS. /context search ranks docs across every zone in one shared schema; /context bundle (P5) returns a curated, freshness-flagged, source-of-truth-aware context bundle for a declared task. Mechanical-first; LLM is opt-in via --semantic / --resolve-conflicts /…
context-mine
Extracts structured context from conversation exports (Slack, meeting transcripts, chat logs) into inbox for processing.