Skip to content
mcp/skillhub

Agent Skill

Session Compaction And Restore skill

session-compaction-and-restoremvschwarz/openrigpackages/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md

Use when reasoning about what survives compaction/context-loss/restart/seat-refresh, designing a high-fidelity restore packet, or distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild. Covers the 4 failure modes that prevent honest restore (compacted seat drops hot potato; restore packet preserves details but loses product intent; runtime resume mistaken for handover or fork; rebuilt seat starts with stale instructions).

8.1kApache-2.0

always on

88 tokname + description

once used

2,179 tokSKILL.md body

bundled files

0

repo stars

8.1kGitHub

Install the Session Compaction And Restore skill

Skills CLI (Claude Code, Codex, Cursor and others)

npx skills add https://github.com/mvschwarz/openrig --skill session-compaction-and-restore

Claude Code, by hand (all projects)

git clone --depth 1 https://github.com/mvschwarz/openrig.git /tmp/openrig
mkdir -p ~/.claude/skills
cp -R /tmp/openrig/packages/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore ~/.claude/skills/session-compaction-and-restore

For one project only, copy the folder into .claude/skills/ in that project instead. The agent picks it up when a task matches its description.

What it costs your context

Agent Skills load in three steps. Tokens counted with the o200k tokenizer; your model's count will differ a little.

WhenWhat loadsCost
Every sessionName and description88 tok
When the agent uses itThe SKILL.md instructions2,179 tok
Only if openedNo bundled files—

Until it is used, session-compaction-and-restore costs about 15× less than the median MCP server we measured (1,362 tokens on every turn). Installing all 94 skills from mvschwarz/openrig would load 6,757 tokens of descriptions. Skills vs MCP study

Checks

Our checks found nothing to flag: it follows the Agent Skills specification's naming and size guidelines and doesn't pipe downloads into a shell.

Checked 2026-10-22 · method

What's inside

The headings of its SKILL.md. Read the full file on GitHub.

  • Session Compaction and Restore
  • Use this when
  • Don't use this when
  • The 5 distinctions (do not collapse)
  • The three mechanisms — who owns each (verified vs main d37a08ad, 2026-07-21)
  • Claude's own idle compaction while managed compaction is on
  • Current CLI surface (operator / kernel seats; verified vs main d37a08ad)
  • Failure modes (4)
  • Proof standard
  • Canonical packet contract (16-field, v0)
  • Memory surfaces consumed at restore time
  • See also

More skills from mvschwarz/openrig

All skills in this repo
  1. agent-browsermvschwarz/openrig

    Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

    8.1k108 tok idle · 3,477 in use
  2. agent-operated-softwaremvschwarz/openrig

    Use when designing, building, operating, or diagnosing an ongoing application whose live backend or control loop includes OpenRig agents, including applications with a Markdown, YAML, or JSON agent control plane or a thin surface over specialist agent roles.

    8.1k51 tok idle · 910 in use
  3. agent-operated-workflowsmvschwarz/openrig

    Use when a bounded real-world procedure has a deterministic happy path but brownfield, variable, or partially knowable state; when an operation must resume from verified evidence; or when deciding whether agent judgment or ordinary code should own a procedure's control loop.

    8.1k55 tok idle · 730 in use
  4. agent-startersmvschwarz/openrig

    Use when creating, refreshing, packaging, inspecting, promoting, or deprecating a named per-seat starting point — Agent Starter manifest authoring, the 6-state lifecycle (captured → named → inspectable → used → promoted → deprecated), provenance honesty, and refusal rules. NOT a VM image; a managed starting point composed from agent role + startup context + optional native session source + provenance.

    8.1k84 tok idle · 1,317 in use
  5. Use when designing or auditing how an agent becomes useful after launch — AGENTS.md overlays, role files, skills, rig specs, workflow specs, startup checklists, refocus messages, "rig context" surface. Covers the 4 failure modes that make startup context fail (old rig spec misses current operating mode; current agents never told about new guidance; startup file as dumping ground; orchestrator transmits implementation without preserving product intent).

    8.1k95 tok idle · 1,276 in use
  6. Use before launching a team during agent-guided setup, or when a user asks to configure OpenRig command permissions, reduce repeated native approval prompts, or apply a selected rig/seat permission policy.

    8.1k46 tok idle · 2,819 in use
  7. backlog-capturemvschwarz/openrig

    Quickly capture product ideas, feature requests, or insights from meetings and conversations. Rapid documentation with smart categorization and deduplication.

    8.1k31 tok idle · 434 in use
  8. claude-compaction-restoremvschwarz/openrig

    Use when a Claude Code session is about to compact, has just compacted, reached its context limit, resumed after /compact, or must rebuild its working picture of a long-running seat from its own restore map, its JSONL transcript and the files it touched.

    8.1k260 tok idle · 3,982 in use