snapshot

A tool that records running herdr workspaces, tabs, split-pane layouts, and coding-agent sessions before a computer reboot.

In plain words
What is it for?
Use it before rebooting to save the current herdr session into a JSON state file for later restoration.
Why use it?
A reboot normally loses these live sessions and their layout, so the saved snapshot gives a restore tool the information needed to rebuild them.

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/snapshot
Any agent
npx skills add motlin/claude-code-plugins --skill snapshot
Clone the repo
git clone --depth 1 https://github.com/motlin/claude-code-plugins

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,209 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.00066 $0.01209
Opus 5 $0.00033 $0.00605
Sonnet 5 $0.00013 $0.00242
Haiku 4.5 $0.00007 $0.00121

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

Security

Grade A, and why

snapshot 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/snapshot/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Snapshot Herdr Workspaces

Capture the live herdr session so /herdr-reboot:restore can rebuild it after a reboot. Nothing survives the reboot — not the workspaces, not the tabs, not the agents inside them.

Run:

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

Then show the user the tree and confirm it looks right before the reboot. The state file holds session ids personal to this machine, so keep it in the gitignored .llm/ directory.

The state file is JSON, schema resume-after-reboot/v2, and mirrors the session's own shape: workspaces (with label, number, and active tab) hold tabs (with label, number, zoom, and focused pane), and each tab holds a layout tree of split nodes — direction and ratio — bottoming out in pane leaves. The document also records which workspace, tab, and pane held focus. It is herdr-shaped, so the tmux-reboot plugin, which speaks the flat resume-after-reboot/v1, neither reads nor writes it.

Each pane is one leaf, and slot numbers them by workspace order, then tab order, then layout order, so a slot follows the visual layout. Review these caveats with the user when they affect the panes:

  • claude panes carry the session id herdr itself reports, so they need no guessing and are exact. Two ids are rejected before they reach the state file, because claude --resume would answer No conversation found for both: a uuid v5 (claude mints v4 for a real session, so a v5 is a derived placeholder) and an id whose transcript exists but is empty (the session never took a turn). Those panes fall back to claude --continue and say so in their note. A missing transcript is not held against the id — a pane sitting in a git worktree derives a different project slug than the one the session was written under.
  • claude-rc panes are Remote Control — claude rc, the server hosting sessions driven from claude.ai/code and the phone. herdr reports one as a claude pane carrying the id of the placeholder session RC pre-creates on startup, which is never resumable and changes every launch, so these are restored by relaunching with --continue instead. That reattaches the session last recorded for the directory; past its ~4h window it errors and leaves the pane at a prompt, which beats a fresh server that looks restored but is attached to nothing. Conversation state lives server-side, so relaunching by hand loses none of it.
  • codex panes are only exact when herdr reported a session. herdr's codex integration reports nothing until that pane takes a turn, so a codex pane that has been idle since launch falls back to matching its working directory against recent rollout files on disk. Those panes say herdr reported no session in their note — point them out, since the id is a best guess and should be verified after restoration.
  • codex resume --last means no rollout matched the working directory at all.
  • command panes carry no session state, so restoring one just re-runs the command line. Their restore_default field says whether restore replays it unasked:
    • false — long-lived dev servers and watchers (just dev, npm run dev, vite). Skipped by default, because these frequently survive the reboot and still hold their ports.
    • true — read-only viewers (git log, git show, less FILE, man, htop, tig, lazygit). None of these outlives the reboot, so restore replays them by default.
  • git panes are judged by subcommand, not by program, so git push and git rebase are never captured. An alias is judged by what it expands to and restored as the alias you typed, so git la comes back as git la.
  • A pager is captured only when it names a file. A bare less is draining a pipe whose writer dies with the reboot, and re-running it would hang the pane on stdin.
  • shell panes are panes with nothing worth restoring; the restore just recreates the pane.
  • Editors and REPLs with in-memory state (vim, psql, ssh) are intentionally recorded as shell panes rather than re-run.
  • tig and lazygit are captured as viewers, but both can stage, commit, and push from inside the TUI — a restored one is only as safe as what you then type at it.

Read the full file on GitHub · 73 lines

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 · 73 lines · 66 tokens per session scan A c24bef6bc2b4

Subscribe to this mod's changes

snapshot is a skill published in the GitHub repository motlin/claude-code-plugins (15 stars, last pushed 3d ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,209 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