Memori Long-Term Memory
MemoriLabs/Memori
Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.
Keeps a long-running Claude Code session's working picture alive across compactions by writing a restore map before compacting and rebuilding context from it afterward.
$ npx skills add mvschwarz/openrig --skill claude-compaction-restore -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mvschwarz/openrig claude-compaction-restore --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore .claude/skills/claude-compaction-restore && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "claude-compaction-restore" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore into .claude/skills/claude-compaction-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-compaction-restore", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restoreType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mvschwarz/openrig --skill claude-compaction-restore -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mvschwarz/openrig claude-compaction-restore --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore .agents/skills/claude-compaction-restore && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "claude-compaction-restore" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore into .agents/skills/claude-compaction-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-compaction-restore", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mvschwarz/openrig --skill claude-compaction-restore -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mvschwarz/openrig claude-compaction-restore --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore .cursor/skills/claude-compaction-restore && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "claude-compaction-restore" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore into .cursor/skills/claude-compaction-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-compaction-restore", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mvschwarz/openrig.git --path packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mvschwarz/openrig --skill claude-compaction-restore -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mvschwarz/openrig claude-compaction-restore --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore .gemini/skills/claude-compaction-restore && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "claude-compaction-restore" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore into .gemini/skills/claude-compaction-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-compaction-restore", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mvschwarz/openrig claude-compaction-restoreInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mvschwarz/openrig --skill claude-compaction-restore -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore .github/skills/claude-compaction-restore && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "claude-compaction-restore" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore into .github/skills/claude-compaction-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-compaction-restore", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mvschwarz/openrig --skill claude-compaction-restore -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mvschwarz/openrig claude-compaction-restore --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore .opencode/skills/claude-compaction-restore && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "claude-compaction-restore" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore into .opencode/skills/claude-compaction-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-compaction-restore", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
claude-compaction-restoreKeeps a long-running Claude Code session's working picture alive across compactions by writing a restore map before compacting and rebuilding context from it afterward.
Compaction keeps facts but loses the connections between them: why a file matters, what depends on what, which decision produced which artifact and what comes next. Planners, orchestrators and reviewers holding a standard lose the most. Before compacting, the agent writes a restore map, a short summary plus the links between things that already exist on disk. After compacting it reads its own map and rebuilds the picture before acting, and over several compactions the maps chain into one continuous record.
The skill separates what is already on disk, which the map should point to and not copy, from what exists only in the agent's head and must be written down. On disk are the session JSONL transcript, the restore packet from the PreCompact hook, queue rows, mission files such as `SPEC.md`, `NOTES.md` and `PROGRESS.md`, `LEARNED.md`, branches and PRs. The map records why things matter, how they relate, decisions with rejected options, position in time and where to look deeper. Scripts include `precompact-hook.mjs` and `restore-from-jsonl.mjs`, plus compact and post-compact instruction templates.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 4b48ca2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (JavaScript), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Claude Compaction Restore loads about 4.2k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 2,603 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from mvschwarz/openrig at commit 4b48ca2, republished under its Apache-2.0 licence (© mvschwarz). 2,603 words, ~4,216 tokens.
.claude/skills/claude-compaction-restore/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Compaction keeps facts and loses connections. After a compaction you still know file names, row ids and decisions as items. What you lose is the web between them: why a file matters, what depends on what, which decision produced which artifact, what you were about to do next, and how this window relates to the ones before it. Seats whose value is a wide, long-running picture (planners, orchestrators, reviewers holding a standard) lose the most.
This skill keeps that picture alive across compactions. Before compacting, you write a restore map: a short summary plus the connections between things that already exist on disk. After compacting, you re-enter the world, read your own map, and rebuild the picture before acting. Over several compactions the maps chain into one continuous record: a global context window that outlives any single session.
The previous version of this skill is kept at reference/SKILL-v1.md for comparison.
Already on disk; point to it, don't copy it:
~/.claude/projects/<cwd-slug>/<session-uuid>.jsonl (the post-compaction restore
request names the exact path). It holds every message and tool call you made, in order. It does not hold
your reasoning;SPEC.md, NOTES.md, PROGRESS.md), your seat's
LEARNED.md, evidence folders, branches and PRs.Only in your head; write it down:
The map is the second list, pinned to the first.
Every restored seat must come back competent. It should understand the OpenRig world and its command surface, the project, its own role, and where it stands in time. Some seats also need the global picture.
Both classes read the same thing: the ranked reading list in your own map, in order. They differ only in how far down the list they go.
| Class | Who | Reads |
|---|---|---|
| Default | drivers, builders, reviewers, QA, and any seat not listed below | Tier 1: the top of the list, to about 100k of real context |
| High-context | orchestrators, planners, advisors, leads: any seat that makes product, scope or routing decisions | Tier 1 and Tier 2, to about 200k of real context |
The tiers are real context added by the restore, on top of what the compaction summary leaves (about 60k).
These budgets assume a context window of about 1M tokens; on a smaller window, scale them to about 10% and
20% of it. File size is a poor guide to that cost: in OpenRig's own runs, real context grew 1.7 to 2 times the bytes ÷ 4 estimate,
because of line numbers on reads, tool output and your own reasoning. So rank to about 50k of bytes ÷ 4 for
Tier 1 and about 100k for Tier 2, and check real usage at each checkpoint with
rig compact-plan --json (your seat's estimatedUsedTokens).
Tier 2 buys width, not depth: more sources, more connections, more of the mission's history and the wider
worlds, not the same files read more fully. Choose your class from your role (rig whoami --json). A per-seat
instruction file or your own map can name the class explicitly, and that overrides the role default. In both
classes, transcripts and the session JSONL appear only as targeted line ranges, never as whole files.
If there is no ranked list (no preparation turn happened), use this default order. Default seats stop at about 100k of real context:
SPEC.md and NOTES.md;High-context seats then add, to about 200k:
PROGRESS.md and recent returns;RESTORED notes;LEARNED.md.You are about to lose every connection you have built. Spend this turn making them durable.
.tmp file,
with the exact completion marker as its last line, then finish and close it. The daemon publishes
the completed map atomically; do not run a shell rename or write the final file incrementally.
Do not substitute the seat folder or another map. Managed preparation normally publishes
<launch cwd>/.openrig/compaction/preparation/<session>/<attempt>/RESTORE-MAP.md; its parent
compaction folder ignores itself in Git because maps hold private working context. Unknown or
unwritable launch directories retain the instance-home fallback named in the request; it may need
permission if outside your working directories. When there is no named path, use your durable seat
folder instead: <topology root>/rigs/<rig>/seats/<seat>/RESTORE-MAP-<UTC yyyymmdd-hhmm>.md, derived
from rig whoami --json and rig config get topology.root. Run date -u for the timestamp and every
time you write in the map. Do not estimate times: an estimated time can land before events it describes.rig context recap-write --rig <rig> --seat <seat> --file <that file>. If your world profile has a seat
recap atom, it loads this recap, and an old recap would be served as if it were current.grep -n the JSONL for a row id
or timestamp), and which file holds the evidence for which claim.grep -n), not the
whole file unless the whole file is the point;wc -c);rig context profile … --json (totalEstimatedTokens).RESTORED note, if one exists) so a later
reader can walk back through earlier windows.LEARNED.md; mission state goes in the mission's own files; work another seat must act on goes in a queue
row. The map points to these rather than repeating them./compact next; the summary should
name the map path and the next authorized step.A map that lists files without saying how they connect is an inventory, and an inventory is what compaction already leaves you. The edges are the point.
You have facts without connections. Rebuild the connections before you act on anything.
Use the native read tool for file reads throughout restoration. Load refocusing
and consume the current topology and work trace that actually arrived with the
restore request; do not rerun Python merely to duplicate it. If no current trace
arrived, name that delivery gap. A packet pointer, compact summary or truncated
extract is not a full source read. Read required notes and full sources separately
and complete the restore steps and read-depth audit below; partial reading does
not establish completed restoration. The earlier acknowledgement-only boundary
is not a restore request.
<OPENRIG_HOME>/compaction/post-compact-extra/<session>.md, named by your full session such as
dev-impl@my-rig.md) when it exists, the newest row or message from whoever routes your work, and any hold
from the authority above them. A hold, a release order or an operator's own restore map overrides the default
order below. Before any write, also run rig whoami --json and rig queue whoami.rig context list; for a private world install, run
rig context profile <world-ref> --situation post-compaction --rig <rig> --seat <seat> (the seat flags are
needed for its seat-scoped recap atom; take both values from rig whoami --json). Without a private world,
run rig context profile world-public --situation post-compaction and rig context get onboarding-width. This restores how the system works before you
restore what you were doing in it. If your work belongs to a project, re-enter its declared context too:
rig context work-install lists what the project declares (intent, context files, skills), so read the pieces
your task needs. --deliver prints them all; when several projects are declared (--json lists the ids), name
one with --project <id>.RESTORE-MAP-*.md
in your seat folder. If the selected map points to an earlier map for context you need, read that too.rig queue show <id> --full --json) and anything that may have changed since
the map was written: merged PRs, new rows, a new hold. The map records what was true when it was written;
current state still has to be derived.restore-instructions.md and touched-files.md help find
things the map does not cover.restore-instructions.md, then the most recent unique narrative, tail first, within the budget; and say in
your report that you restored without a map.restored from packet at <path>; resumed at step <X>, naming the map you used. When no packet exists, give
the map's path as <path> and say that you restored from the map.The audit message asks for a read-depth table and tells you not to conserve tokens. Do both in this form:
FULL, PARTIAL or NOT_READ, the ranges you actually read, and a reason.
Mark FULL only for content you read after this compaction; content carried in through the summary is
inherited, not read, and a file the harness re-attached after compaction is
PARTIAL (injected), not FULL, until you read it.FULL. "Required" means the ranked entries
above your class's tier line, in the exact parts they name. Everything else is lookup-only: every file in the restore packet
(touched-files.md, restore-instructions.md, transcript.md, transcript-latest.md, restore-summary.json),
the session JSONL and archives. Those stay
NOT_READ with the reason "lookup only", unless a human or the owning seat releases them. The audit
message's "do not optimize for token conservation" applies to required items: read those fully rather
than skimming them. It does not turn lookups into reading lists. In an early run of this skill, reading
the packet transcripts during the audit cost a default seat about 75k, more than the restore itself.RESTORED-<UTC yyyymmdd-hhmm>.md beside the
map:The next restore map links this note, which keeps the chain unbroken.
PARTIAL with its reason is a correct outcome. Claiming coverage you did not reach is the
failure.© mvschwarz, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts) in packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore of mvschwarz/openrig.
Open the folder on GitHubat commit 4b48ca2
Claude Compaction Restore next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Claude Compaction Restore this skillmvschwarz/openrig | 6.6k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Memori Long-Term MemoryMemoriLabs/Memori | 17k | — | ~2k | Automated safety check: Notes | Custom licence | |
| Planning with FilesOthmanAdi/planning-with-files | 27k | — | ~2.9k | Automated safety check: Pass | MIT | |
| User Thoughts Memorysickn33/agentic-awesome-skills | 47k | 1 repos | ~2.5k | Automated safety check: Pass | MIT | |
| Planning With FilesOthmanAdi/planning-with-files | 27k | — | ~3k | Automated safety check: Pass | MIT | |
| Harness Engineering10xChengTu/harness-engineering | 102 | 1 repos | ~1k | Automated safety check: Pass | None |
MemoriLabs/Memori
Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.
OthmanAdi/planning-with-files
Keeps a task plan, findings and progress log in markdown files on disk so long agent tasks survive context resets, with Gemini hooks and helper scripts.
sickn33/agentic-awesome-skills
Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.
OthmanAdi/planning-with-files
Keeps a task plan, findings and progress log as Markdown files in the project so long multi-step agent work survives context resets.
10xChengTu/harness-engineering
Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.
OthmanAdi/planning-with-files
Keeps task_plan.md, findings.md and progress.md on disk as the agent's working memory for multi-step work, wired into Kiro steering, with no hooks.
mvschwarz/openrig
Walks an agent through upgrading the OpenRig CLI and daemon one observed step at a time, keeping live seats alive and reconciling managed plugin files.
mvschwarz/openrig
Re-grounds a long-running agent in the current product outcome by running a path-based trace to the root of its topology and work trees.
mvschwarz/openrig
Helps set up a continuing agent software team for a real repository with OpenRig, choosing between manual work, queue handoffs and an explicit Workflow.
mvschwarz/openrig
Separates a stable agent seat's identity from its changing occupant, and records honest, two-part provenance whenever one occupant replaces another.
mvschwarz/openrig
Loads one section of a Markdown file by its path#h2-slug address with a bundled resolver script, for use outside OpenRig's context library.
mvschwarz/openrig
Covers authoring, inspecting, refreshing, promoting and deprecating named Agent Starters, the reusable starting points for agent seats in a rig.
Categories
Keeps a long-running Claude Code session's working picture alive across compactions by writing a restore map before compacting and rebuilding context from it afterward. Compaction keeps facts but loses the connections between them: why a file matters, what depends on what, which decision produced which artifact and what comes next. Planners, orchestrators and reviewers holding a standard lose the most.
Claude Compaction Restore fits situations like: preparing a long session for an upcoming compaction; rebuilding context after a session has just compacted; resuming a long-running planner or reviewer seat after /compact.
Run `npx skills add mvschwarz/openrig --skill claude-compaction-restore -a claude-code`. Or copy the skill folder (packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore in mvschwarz/openrig) into .claude/skills/claude-compaction-restore in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mvschwarz/openrig --skill claude-compaction-restore -a codex`. Or copy the skill folder (packages/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore in mvschwarz/openrig) into .agents/skills/claude-compaction-restore in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mvschwarz/openrig --skill claude-compaction-restore -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-compaction-restore, .gemini/skills/claude-compaction-restore, .github/skills/claude-compaction-restore and .opencode/skills/claude-compaction-restore in your project.
Going by SKILL.md and its folder, Claude Compaction Restore needs JavaScript for the scripts in its folder. Our summary lists: Node.js to run the hook and restore scripts; Claude Code session transcripts stored under ~/.claude/projects.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Claude Compaction Restore is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Claude Compaction Restore: Memori Long-Term Memory (MemoriLabs/Memori, 17k stars), Planning with Files (OthmanAdi/planning-with-files, 27k stars), User Thoughts Memory (sickn33/agentic-awesome-skills, 47k stars) and Planning With Files (OthmanAdi/planning-with-files, 27k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mvschwarz (a GitHub user) maintains it in mvschwarz/openrig, which has 6,551 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 10, 2026.
Source: mvschwarz/openrig on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.