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/ruizrica/toolkit/restoregit clone --depth 1 https://github.com/ruizrica/toolkitWhat 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.00848 |
| Opus 5 | $0.00000 | $0.00424 |
| Sonnet 5 | $0.00000 | $0.00170 |
| Haiku 4.5 | $0.00000 | $0.00085 |
Grade A, and why
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 3d 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 — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/restore
Restore a compacted session and immediately continue working. This command reads the session state saved by /compact, loads daily log context for cross-session continuity, and resumes work without asking what to do next.
Usage
/restore
Arguments
This command takes no arguments. It automatically reads from .context/session-state.json.
How It Works
- Read - Load session state from
.context/session-state.json - Handle Missing - If not found, check for backups in
~/.claude/session-states/ - Daily Log Bootstrap - Read today's and yesterday's daily logs from
~/.claude/agent-memory/daily-logs/for cross-session context - Parse - Detect schema version and extract fields
- Restore Todos - Recreate the task list if present
- Continue - Immediately resume work based on continuation prompt
Memory Bootstrap
On restore, the agent reads:
~/.claude/agent-memory/daily-logs/{today}.md— what happened earlier today~/.claude/agent-memory/daily-logs/{yesterday}.md— what happened yesterday
This provides continuity across sessions. The agent internalizes this context silently — it won't dump the full log to you, but it knows what was done in prior sessions.
Schema Support
The command supports two schema versions:
V2 Format (Current)
{
"$schema": "session-state-v2",
"continue": "continuation prompt",
"task": "overall task",
"todos": [{"t": "task description", "done": false}],
"files": ["path/to/file.ts"]
}
V1 Format (Legacy)
{
"tier1_brief": {
"continuation_prompt": "...",
"status": "in_progress"
},
"tier2_context": {
"todo_list": [{"task": "...", "status": "completed"}]
}
}
Missing File Handling
If .context/session-state.json is not found, the command:
- Checks for backups in
~/.claude/session-states/ - Lists available backup files
- Asks user to choose:
- Use latest backup - Restore from most recent global backup
- Start fresh - Begin without restoration
- Cancel - Do nothing
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.
- 3d ago First seen · 130 lines · 0 tokens per session scan A 960e9b52de97
restore is a command published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 848 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
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.