restore

A command that rebuilds Herdr workspaces, tabs, pane splits, and coding-assistant sessions from a saved snapshot after a reboot. Herdr is the terminal workspace manager described by the snapshot format.

In plain words
What is it for?
Use it to preview and restore saved sessions, optionally limiting which workspaces or panes are rebuilt.
Why use it?
It restores a previous multi-pane working setup without manually recreating every workspace and restarting each agent.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/motlin/claude-code-plugins/restore
Any agent
npx skills add motlin/claude-code-plugins --skill restore
Clone the repo
git clone --depth 1 https://github.com/motlin/claude-code-plugins

Made for: Claude Code, Codex.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 891 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.00891
Opus 5 $0.00035 $0.00445
Sonnet 5 $0.00014 $0.00178
Haiku 4.5 $0.00007 $0.00089

Measured 2d ago against content hash 60eae2a6bc06, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 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.

plugins/herdr-reboot/skills/restore/SKILL.md · 59 lines

What it actually says

Restore Herdr Workspaces

After a reboot, rebuild the session from the snapshot written by /herdr-reboot:snapshot: every captured workspace with its label, every tab with its label, the panes inside each tab split at the captured direction and ratio, then the resume command fired into each new pane.

Preview the plan first:

python3 ${CLAUDE_PLUGIN_ROOT}/scripts/restore.py .llm/resume-after-reboot-state.json

The preview prints the tree it will build — workspaces, tabs, split right 0.6 lines, and the pane that each slot lands in. Show it to the user. Once they confirm, fire it:

python3 ${CLAUDE_PLUGIN_ROOT}/scripts/restore.py .llm/resume-after-reboot-state.json --go

Use --limit N to rebuild only the first N workspaces and --skip 3,7 to leave individual slots out entirely; a split left holding one pane collapses, and a tab left holding none is not created. Agent launches are spaced 0.4s apart (--delay) so a couple dozen boots do not all land at once.

The state file is JSON, schema resume-after-reboot/v2, and is herdr-shaped. A tmux-reboot snapshot (resume-after-reboot/v1) is flat, with no workspaces, tabs, or splits to rebuild, so this restore rejects it rather than half-restoring it.

What the user needs to know before firing:

  • command panes split on their restore_default field. Dev servers (restore_default: false) are skipped: they often survive the reboot that killed the agents, and re-running one just fails with EADDRINUSE against the server still holding the port. Their pane is still created, so the user can start them by hand. Pass --commands to fire them anyway, only after confirming the old processes are gone.
  • Read-only viewers (restore_default: truegit log, less FILE, htop, tig) fire without --commands. Nothing of theirs survives a reboot, so the EADDRINUSE reasoning does not apply. They re-run from the top: scroll position, search, and selection are not restored.
  • Nothing is ever typed into a pane that is not an idle shell. herdr pane run types into whatever the pane holds, so firing into a resumed agent would submit the resume command to it as a prompt. Every pane is fired only when confirmed to be sitting at a shell prompt with no live agent; anything else is skipped with a printed reason. Re-running the script is therefore safe.
  • A live workspace with the same label and working directory is adopted rather than duplicated. Its captured tabs land there as brand new tabs, never reusing its live panes.
  • Focus comes back last: each workspace's active tab, then the workspace that held focus. Focus inside a tab is restored as the tree is built, by creating the focused pane focused.
  • Verify codex panes whose note says herdr reported no session. Those ids come from matching the working directory against rollout files on disk, so the pairing is a best guess. If a resumed session opens the wrong conversation, run codex resume in that pane and use the interactive picker.
  • claude-rc panes are Remote Control servers, fired like any other agent pane. Their command reattaches with --continue, which errors out if nothing was recorded for that directory in roughly the last 4 hours — expect that on any reboot you did not come straight back from. The pane is left at a prompt; start a fresh server there by hand when you want one.
Changes

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.

  1. 2d ago First seen · 59 lines · 70 tokens per session scan A 60eae2a6bc06

Subscribe to this mod's changes

restore is a skill published in the GitHub repository motlin/claude-code-plugins (15 stars, last pushed 3d ago), licensed Apache-2.0. It adds 70 tokens to every session and 891 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens